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


PHP module_config::c方法代码示例

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


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

示例1: header_print_js

    public static function header_print_js()
    {
        $pages = isset($_REQUEST['p']) ? is_array($_REQUEST['p']) ? $_REQUEST['p'] : array($_REQUEST['p']) : array();
        $modules = isset($_REQUEST['m']) ? is_array($_REQUEST['m']) ? $_REQUEST['m'] : array($_REQUEST['m']) : array();
        foreach ($pages as $pid => $p) {
            $pages[$pid] = preg_replace('#[^a-z_]#', '', $p);
        }
        foreach ($modules as $pid => $p) {
            $modules[$pid] = preg_replace('#[^a-z_]#', '', $p);
        }
        ?>
		<script type="text/javascript">
			ucm.help.current_modules = '<?php 
        echo implode('/', $modules);
        ?>
';
			ucm.help.current_pages = '<?php 
        echo implode('/', $pages);
        ?>
';
			ucm.help.lang.help = '<?php 
        _e('Help');
        ?>
';
			ucm.help.url_extras = '&codes=<?php 
        echo base64_encode(module_config::c('_installation_code'));
        ?>
&host=<?php 
        echo urlencode(htmlspecialchars(full_link('/')));
        ?>
';
		</script>
		<?php 
    }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:34,代码来源:help.php

示例2: handle_hook

    public function handle_hook($hook_name)
    {
        if ($hook_name == 'top_menu_end' && module_config::c('timer_enabled', 1) && module_security::is_logged_in() && self::can_i('view', 'Task Timer') && get_display_mode() != 'mobile') {
            ?>

            <li id="timer_menu_button">
                <div id="timer_menu_options">
                    <div class="timer_title">
                        <?php 
            _e('Active Timers');
            ?>

                    </div>
                    <ul id="active_timer_list">
                    </ul>
                </div>
                <a href="#" onclick="return false;" title="<?php 
            _e('Timer');
            ?>
"><span><?php 
            _e('Timers');
            ?>
<span class="menu_label" id="current_timer_count">1</span></span></a>
            </li>
            <?php 
        }
    }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:27,代码来源:timer.php

示例3: check_captcha_form

 public static function check_captcha_form()
 {
     $privatekey = module_config::c('recaptcha_private_key', '6Leym88SAAAAANbBjtrjNfeu6NXDSCXGBSbKzqnN');
     require_once 'inc/recaptchalib.php';
     $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], isset($_POST["recaptcha_challenge_field"]) ? $_POST["recaptcha_challenge_field"] : '', isset($_POST["recaptcha_response_field"]) ? $_POST["recaptcha_response_field"] : '');
     if (!$resp->is_valid) {
         // What happens when the CAPTCHA was entered incorrectly
         return false;
     } else {
         return true;
     }
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:12,代码来源:captcha.php

示例4: ajax_search

 public function ajax_search($search_key)
 {
     // return results based on an ajax search.
     $ajax_results = array();
     $search_key = trim($search_key);
     if (strlen($search_key) > module_config::c('search_ajax_min_length', 2)) {
         $results = $this->get_widgets(array('generic' => $search_key));
         if (count($results)) {
             foreach ($results as $result) {
                 $match_string = _l('Widget: ');
                 $match_string .= _shl($result['name'], $search_key);
                 $ajax_results[] = '<a href="' . $this->link_open($result['widget_id']) . '">' . $match_string . '</a>';
             }
         }
     }
     return $ajax_results;
 }
开发者ID:ThemeSurgeon,项目名称:ucm_demo_plugin,代码行数:17,代码来源:widget.php

示例5: init

 public function init()
 {
     $this->links = array();
     $this->map_types = array();
     $this->module_name = "map";
     $this->module_position = 14;
     $this->version = 2.21;
     //2.21 - 2015-09-10 - map marker fix
     //2.2 - 2015-09-09 - map marker fix
     //2.1 - 2015-06-10 - initial release
     // the link within Admin > Settings > Maps.
     if (module_security::has_feature_access(array('name' => 'Settings', 'module' => 'config', 'category' => 'Config', 'view' => 1, 'description' => 'view'))) {
         $this->links[] = array("name" => "Maps", "p" => "map_settings", 'holder_module' => 'config', 'holder_module_page' => 'config_admin', 'menu_include_parent' => 0);
     }
     if ($this->can_i('view', 'Maps') && module_config::c('enable_customer_maps', 1) && module_map::is_plugin_enabled()) {
         // only display if a customer has been created.
         if (isset($_REQUEST['customer_id']) && $_REQUEST['customer_id'] && $_REQUEST['customer_id'] != 'new') {
             // how many maps?
             $name = 'Maps';
             $this->links[] = array("name" => $name, "p" => "map_admin", 'args' => array('map_id' => false), 'holder_module' => 'customer', 'holder_module_page' => 'customer_admin_open', 'menu_include_parent' => 0, 'icon_name' => 'globe');
         }
         $this->links[] = array("name" => 'Maps', "p" => "map_admin", 'args' => array('map_id' => false), 'icon_name' => 'globe');
     }
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:24,代码来源:map.php

示例6: htmlspecialchars

	display: inline;
}
#panel {
    position: absolute;
    top: 5px;
    left: 50%;
    margin-left: -180px;
    z-index: 5;
    background-color: #fff;
    padding: 5px;
    border: 1px solid #999;
  }
</style>

<script src="https://maps.googleapis.com/maps/api/js?key=<?php 
echo htmlspecialchars(module_config::c('google_maps_api_key', 'AIzaSyDFYt1ozmTn34lp96W0AakC-tSJVzEdXjk'));
?>
&callback=initializeMaps" async defer></script>
<script>
var geocoder;
var map;
var infowindow = false;
function createInfoWindow(item,content) {
    if(!infowindow){
        infowindow = new google.maps.InfoWindow({});
    }
    google.maps.event.addListener(item, 'click', function(event) {
        infowindow.close();
        infowindow = new google.maps.InfoWindow({
            content: content,
            position: event.latLng
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:map_admin.php

示例7: is_mobile_browser

 public static function is_mobile_browser()
 {
     if (!module_config::c('mobile_enabled', 1)) {
         return false;
     }
     if (!isset($_SERVER['HTTP_USER_AGENT'])) {
         return false;
     }
     if (!isset($_SERVER['HTTP_ACCEPT'])) {
         return false;
     }
     $mobile_browser = '0';
     if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|android)/i', strtolower($_SERVER['HTTP_USER_AGENT']))) {
         $mobile_browser++;
     }
     if (strpos(strtolower($_SERVER['HTTP_ACCEPT']), 'application/vnd.wap.xhtml+xml') > 0 or (isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']))) {
         $mobile_browser++;
     }
     $mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4));
     $mobile_agents = array('w3c ', 'acs-', 'alav', 'alca', 'amoi', 'audi', 'avan', 'benq', 'bird', 'blac', 'blaz', 'brew', 'cell', 'cldc', 'cmd-', 'dang', 'doco', 'eric', 'hipt', 'inno', 'ipaq', 'java', 'jigs', 'kddi', 'keji', 'leno', 'lg-c', 'lg-d', 'lg-g', 'lge-', 'maui', 'maxo', 'midp', 'mits', 'mmef', 'mobi', 'mot-', 'moto', 'mwbp', 'nec-', 'newt', 'noki', 'oper', 'palm', 'pana', 'pant', 'phil', 'play', 'port', 'prox', 'qwap', 'sage', 'sams', 'sany', 'sch-', 'sec-', 'send', 'seri', 'sgh-', 'shar', 'sie-', 'siem', 'smal', 'smar', 'sony', 'sph-', 'symb', 't-mo', 'teli', 'tim-', 'tosh', 'tsm-', 'upg1', 'upsi', 'vk-v', 'voda', 'wap-', 'wapa', 'wapi', 'wapp', 'wapr', 'webc', 'winw', 'winw', 'xda ', 'xda-');
     if (in_array($mobile_ua, $mobile_agents)) {
         $mobile_browser++;
     }
     if (isset($_SERVER['ALL_HTTP']) && strpos(strtolower($_SERVER['ALL_HTTP']), 'OperaMini') > 0) {
         $mobile_browser++;
     }
     if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows') > 0) {
         $mobile_browser = 0;
     }
     return $mobile_browser;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:mobile.php

示例8: function

 * 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
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
/* <div data-role="footer">
		<h4>Footer content</h4>
	</div><!-- /footer --> */
?>

</div><!-- /page -->
<?php 
if (module_config::c('mobile_content_scroll', 1) && module_security::is_logged_in()) {
    ?>
<script type="text/javascript">
    var contentscroll = [];
    var content = null;
    window.addEventListener("resize", function() {
        // Get screen size (inner/outerWidth, inner/outerHeight)
//        var headerheight = 20;
//        $('div[data-role="header"]').each(function(){
//            headerheight+= $(this).height();
//        });
//        if(content != null)content.width(window.innerWidth-10).height(window.innerHeight-headerheight);
//        if(contentscroll != null)contentscroll.refresh();
        for (var i in contentscroll){
            if(typeof contentscroll[i] == 'object'){
                contentscroll[i].refresh();
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:mobile_footer.php

示例9: _e

); 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 */
if (!$done_messages) {
    $tickets_in_reverse = module_config::c('ticket_messages_in_reverse', 0);
    include module_theme::include_ucm('includes/plugin_ticket/pages/ticket_admin_edit_messages.php');
}
hook_handle_callback('layout_column_half', 'end');
echo $action_buttons;
?>


</form>

<?php 
if (($last_response_from == 'customer' || $last_response_from == 'autoreply') && $ticket['status_id'] != _TICKET_STATUS_RESOLVED_ID) {
    // don't do this for resolved tickets
    // only set the default field if the last respose was from the customer.
    module_form::set_default_field('new_ticket_message');
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ticket_admin_edit.php

示例10: array

            if (strlen($search_text) > module_config::c('search_ajax_min_length', 2)) {
                if (isset($_SESSION['previous_search'][$plugin_name]) && $_SESSION['previous_search'][$plugin_name]['c'] == 0 && strlen($search_text) >= strlen($_SESSION['previous_search'][$plugin_name]['l']) && strpos($search_text, $_SESSION['previous_search'][$plugin_name]['l']) === 0) {
                    $_SESSION['previous_search'][$plugin_name]['l'] = $search_text;
                    // not really needed. but when you backspace a failed search it will force refresh all which might be good.
                    //$this_plugin_results=array('skipping ' . $search_text.' in '.$plugin_name.' last search was '.$_SESSION['previous_search'][$plugin_name]['l'],);
                    continue;
                } else {
                    $this_plugin_results = $plugin->ajax_search($search_text);
                    $_SESSION['previous_search'][$plugin_name] = array('l' => $search_text, 'c' => count($this_plugin_results));
                }
                $search_results = array_merge($search_results, $this_plugin_results);
            }
        }
        if (count($search_results)) {
            echo '<ul>';
            foreach ($search_results as $r) {
                echo '<li>' . $r . '</li>';
            }
            echo '</ul>';
        } else {
            //_e('No results');
        }
    } else {
        echo '';
    }
    if (module_config::c('search_ajax_show_time', 0)) {
        echo '<br>';
        echo 'Search took: ' . round(microtime(true) - $start_search_time, 5);
    }
    exit;
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ajax.php

示例11: get_data

 public function get_data()
 {
     if (count($this->_get_data_cache)) {
         return $this->_get_data_cache;
     }
     $file = false;
     if ($this->file_id > 0) {
         $file = get_single("file", "file_id", $this->file_id);
     }
     // check user has permissions to view this file.
     // for now we just base this on the customer id check
     if ($file) {
         // staff listing
         $staff = get_multiple('file_user_rel', array('file_id' => $file['file_id']), 'user_id');
         $file['staff_ids'] = array_keys($staff);
         $file['type'] = isset($file['file_url']) && $file['file_url'] ? 'remote' : (isset($file['bucket']) && $file['bucket'] ? 'bucket' : 'upload');
         if ($this->do_permissions) {
             switch (module_file::get_file_data_access()) {
                 case _FILE_ACCESS_ALL:
                     // all files, no limits on SQL here
                     break;
                 case _FILE_ACCESS_JOBS:
                     $jobs = module_job::get_jobs(array(), array('columns' => 'u.job_id AS id'));
                     if (!$file['job_id'] || !isset($jobs[$file['job_id']])) {
                         $file = false;
                     }
                     break;
                 case _FILE_ACCESS_ME:
                     if ($file['create_user_id'] != module_security::get_loggedin_id()) {
                         $file = false;
                     }
                     break;
                 case _FILE_ACCESS_ASSIGNED:
                     if (!in_array(module_security::get_loggedin_id(), $file['staff_ids'])) {
                         $file = false;
                     }
                     break;
                 case _FILE_ACCESS_CUSTOMERS:
                 default:
                     if (class_exists('module_customer', false)) {
                         //added for compat in newsletter system that doesn't have customer module
                         $customer_permission_check = module_customer::get_customer($file['customer_id']);
                         if ($customer_permission_check['customer_id'] != $file['customer_id']) {
                             $file = false;
                         }
                     }
             }
             // file data access switch
         }
     }
     if (!$file) {
         $file = array('new' => true, 'type' => 'upload', 'file_id' => 0, 'customer_id' => isset($_REQUEST['customer_id']) ? $_REQUEST['customer_id'] : 0, 'job_id' => isset($_REQUEST['job_id']) ? $_REQUEST['job_id'] : 0, 'quote_id' => isset($_REQUEST['quote_id']) ? $_REQUEST['quote_id'] : 0, 'description' => '', 'status' => module_config::c('file_default_status', 'Uploaded'), 'file_name' => '', 'file_url' => '', 'staff_ids' => array(), 'bucket' => 0, 'bucket_parent_file_id' => 0, 'approved_time' => 0);
     }
     $this->_get_data_cache = $file;
     return $file;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:56,代码来源:file.php

示例12: _e

                            $('#manual_send_paused').hide();
                            $('#manual_send_running').hide();
                            $('#manual_send_status').prepend('<li><?php 
_e('Sending complete. Please <a href="%s">click here</a> to refresh the page.', module_newsletter::link_queue_watch($newsletter_id, $send_id));
?>
</li>');
                            $('#change_status_buttons').hide();
                        }
                        function do_manual_send(){
                            if(!run_manual_send){
                                return;
                            }
                            // do an ajax call to the newsletter_queue_manual.php script
                            // parse the result and update the corresponding recipient in the listing
                            $('#manual_send_status').prepend('<li><?php 
_e('Telling server to send in batches of %s, please wait...', module_config::c('newsletter_send_burst_count', 40));
?>
</li>');
                            $.ajax({
                                type: 'POST',
                                url: '<?php 
echo module_newsletter::link_queue_manual($newsletter_id, $send_id);
?>
',
                                data: 'retry_failures=<?php 
echo $retry_failures ? 'yes' : '';
?>
&retry_pending=<?php 
echo $retry_pending ? 'yes' : '';
?>
',
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:newsletter_queue_watch.php

示例13: foreach

    }
    if ($task_data['user_id'] && $task_data['user_id'] != $current_user_id && $task_data['user_id'] != $customer['primary_user_id']) {
        $send_to_staff_ids[$task_data['user_id']] = module_config::c('job_discussion_staff_checked', 1);
    }
    if (!module_security::is_logged_in()) {
        echo '<div style="display:none;">';
    }
    foreach ($send_to_customer_ids as $user_id => $tf) {
        // we are the admin, sending an email to customer
        ?>
        <br/>
        <input type="checkbox" name="sendemail_customer[]" value="<?php 
        echo $user_id;
        ?>
" <?php 
        echo module_config::c('job_discussion_customer_checked', 1) && $user_id == $customer['primary_user_id'] ? 'checked="checked"' : '';
        ?>
 class="sendemail_customer"> <?php 
        _e('Yes, send email to customer contact %s', module_user::link_open($user_id, true, array(), true));
        ?>
        <?php 
        echo $user_id == $customer['primary_user_id'] ? _l('(primary)') : '';
        ?>
        <?php 
    }
    foreach ($send_to_staff_ids as $staff_id => $checked) {
        // we are the admin, sending an email to assigned staff member
        ?>
        <br/>
        <input type="checkbox" name="sendemail_staff[]" value="<?php 
        echo $staff_id;
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:comment_list.php

示例14: _e

                <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">

                    <!-- these are overridden from the products selection -->
                    <input type="hidden" name="job_task[new][billable_t]" value="1">
                    <input type="hidden" name="job_task[new][billable]" value="1" id="billable_t_new">
                    <input type="hidden" name="job_task[new][taxable_t]" value="1">
                    <input type="hidden" name="job_task[new][taxable]" value="<?php 
        echo module_config::c('task_taxable_default', 1) ? 1 : 0;
        ?>
" id="taxable_t_new">
                    <input type="hidden" name="job_task[new][manual_task_type]" value="-1" id="manual_task_type_new">
                </td>
            </tr>
            </tbody>
            <?php 
    }
    ?>

            <?php 
    $c = 0;
    $task_number = 0;
    foreach ($job_tasks as $task_id => $task_data) {
        $task_number++;
开发者ID:sgh1986915,项目名称:php-crm,代码行数:30,代码来源:job_admin_create.php

示例15: isset

$module->page_title = 'Recurring';
$search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array();
if (module_config::c('finance_recurring_show_finished', 0)) {
    $search['show_finished'] = true;
}
if (!isset($search['date_to'])) {
    $search['date_to'] = print_date(strtotime('+' . (int) module_config::c('finance_recurring_months', 6) . ' months'));
}
$balance = isset($_REQUEST['balance']) ? (double) $_REQUEST['balance'] : module_config::c('finance_recurring_start_balance', 0);
module_config::save_config('finance_recurring_start_balance', $balance);
$_SESSION['_finance_recurring_ids'] = array();
module_debug::log(array('title' => 'calling get_recurrings', 'data' => ''));
$upcoming_finances_unsorted = module_finance::get_recurrings($search);
module_debug::log(array('title' => 'finished calling get_recurrings', 'data' => 'count: ' . count($upcoming_finances_unsorted)));
$upcoming_finances = array();
$limit_timestamp = isset($search['date_to']) && !empty($search['date_to']) ? strtotime(input_date($search['date_to'])) : strtotime('+' . (int) module_config::c('finance_recurring_months', 6) . ' months');
$duplicate_limit = 30;
$upcoming_finance_key = 0;
foreach ($upcoming_finances_unsorted as $recurring) {
    $time = strtotime($recurring['next_due_date']);
    $original = true;
    $count = 0;
    while ($time < $limit_timestamp) {
        $next_time = 0;
        if ($count++ > $duplicate_limit) {
            break;
        }
        // we need a special case for the first one that hasn't had a last trasnaction
        // we need a specicl case for the last one that the due date is on the finish date.
        if ($recurring['next_due_date'] == '0000-00-00' || !$recurring['days'] && !$recurring['months'] && !$recurring['years']) {
            // it's a once off..
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:recurring_list.php


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