本文整理汇总了PHP中module_config类的典型用法代码示例。如果您正苦于以下问题:PHP module_config类的具体用法?PHP module_config怎么用?PHP module_config使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了module_config类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
$this->module_name = "encrypt";
$this->module_position = 1;
$this->version = 2.269;
// 2.2 - initial release
// 2.21 - better support for new 'extra' fields
// 2.22 - permissions.
// 2.221 - typo.
// 2.23 - a better "e" value in RSA to support easier server side public key encryption.
// 2.24 - sidebar encryption in ticket extra fields.
// 2.25 - link fix, no htmlspecialchars
// 2.26 - save decrypted
// 2.261 - remove console .log
// 2.262 - fix for encrypted ticket submission + attachments
// 2.263 - larger popup
// 2.264 - 2013-04-07 - fix for special characters in encryption
// 2.265 - 2013-11-23 - working on new ui
// 2.266 - 2014-01-17 - compatibility update for custom data plugin
// 2.267 - 2014-01-21 - updated js encryption library
// 2.268 - 2014-10-13 - hook_filter_var for better theme support
// 2.269 - 2015-04-12 - fix dollar sign in extra field bug
module_config::register_js('encrypt', 'sjcl.js');
module_config::register_js('encrypt', 'encrypt.js');
module_config::register_css('encrypt', 'encrypt.css');
hook_add('extra_fields_output', 'module_encrypt::extra_fields_output_callback');
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:27,代码来源:encrypt.php
示例2: 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
示例3: 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
示例4: init
public function init()
{
$this->links = array();
$this->module_name = "webnpro_menu_module_redbooth";
$this->module_position = '13';
$this->version = '1.0';
module_config::save_config('_menu_order_webnpro_menu_module_redbooth', '13');
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:8,代码来源:webnpro_menu_module_redbooth.php
示例5: 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
示例6: init
function init()
{
$this->links = array();
$this->module_name = "social";
$this->module_position = 25.1;
$this->version = 2.131;
// 2.131 - 2014-08-04 - responsive improvements
// 2.13 - 2014-05-23 - social fixes
// 2.12 - 2014-04-05 - ability to disable social plugin
// 2.11 - 2014-04-05 - better message archiving
// 2.1 - 2014-03-25 - initial release
if (self::is_plugin_enabled()) {
module_config::register_css('social', 'social.css', true, 5);
module_config::register_js('social', 'social.js', true, 5);
}
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:16,代码来源:social.php
示例7: 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
示例8: dollar
}else{
echo 'success_text';
}
echo '">';
if($invoice['total_amount_due']>0){
echo dollar($invoice['total_amount_due'],true,$job['currency_id']);
echo ' '._l('due');
}else{
echo _l('All paid');
}
echo '</span>';*/
} else {
if ($task_editable) {
?>
<?php
if (module_config::c('job_task_edit_icon', 0)) {
// old icon:
?>
<a href="#" class="ui-state-default ui-corner-all ui-icon ui-icon-<?php
echo $percentage == 1 ? 'pencil' : 'check';
?>
" title="<?php
_e($percentage == 1 ? 'Edit' : 'Complete');
?>
" onclick="edittask(<?php
echo $task_id;
?>
,<?php
echo $task_data['hours'] != 0 ? $task_data['hours'] - $task_data['completed'] : 1;
?>
); return false;"><?php
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ajax_task_preview.php
示例9: 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
示例10: array
<?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
* Package Date: 2015-11-25 02:55:20
* IP Address: 67.79.165.254
*/
if (!module_config::can_i('view', 'Settings') || !module_template::can_i('edit', 'Templates')) {
redirect_browser(_BASE_HREF);
}
$template_id = $_REQUEST['template_id'];
$template = array();
if ((int) $template_id && $template_id != 'new') {
$template = module_template::get_template($template_id);
}
if (!$template) {
$template_id = 'new';
$template = array('template_id' => 'new', 'template_key' => '', 'description' => '', 'content' => '', 'name' => '', 'default_text' => '', 'wysiwyg' => 1);
module_security::sanatise_data('template', $template);
}
?>
<form action="<?php
echo module_template::link_open(false);
?>
" method="post" id="template_form">
开发者ID:sgh1986915,项目名称:php-crm,代码行数:30,代码来源:template_edit.php
示例11: 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
示例12: 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
示例13: __construct
public function __construct($config = array())
{
$this->config = array_merge(array('consumer_key' => module_config::c('social_twitter_api_key', ''), 'consumer_secret' => module_config::c('social_twitter_api_secret', ''), 'user_agent' => 'UCM Twitter 0.1'), $config);
parent::__construct($this->config);
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:5,代码来源:twitter_account_connect.php
示例14: array
</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
$fieldset_data = array('heading' => array('title' => _l('Invoice Payment History'), 'type' => 'h3'), 'elements_before' => ob_get_clean());
echo module_form::generate_fieldset($fieldset_data);
unset($fieldset_data);
if (class_exists('module_finance', false) && module_finance::is_plugin_enabled() && module_finance::can_i('view', 'Finance') && module_finance::is_enabled() && is_file('includes/plugin_finance/pages/finance_invoice_edit.php') && module_config::c('invoice_show_finances', 1)) {
include 'includes/plugin_finance/pages/finance_invoice_edit.php';
}
}
// invoice_id check
hook_handle_callback('layout_column_half', 'end');
$form_actions = array('class' => 'action_bar action_bar_left', 'elements' => array(array('type' => 'save_button', 'name' => 'butt_save', 'onclick' => "\$('#form_redirect').val('" . (!$invoice_id && isset($_REQUEST['job_id']) && (int) $_REQUEST['job_id'] > 0 ? module_job::link_open($_REQUEST['job_id']) : module_invoice::link_open(false)) . "');", 'value' => _l('Save and Return')), array('type' => 'save_button', 'name' => 'butt_save', 'value' => _l('Save'))));
if ((int) $invoice_id) {
if ($invoice['date_paid'] && $invoice['date_paid'] != '0000-00-00') {
$form_actions['elements'][] = array('type' => 'save_button', 'class' => 'submit_button', 'name' => 'butt_email', 'value' => _l('Email Receipt'));
} else {
$form_actions['elements'][] = array('type' => 'submit', 'class' => 'submit_button', 'name' => 'butt_email', 'value' => _l('Email Invoice'));
}
if (function_exists('convert_html2pdf')) {
if (!module_invoice::can_i('edit', 'Invoices')) {
$form_actions['elements'][] = array('type' => 'button', 'class' => 'submit_button no_permissions', 'name' => 'butt_print', 'value' => _l('Print PDF'), 'onclick' => "window.location.href='" . module_invoice::link_public_print($invoice_id) . "';");
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:invoice_admin_edit.php
示例15: 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
* Package Date: 2015-11-25 02:55:20
* IP Address: 67.79.165.254
*/
// UPDATE:::: to modify this layout please now go to Settings > Templates and look for "invoice_payment_history"
if (module_config::c('invoice_show_payment_history', 1)) {
$payment_historyies = module_invoice::get_invoice_payments($invoice_id);
foreach ($payment_historyies as $invoice_payment_id => $invoice_payment_data) {
if (module_config::c('invoice_hide_pending_payments', 1)) {
if (!trim($invoice_payment_data['date_paid']) || $invoice_payment_data['date_paid'] == '0000-00-00') {
unset($payment_historyies[$invoice_payment_id]);
}
}
}
if (count($payment_historyies)) {
ob_start();
?>
<table cellpadding="4" cellspacing="0" class="table tableclass tableclass_rows" style="width: 100%" id="invoice_payment_history">
<thead>
<tr class="task_header">
<th>{l:Payment Date}</th>
<th>{l:Payment Method}</th>
<th>{l:Details}</th>
<th>{l:Amount}</th>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:invoice_payment_history.php
示例16: isset
<td><?php
echo isset($row['amount_paid_link']) ? $row['amount_paid_link'] : $row['amount_paid'];
?>
</td>
<?php
if (module_finance::is_expense_enabled()) {
?>
<td><?php
echo isset($row['amount_spent_link']) ? $row['amount_spent_link'] : $row['amount_spent'];
?>
</td>
<?php
}
?>
<?php
if (class_exists('module_envato', false) && module_config::c('envato_include_in_dashbaord', 1)) {
?>
<td><?php
echo isset($row['envato_earnings_link']) ? $row['envato_earnings_link'] : $row['envato_earnings'];
?>
</td>
<?php
}
?>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:dashboard_summary_widgets.php
示例17: calculate_fee
public static function calculate_fee($invoice_id, $invoice_data, $payment_amount, $options)
{
/* options array(
'percent' => $fee_percent,
'amount' => $fee_amount,
'description' => $fee_description,
) */
if (module_config::c('invoice_fee_calculate_reverse', 0)) {
$fee_total = round(($payment_amount + (isset($options['amount']) ? $options['amount'] : 0)) / (isset($options['percent']) ? 1 - $options['percent'] / 100 : 1), 2) - $payment_amount;
} else {
$fee_total = round($payment_amount * ((isset($options['percent']) ? $options['percent'] : 0) / 100) + (isset($options['amount']) ? $options['amount'] : 0), 2);
}
// do we add in taxes ? nfi. for not - no
return $fee_total;
}
开发者ID:sgh1986915,项目名称:php-crm,代码行数:15,代码来源:invoice.php
示例18: _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
示例19: unset
?>
</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
示例20: 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
注:本文中的module_config类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论