当前位置: 首页>>代码示例>>PHP>>正文


PHP module_security::get_loggedin_id方法代码示例

本文整理汇总了PHP中module_security::get_loggedin_id方法的典型用法代码示例。如果您正苦于以下问题:PHP module_security::get_loggedin_id方法的具体用法?PHP module_security::get_loggedin_id怎么用?PHP module_security::get_loggedin_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在module_security的用法示例。


在下文中一共展示了module_security::get_loggedin_id方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 function init()
 {
     $this->module_name = "language";
     $language_code = basename(module_config::c('default_language'));
     if (module_security::is_logged_in()) {
         $user = module_user::get_user(module_security::get_loggedin_id(), false);
         if ($user && $user['user_id'] && isset($user['language']) && $user['language']) {
             $language_code = basename($user['language']);
         }
     }
     // language code, like en, gb, etc..
     self::set_ui_language($language_code);
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:13,代码来源:language.php

示例2: init

 public function init()
 {
     $this->links = array();
     $this->help_types = array();
     $this->module_name = "help";
     $this->module_position = 16;
     $this->version = 2.11;
     //2.11 - 2014-04-05 - url help js
     //2.1 - 2014-03-14 - initial release of new help system
     if (module_help::is_plugin_enabled() && (module_config::c('help_only_for_admin', 1) && module_security::get_loggedin_id() == 1 || !module_config::c('help_only_for_admin', 1) && module_help::can_i('view', 'Help'))) {
         // hook for help icon in top bar
         hook_add('header_buttons', 'module_help::hook_filter_var_header_buttons');
         hook_add('header_print_js', 'module_help::header_print_js');
         module_config::register_js('help', 'help.js');
         if (module_config::can_i('view', 'Settings')) {
             $this->links[] = array("name" => "Help", "p" => "help_settings", 'holder_module' => 'config', 'holder_module_page' => 'config_admin', 'menu_include_parent' => 0);
         }
     }
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:19,代码来源:help.php

示例3: foreach

<?php

/** 
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca, 0a3014a3-2b8f-460b-8850-d6025aa845f8
 * Package Date: 2015-11-25 03:08:08 
 * IP Address: 67.79.165.254
 */
if (class_exists('module_customer', false) && module_security::can_user(module_security::get_loggedin_id(), 'Show Dashboard Widgets')) {
    $customer_types = module_customer::get_customer_types();
    foreach ($customer_types as $customer_type) {
        // if(!empty($customer_type['type_name_plural']) && $customer_type['customer_type_id']) { // dtbaker
        if (!empty($customer_type['type_name_plural'])) {
            // dtbaker
            if (module_customer::can_i('view', $customer_type['type_name_plural'])) {
                // find out how many open customers are left..
                $customers = module_customer::get_customers(array('customer_type_id' => $customer_type['customer_type_id']), true);
                ob_start();
                // icons from http://ionicons.com/
                ?>

				<div class="small-box bg-yellow">
					<div class="inner">
						<h3>
							<?php 
                echo mysql_num_rows($customers);
                ?>
						</h3>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:widget_leads.php

示例4: _e

            <div class="content_box_wheader" style="padding-bottom: 20px">
                <p>
                    <?php 
    _e('This ticket is not assigned to anyone.');
    ?>
<br/>
                    <?php 
    _e('If you are able to solve this ticket please assign it to yourself.');
    ?>

                </p>
                <input type="button" name="butt_assign_me" value="<?php 
    _e('Assign this ticket to me');
    ?>
" class="submit_button btn btn-success" onclick="$('#assigned_user_id').val(<?php 
    echo module_security::get_loggedin_id();
    ?>
); this.form.submit();">
	            <p>
		            <?php 
    _e('If you cannot solve this ticket please assign it to someone else in the drop down list.');
    ?>

	            </p>
            </div>
            <?php 
    $fieldset_data = array('heading' => array('title' => _l('Unassigned Ticket'), 'type' => 'h3'), 'elements_before' => ob_get_clean());
    echo module_form::generate_fieldset($fieldset_data);
    unset($fieldset_data);
}
/** TICKET MESSAGES */
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ticket_admin_edit.php

示例5: has_viewed

 public function has_viewed()
 {
     // close off any notifications here.
     if ($this->file_id > 0) {
         $sql = "UPDATE `" . _DB_PREFIX . "file_notification` SET `view_time` = '" . time() . "' WHERE `view_time` = 0 AND `user_id` = " . module_security::get_loggedin_id() . " AND file_id = " . (int) $this->file_id;
         query($sql);
     }
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:8,代码来源:file.php

示例6: _l

    echo _l($link['name']);
    ?>
				</a>
			</li>
		<?php 
}
unset($menu_holder);
unset($menu_type);
unset($current_link);
unset($menu_allow_nesting);
?>
        <?php 
if (isset($show_quick_search) && $show_quick_search) {
    ?>
        <?php 
    if (module_security::getcred() && module_security::can_user(module_security::get_loggedin_id(), 'Show Quick Search') && $display_mode != 'mobile') {
        if (module_config::c('global_search_focus', 1) == 1) {
            module_form::set_default_field('ajax_search_text');
        }
        ?>
            <li>
                <div id="quick_search_box">
                    <div id="quick_search_placeholder"><div><?php 
        _e('Quick Search:');
        ?>
</div></div>
                    <input type="text" name="quick_search" id="ajax_search_text" size="10" value="">
                    <div id="ajax_search_result"></div>
                </div>
            </li>
         <?php 
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:design_menu.php

示例7: htmlspecialchars

        <!-- end header.head -->


    </div>
    <!-- /#top -->

    <?php 
            if (module_security::getcred()) {
                ?>

    <div id="left">

        <div class="media user-media">
            <div class="media-body">
                <h5 class="media-heading"><?php 
                $user = module_user::get_user(module_security::get_loggedin_id());
                _e('Welcome %s', htmlspecialchars($user['name']));
                ?>
</h5>
                <ul class="list-unstyled user-info">
                    <li><small><i class="fa fa-user"></i> <a href="<?php 
                echo module_user::link_open($_SESSION['_user_id']);
                ?>
"><?php 
                _e('Edit Profile');
                ?>
</a></small></li>
	                <?php 
                $header_buttons = array();
                if (module_security::is_logged_in()) {
                    $header_buttons = hook_filter_var('header_buttons', $header_buttons);
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:design_header.php

示例8: print_date

        ?>

                </td>
                <td valign="top">
                    <input type="text" name="job_task[new][date_due]" value="<?php 
        echo print_date($job['date_due']);
        ?>
" class="date_field">
                </td>
                <?php 
        if (module_config::c('job_allow_staff_assignment', 1)) {
            ?>

                    <td valign="top">
                        <?php 
            echo print_select_box($staff_member_rel, 'job_task[new][user_id]', isset($staff_member_rel[module_security::get_loggedin_id()]) ? module_security::get_loggedin_id() : false, 'job_task_staff_list', '');
            ?>

                    </td>
                <?php 
        }
        ?>

                <td valign="top">
                    <input type="checkbox" name="job_task[new][new_fully_completed]" value="1">
                </td>
                <td align="center" valign="top">
                    <input type="submit" name="save" value="<?php 
        _e('New Task');
        ?>
" class="save_task small_button">
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:job_admin_create.php

示例9: hook_job_task_after

    public static function hook_job_task_after($hook, $job_id, $task_id, $job_data, $task_data)
    {
        $comments = get_multiple('job_discussion', array('job_id' => $job_id, 'task_id' => $task_id), 'job_discussion_id', 'exact', 'job_discussion_id');
        if ($job_data && isset($job_data['job_discussion']) && $job_data['job_discussion'] == 1) {
            // disabled & hidden.
            return;
        }
        if ($job_data && isset($job_data['job_discussion']) && $job_data['job_discussion'] == 2 && count($comments) == 0) {
            // disabled & shown.
            return;
        }
        if (isset($_POST['job_discussion_add_job_id']) && isset($_POST['job_discussion_add_task_id']) && $_POST['job_discussion_add_job_id'] == $job_id && $_POST['job_discussion_add_task_id'] == $task_id && isset($_POST['note']) && strlen($_POST['note'])) {
            $x = 0;
            while (ob_get_level() && $x++ < 10) {
                ob_end_clean();
            }
            $current_user_id = module_security::get_loggedin_id();
            $customer = module_customer::get_customer($job_data['customer_id']);
            if (!$current_user_id) {
                if ($job_data['customer_id'] && $customer['primary_user_id']) {
                    $current_user_id = $customer['primary_user_id'];
                }
            }
            $result = array();
            // adding a new note.
            $job_discussion_id = update_insert('job_discussion_id', 0, 'job_discussion', array('job_id' => $job_id, 'task_id' => $task_id, 'user_id' => $current_user_id, 'note' => $_POST['note']));
            $result['job_discussion_id'] = $job_discussion_id;
            $result['count'] = count($comments) + 1;
            $tasks = module_job::get_tasks($job_id);
            $result['email_customer'] = array();
            if (isset($_POST['sendemail_customer']) && is_array($_POST['sendemail_customer'])) {
                //$_POST['sendemail_customer'] == 'yes' && $customer['primary_user_id']){
                // send email to customer primary user id.
                $customer_contacts = module_user::get_contacts(array('customer_id' => $job_data['customer_id']));
                foreach ($_POST['sendemail_customer'] as $user_id) {
                    $user_id = (int) $user_id;
                    if ($user_id && isset($customer_contacts[$user_id])) {
                        // we can email this user.
                        $user = module_user::get_user($user_id, false);
                        if ($user && $user['user_id'] == $user_id) {
                            $values = array_merge($user, $job_data);
                            $values['job_url'] = module_job::link_public($job_id);
                            $values['job_url'] .= (strpos($values['job_url'], '?') === false ? '?' : '&') . 'discuss=' . $task_id . '#discuss' . $task_id;
                            $values['job_name'] = $job_data['name'];
                            $values['customer_name'] = $user['name'] . ' ' . $user['last_name'];
                            $values['note'] = $_POST['note'];
                            //todo: no order if no showning numbers
                            $values['task_name'] = '#' . $tasks[$task_id]['task_order'] . ': ' . $tasks[$task_id]['description'];
                            $template = module_template::get_template_by_key('job_discussion_email_customer');
                            $template->assign_values($values);
                            $html = $template->render('html');
                            $email = module_email::new_email();
                            $email->replace_values = $values;
                            $email->set_to('user', $user['user_id']);
                            $email->set_from('user', $current_user_id);
                            $email->set_subject($template->description);
                            // do we send images inline?
                            $email->set_html($html);
                            if ($email->send()) {
                                // it worked successfully!!
                                $result['email_customer'][] = $user['user_id'];
                            } else {
                                /// log err?
                            }
                        }
                    }
                }
                /*$user = module_user::get_user($customer['primary_user_id'],false);
                                if($user['user_id'] == $customer['primary_user_id']){
                                    $values = array_merge($user,$job_data);
                                    $values['job_url'] = module_job::link_public($job_id);
                                    $values['job_url'] .= (strpos($values['job_url'],'?')===false ? '?' : '&').'discuss='.$task_id.'#discuss'.$task_id;
                                    $values['job_name'] = $job_data['name'];
                                    $values['customer_name'] = $user['name'].' '.$user['last_name'];
                                    $values['note'] = $_POST['note'];
                                    //todo: no order if no showning numbers
                                    $values['task_name'] = '#'.$tasks[$task_id]['task_order'].': '.$tasks[$task_id]['description'];
                
                                    $template = module_template::get_template_by_key('job_discussion_email_customer');
                                    $template->assign_values($values);
                                    $html = $template->render('html');
                
                                    $email = module_email::new_email();
                                    $email->replace_values = $values;
                                    $email->set_to('user',$user['user_id']);
                                    $email->set_from('user',$current_user_id);
                                    $email->set_subject($template->description);
                                    // do we send images inline?
                                    $email->set_html($html);
                
                                    if($email->send()){
                                        // it worked successfully!!
                                        $result['email_customer'] = 1;
                                    }else{
                                        /// log err?
                                        $result['email_customer'] = 0;
                                    }
                                }else{
                                    // log error?
                                    $result['email_customer'] = 0;
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:job_discussion.php

示例10: _l

        ?>

                <div style="border-top:1px dashed #CCCCCC; padding:3px; margin:3px 0;">
                    <?php 
        echo $note_text;
        ?>

                    <div style="font-size:10px; text-align:right; color:#CCCCCC;">From <?php 
        echo $item['create_user_id'] ? module_user::link_open($item['create_user_id'], true) : _l('Customer');
        ?>
 on <?php 
        echo print_date($item['date_created'], true);
        ?>

                        <?php 
        if (module_file::can_i('delete', 'File Comments') || $item['create_user_id'] == module_security::get_loggedin_id()) {
            ?>

                        <a href="#" onclick="if(confirm('<?php 
            echo _l('Really remove this comment?');
            ?>
')){$('#delete_file_comment_id').val('<?php 
            echo $item['file_comment_id'];
            ?>
'); $('#butt_save_note').click(); } return false;" style="color:#FF0000">x</a>
                        <?php 
        }
        ?>

                    </div>
                </div>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:file_admin_bucket.php

示例11: mark_as_read

 public function mark_as_read()
 {
     if ($this->social_twitter_message_id && module_security::is_logged_in()) {
         $sql = "REPLACE INTO `" . _DB_PREFIX . "social_twitter_message_read` SET `social_twitter_message_id` = " . (int) $this->social_twitter_message_id . ", `user_id` = " . (int) module_security::get_loggedin_id() . ", read_time = " . (int) time();
         query($sql);
     }
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:7,代码来源:twitter.class.php

示例12: _e

                ?>
"><i
								    class="fa fa-user"></i> <?php 
                _e('Edit Profile');
                ?>
</a> <br/>
						    <a href="#" onclick="return false;"><i
								    class="fa fa-calendar"></i> <?php 
                echo _l('%s %s%s of %s %s', _l(date('D')), date('j'), _l(date('S')), _l(date('F')), date('Y'));
                ?>

						    </a>
					    </div>
				    </div>
				    <?php 
                if (module_security::can_user(module_security::get_loggedin_id(), 'Show Quick Search')) {
                    if (module_config::c('global_search_focus', 1) == 1) {
                        module_form::set_default_field('ajax_search_text');
                    }
                    ?>

					    <!-- search form -->
					    <form action="<?php 
                    echo _BASE_HREF;
                    ?>
?p=search_results" method="post" class="sidebar-form">
						    <div class="input-group">
							    <input type="text" name="quick_search" class="form-control"
							           value="<?php 
                    echo isset($_REQUEST['quick_search']) ? htmlspecialchars($_REQUEST['quick_search']) : '';
                    ?>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:design_header.php

示例13: get_secure_key

 public static function get_secure_key()
 {
     // generate a secure key for all sensitive form submissions.
     $hash = module_config::c('secure_hash', 0);
     if (!$hash) {
         $hash = md5(microtime() . mt_rand(1, 4000) . __FILE__ . time());
         // not very secure. meh.
         module_config::save_config('secure_hash', $hash);
     }
     $hash = md5($hash . "secure for user " . module_security::get_loggedin_id() . " with name " . module_security::get_loggedin_name() . session_id());
     return $hash;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:12,代码来源:form.php

示例14:

                <?php 
        }
        ?>

                </tbody>
            </table>
                </div>
                <?php 
    }
    ?>

        </td>
        <td valign="top">

            <?php 
    if (class_exists('module_job', false) && module_security::can_user(module_security::get_loggedin_id(), 'Show Dashboard Todo List')) {
        ?>


            <?php 
        print_heading(array('title' => 'Todo List', 'type' => 'h3'));
        ?>

                <div class="content_box_wheader">

             <table class="tableclass tableclass_rows tableclass_full">
                <tbody>
                <?php 
        $todo_list = module_job::get_tasks_todo();
        $x = 0;
        if (!count($todo_list)) {
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:home.php

示例15: parse_ini_file

/*
 *  Module: webNpro Menu Editor v1.0
 *  Copyright: Kőrösi Zoltán | webNpro - hosting and design | http://webnpro.com | info@webnpro.com
 *  Contact / Feature request: info@webnpro.com (Hungarian / English)
 *  License: Please check CodeCanyon.net for license details.
 *  More license clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/
 */
// Get the infos about the plugin from the plugin.info file
$info = parse_ini_file(dirname(__FILE__) . '/../plugin.info');
$plugin_full_name = $info['fullname'];
$plugin_name = $info['modulename'];
$plugin_id = $info['id'];
$plugin_ver = $info['version'];
// Check permissions
if (!module_webnpro_menu_editor::can_i('edit', 'webNpro Menu Editor Settings', 'Config') && module_security::get_loggedin_id() != '1') {
    redirect_browser(_BASE_HREF);
}
// Include the update class
require_once dirname(__FILE__) . '/../update/updateclass.php';
// Get license infos
$update = new update();
$license = $update->get_license_info();
unset($update);
// Header buttons
$header_buttons[] = array('url' => _BASE_HREF . '?m[0]=' . $plugin_name . '&p[0]=documentation', 'title' => _l('Read Documentation'));
// Settings
$settings = array(array('key' => $plugin_name . '_envato_license_number', 'default' => '', 'type' => 'text', 'description' => _l('Plugin License key'), 'size' => '100', 'help' => _l('Please copy your license key here. They called it purchase code on the envato marketplaces. For more information about your license keys location check <a href="http://webnpro.com/images/envato_purchase_code_help.png" target="_blank">this image (...CLICK HERE...)</a>.')));
// Print the heading with the header buttons
print_heading(array('type' => 'h2', 'main' => true, 'title' => _l($plugin_full_name) . ' v' . $plugin_ver, 'button' => $header_buttons));
// Print the setting form
开发者ID:sgh1986915,项目名称:php-crm,代码行数:30,代码来源:settings.php


注:本文中的module_security::get_loggedin_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。