本文整理汇总了PHP中module_config::s方法的典型用法代码示例。如果您正苦于以下问题:PHP module_config::s方法的具体用法?PHP module_config::s怎么用?PHP module_config::s使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module_config
的用法示例。
在下文中一共展示了module_config::s方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
echo _BASE_HREF;
?>
css/desktop.css?ver=5" type="text/css" />
<link type="text/css" href="<?php
echo _BASE_HREF;
?>
css/smoothness/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" />
<?php
module_config::print_css();
?>
<script language="javascript" type="text/javascript">
<?php
switch (strtolower(module_config::s('date_format', 'd/m/Y'))) {
case 'd/m/y':
$js_cal_format = 'dd/mm/yy';
break;
case 'y/m/d':
$js_cal_format = 'yy/mm/dd';
break;
case 'm/d/y':
$js_cal_format = 'mm/dd/yy';
break;
default:
$js_cal_format = 'yy-mm-dd';
}
?>
var js_cal_format = '<?php
示例2: hook_handle_callback
</table>
<?php
hook_handle_callback('forgot_password_screen');
?>
</form>
<?php
} else {
?>
<h2><?php
echo _l('Please Login');
?>
</h2>
<p align="center"><?php
echo _l('Welcome to %s - Please Login Below', module_config::s('admin_system_name'));
?>
</p>
<table align="center">
<tr>
<td width="65" valign="top">
<img src="<?php
echo _BASE_HREF;
?>
images/lock.png" alt="lock" />
</td>
<td>
示例3: renew_invoice
public function renew_invoice($invoice_id)
{
$invoice = $this->get_invoice($invoice_id);
if (strtotime($invoice['date_renew']) <= strtotime('+' . module_config::c('alert_days_in_future', 5) . ' days')) {
// /we are allowed to renew.
unset($invoice['invoice_id']);
// work out the difference in start date and end date and add that new renewl date to the new order.
$time_diff = strtotime($invoice['date_renew']) - strtotime($invoice['date_create']);
if ($time_diff > 0) {
// our renewal date is something in the future.
if (!$invoice['date_create'] || $invoice['date_create'] == '0000-00-00') {
set_message('Please set a invoice create date before renewing');
redirect_browser($this->link_open($invoice_id));
}
// if the time_diff is 28, 29, 30 or 31 days then we stick to the same day a month in the future.
if (module_config::c('invoice_renew_monthly_fix', 1) && $time_diff >= 2419100 && $time_diff <= 2678500) {
$new_renewal_date = date('Y-m-d', strtotime("+1 month", strtotime($invoice['date_renew'])));
} else {
// work out the next renewal date.
$new_renewal_date = date('Y-m-d', strtotime($invoice['date_renew']) + $time_diff);
}
$invoice['name'] = self::new_invoice_number($invoice['customer_id']);
$invoice['date_create'] = $invoice['date_renew'];
$invoice['date_renew'] = $new_renewal_date;
$invoice['date_sent'] = false;
$invoice['date_paid'] = false;
$invoice['deposit_job_id'] = 0;
if (module_config::c('invoice_renew_discounts', 0)) {
// keep the discounts from previous invoices.
} else {
// clear the discounts back to defaults.
$invoice['discount_amount'] = 0;
$invoice['discount_description'] = _l('Discount:');
$invoice['discount_type'] = !isset($invoice['discount_type']) ? module_config::c('invoice_discount_type', _DISCOUNT_TYPE_BEFORE_TAX) : $invoice['discount_type'];
// 1 = After Tax
}
$invoice['tax_type'] = !isset($invoice['tax_type']) ? module_config::c('invoice_tax_type', 0) : $invoice['tax_type'];
$invoice['date_due'] = date('Y-m-d', strtotime('+' . module_config::c('invoice_due_days', 30) . ' days', strtotime($invoice['date_create'])));
$invoice['status'] = module_config::s('invoice_status_default', 'New');
// todo: copy the "more" listings over to the new invoice
// todo: copy any notes across to the new listing.
// hack to copy the 'extra' fields across to the new invoice.
// save_invoice() does the extra handling, and if we don't do this
// then it will move the extra fields from the original invoice to this new invoice.
if (class_exists('module_extra', false) && module_extra::is_plugin_enabled()) {
$owner_table = 'invoice';
// get extra fields from this invoice
$extra_fields = module_extra::get_extras(array('owner_table' => $owner_table, 'owner_id' => $invoice_id));
$x = 1;
foreach ($extra_fields as $extra_field) {
$_REQUEST['extra_' . $owner_table . '_field']['new' . $x] = array('key' => $extra_field['extra_key'], 'val' => $extra_field['extra']);
$x++;
}
}
// taxes copy across
if (isset($invoice['taxes']) && is_array($invoice['taxes'])) {
$invoice['tax_ids'] = array();
$invoice['tax_names'] = array();
$invoice['tax_percents'] = array();
foreach ($invoice['taxes'] as $tax) {
$invoice['tax_ids'][] = 0;
$invoice['tax_names'][] = $tax['name'];
$invoice['tax_percents'][] = $tax['percent'];
if ($tax['increment']) {
$invoice['tax_increment_checkbox'] = 1;
}
}
}
$new_invoice_id = $this->save_invoice('new', $invoice);
if ($new_invoice_id) {
// now we create the tasks
$tasks = $this->get_invoice_items($invoice_id);
foreach ($tasks as $task) {
unset($task['invoice_item_id']);
if ($task['custom_description']) {
$task['description'] = $task['custom_description'];
}
if ($task['custom_long_description']) {
$task['long_description'] = $task['custom_long_description'];
}
$task['invoice_id'] = $new_invoice_id;
$task['date_done'] = $invoice['date_create'];
update_insert('invoice_item_id', 'new', 'invoice_item', $task);
}
// link this up with the old one.
update_insert('invoice_id', $invoice_id, 'invoice', array('renew_invoice_id' => $new_invoice_id));
}
module_cache::clear('invoice');
return $new_invoice_id;
}
}
return false;
}
示例4: get_payment_method_name
public static function get_payment_method_name()
{
return module_config::s('payment_method_multisafepay_label', 'MultiSafepay');
}
示例5: render
public function render($type = 'html', $options = array())
{
ob_start();
switch ($type) {
case 'pretty_html':
// header and footer so plain contnet can be rendered nicely.
$display_mode = get_display_mode();
// addition - woah! we pass this through to the template module for re-rending again:
ob_start();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{PAGE_TITLE}</title>
{FAVICON}
{AUTOMATIC_STYLES}
{AUTOMATIC_SCRIPTS}
<style type="text/css">
body{
margin:0;
}
</style>
</head>
<body>
<div class="pretty_content_wrap">
{CONTENT}
</div>
</body>
</html>
<?php
/*$c = $this->replace_content();
if(!$this->wysiwyg){
//$c = nl2br($c);
}
echo $c;*/
module_template::init_template('external_template', ob_get_clean(), 'Used when displaying the external content such as "External Jobs" and "External Invoices" and "External Tickets".', 'code', array('CONTENT' => 'The inner content', 'PAGE_TITLE' => 'in the <title> tag', 'FAVICON' => 'if the theme specifies a favicon it will be here', 'AUTOMATIC_STYLES' => 'system generated stylesheets', 'AUTOMATIC_SCRIPTS' => 'system generated javascripts'));
ob_start();
?>
<link rel="stylesheet" href="<?php
echo _BASE_HREF;
?>
css/desktop.css" type="text/css">
<link rel="stylesheet" href="<?php
echo _BASE_HREF;
?>
css/print.css" type="text/css" media="print">
<link rel="stylesheet" href="<?php
echo _BASE_HREF;
?>
css/styles.css" type="text/css">
<link type="text/css" href="<?php
echo _BASE_HREF;
?>
css/smoothness/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" />
<?php
module_config::print_css();
?>
<?php
$css = ob_get_clean();
ob_start();
?>
<script type="text/javascript" src="<?php
echo _BASE_HREF;
?>
js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="<?php
echo _BASE_HREF;
?>
js/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" src="<?php
echo _BASE_HREF;
?>
js/timepicker.js"></script>
<script type="text/javascript" src="<?php
echo _BASE_HREF;
?>
js/cookie.js"></script>
<script type="text/javascript" src="<?php
echo _BASE_HREF;
?>
js/javascript.js?ver=2"></script>
<?php
module_config::print_js();
?>
<?php
$scripts = ob_get_clean();
$external_template = self::get_template_by_key('external_template');
$external_template->assign_values(array('CONTENT' => $this->replace_content(), 'PAGE_TITLE' => $this->page_title ? $this->page_title : module_config::s('admin_system_name'), 'FAVICON' => module_theme::get_config('theme_favicon', '') ? '<link rel="icon" href="' . htmlspecialchars(module_theme::get_config('theme_favicon', '')) . '">' : '', 'AUTOMATIC_STYLES' => $css, 'AUTOMATIC_SCRIPTS' => $scripts));
echo $external_template->render('raw');
break;
case 'html':
default:
$c = $this->replace_content();
if ($this->wysiwyg) {
//$c = nl2br($c);
}
echo $c;
//.........这里部分代码省略.........
示例6: get_quote
public static function get_quote($quote_id, $full = true, $skip_permissions = false)
{
$quote_id = (int) $quote_id;
if ($quote_id <= 0) {
$quote = array();
} else {
$cache_key = self::_quote_cache_key($quote_id, array($quote_id, $full, $skip_permissions));
if ($cached_item = module_cache::get('quote', $cache_key)) {
if (function_exists('hook_filter_var')) {
$cached_item = hook_filter_var('get_quote', $cached_item, $quote_id);
}
return $cached_item;
}
$cache_key_full = self::_quote_cache_key($quote_id, array($quote_id, true, $skip_permissions));
if ($cache_key_full != $cache_key && ($cached_item = module_cache::get('quote', $cache_key_full))) {
if (function_exists('hook_filter_var')) {
$cached_item = hook_filter_var('get_quote', $cached_item, $quote_id);
}
return $cached_item;
}
$cache_timeout = module_config::c('cache_objects', 60);
$quote = get_single("quote", "quote_id", $quote_id);
}
// check permissions
if ($quote && isset($quote['quote_id']) && $quote['quote_id'] == $quote_id) {
switch (self::get_quote_access_permissions()) {
case _QUOTE_ACCESS_ALL:
break;
case _QUOTE_ACCESS_ASSIGNED:
// only assigned quotes!
$has_quote_access = false;
if ($quote['user_id'] == module_security::get_loggedin_id()) {
$has_quote_access = true;
break;
}
$tasks = module_quote::get_tasks($quote['quote_id']);
foreach ($tasks as $task) {
if ($task['user_id'] == module_security::get_loggedin_id()) {
$has_quote_access = true;
break;
}
}
unset($tasks);
if (!$has_quote_access) {
if ($skip_permissions) {
$quote['_no_access'] = true;
// set a flag for custom processing. we check for this when calling get_customer with the skip permissions argument. (eg: in the ticket file listing link)
} else {
$quote = false;
}
}
break;
case _QUOTE_ACCESS_CUSTOMER:
// tie in with customer permissions to only get quotes from customers we can access.
$customers = module_customer::get_customers();
$has_quote_access = false;
if (isset($customers[$quote['customer_id']])) {
$has_quote_access = true;
}
/*foreach($customers as $customer){
// todo, if($quote['customer_id'] == 0) // ignore this permission
if($customer['customer_id']==$quote['customer_id']){
$has_quote_access = true;
break;
}
}*/
unset($customers);
if (!$has_quote_access) {
if ($skip_permissions) {
$quote['_no_access'] = true;
// set a flag for custom processing. we check for this when calling get_customer with the skip permissions argument. (eg: in the ticket file listing link)
} else {
$quote = false;
}
}
break;
}
if (!$quote) {
$quote = array();
if (function_exists('hook_filter_var')) {
$quote = hook_filter_var('get_quote', $quote, $quote_id);
}
return $quote;
}
$quote['taxes'] = get_multiple('quote_tax', array('quote_id' => $quote_id), 'quote_tax_id', 'exact', 'order');
}
if (!$full) {
if (isset($cache_key)) {
module_cache::put('quote', $cache_key, $quote, $cache_timeout);
}
if (function_exists('hook_filter_var')) {
$quote = hook_filter_var('get_quote', $quote, $quote_id);
}
return $quote;
}
if (!$quote) {
$customer_id = 0;
if (isset($_REQUEST['customer_id']) && $_REQUEST['customer_id']) {
//
$customer_id = (int) $_REQUEST['customer_id'];
//.........这里部分代码省略.........
示例7: get_website
public static function get_website($website_id)
{
$website = get_single("website", "website_id", $website_id);
if ($website) {
switch (module_customer::get_customer_data_access()) {
case _CUSTOMER_ACCESS_ALL:
// all customers! so this means all jobs!
break;
case _CUSTOMER_ACCESS_ALL_COMPANY:
case _CUSTOMER_ACCESS_CONTACTS:
case _CUSTOMER_ACCESS_STAFF:
$valid_customer_ids = module_security::get_customer_restrictions();
$is_valid_website = isset($valid_customer_ids[$website['customer_id']]);
if (!$is_valid_website) {
$website = false;
}
break;
case _CUSTOMER_ACCESS_TASKS:
// only customers who have linked jobs that I am assigned to.
$has_job_access = false;
if (isset($website['customer_id']) && $website['customer_id']) {
$jobs = module_job::get_jobs(array('customer_id' => $website['customer_id']));
foreach ($jobs as $job) {
if ($job['user_id'] == module_security::get_loggedin_id()) {
$has_job_access = true;
break;
}
$tasks = module_job::get_tasks($job['job_id']);
foreach ($tasks as $task) {
if ($task['user_id'] == module_security::get_loggedin_id()) {
$has_job_access = true;
break;
}
}
}
}
if (!$has_job_access) {
$website = false;
}
break;
}
}
if (!$website) {
$website = array('website_id' => 'new', 'customer_id' => isset($_REQUEST['customer_id']) ? $_REQUEST['customer_id'] : 0, 'name' => '', 'status' => module_config::s('website_status_default', 'New'), 'url' => '');
}
return $website;
}
示例8: unset
}else{
$inner_content .= $this_content;
}
unset($this_content);*/
unset($load_page);
if ($display_mode == 'iframe' || $display_mode == 'ajax') {
break;
}
}
} catch (Exception $e) {
$inner_content[] = 'Error: ' . $e->getMessage();
}
// combine any inner content together looking for place holders.
$page_title = trim(preg_replace('#' . preg_quote($page_title_delim, '#') . '\\s*$#', '', $page_title));
if (!trim($page_title)) {
$page_title = htmlspecialchars(module_config::s('admin_system_name', 'Ultimate Client Manager'));
}
if ($page_unique_id && function_exists('newrelic_name_transaction')) {
newrelic_name_transaction('Admin: ' . $page_unique_id);
if (function_exists('newrelic_capture_params')) {
newrelic_capture_params();
}
}
if (_DEBUG_MODE) {
module_debug::log(array('title' => 'Displaying contents: ', 'data' => ''));
}
require_once module_theme::include_ucm("design_header.php");
echo implode('', $inner_content);
require_once module_theme::include_ucm("design_footer.php");
if (_DEBUG_MODE) {
module_debug::log(array('title' => 'Finished displaying contents, running finish hook ', 'data' => ''));
示例9: send_admin_alert
public static function send_admin_alert($ticket_id, $message = '', $allow_to_cc_bcc = false)
{
module_cache::clear('ticket');
$ticket_data = self::get_ticket($ticket_id);
$ticket_account_data = self::get_ticket_account($ticket_data['ticket_account_id']);
$ticket_number = self::ticket_number($ticket_id);
if ($ticket_data['last_ticket_message_id']) {
$last_message = self::get_ticket_message($ticket_data['last_ticket_message_id']);
if (!$message) {
$htmlmessage = trim($last_message['htmlcontent']);
if ($htmlmessage) {
$message = $htmlmessage;
} else {
$message = nl2br(htmlspecialchars(trim($last_message['content'])));
}
}
} else {
$last_message = false;
}
$to = module_config::c('ticket_admin_email_alert', _ERROR_EMAIL);
$to_user_id = 0;
$cc = false;
if (module_config::c('ticket_auto_notify_staff', 0) && $ticket_data['assigned_user_id']) {
$staff = module_user::get_user($ticket_data['assigned_user_id'], false);
if ($staff && $staff['user_id'] == $ticket_data['assigned_user_id'] && $staff['email']) {
$cc = $to;
$to = $staff['email'];
$to_user_id = $staff['user_id'];
}
}
if (strlen($to) < 4) {
return;
}
// do we only send this on first emails or not ?
$first_only = module_config::c('ticket_admin_alert_first_only', 0);
if ($first_only && $ticket_data['message_count'] > 1) {
return;
}
$s = self::get_statuses();
$reply_line = module_config::s('ticket_reply_line', '----- (Please reply above this line) -----');
// autoreplies go back to the user - not our admin system:
$from_user_a = module_user::get_user($ticket_data['user_id'], false);
$reply_to_address = $from_user_a['email'];
$reply_to_name = $from_user_a['name'];
$template = module_template::get_template_by_key('ticket_admin_email');
$template->assign_values(self::get_replace_fields($ticket_id, $ticket_data));
$template->assign_values(array('ticket_number' => self::ticket_number($ticket_id), 'ticket_status' => $s[$ticket_data['status_id']], 'message' => $message, 'subject' => $ticket_data['subject'], 'position_current' => $ticket_data['position'], 'position_all' => $ticket_data['total_pending'], 'reply_line' => $reply_line, 'days' => module_config::c('ticket_turn_around_days', 5), 'url' => self::link_public($ticket_id), 'url_admin' => self::link_open($ticket_id), 'message_count' => $ticket_data['message_count'], 'ticket_url_cancel' => module_ticket::link_public_status($ticket_id, 7), 'ticket_url_resolved' => module_ticket::link_public_status($ticket_id, _TICKET_STATUS_RESOLVED_ID), 'ticket_url_inprogress' => module_ticket::link_public_status($ticket_id, 5), 'faq_product_id' => $ticket_data['faq_product_id']));
$content = $template->replace_content();
$email = module_email::new_email();
$email->replace_values = $template->values;
if ($to_user_id) {
$email->set_to('user', $to_user_id);
} else {
$email->set_to_manual($to);
}
if ($cc) {
$email->set_cc_manual($cc);
}
if ($ticket_account_data && $ticket_account_data['email']) {
$email->set_from_manual($ticket_account_data['email'], $ticket_account_data['name']);
$email->set_bounce_address($ticket_account_data['email']);
} else {
$email->set_from_manual($to, module_config::s('admin_system_name'));
$email->set_bounce_address($to);
}
//$email->set_from('user',$from_user_id);
//$email->set_from('foo','foo',$to,'Admin');
$headers = $last_message ? @unserialize($last_message['cache']) : false;
if ($allow_to_cc_bcc && $headers && is_array($headers)) {
// we're right to do our cc/bcc hack
if ($headers && isset($headers['to_emails'])) {
foreach ($headers['to_emails'] as $to_emails) {
if (isset($to_emails['address']) && strlen($to_emails['address'])) {
$email->set_to_manual($to_emails['address'], isset($to_emails['name']) ? $to_emails['name'] : '');
}
}
}
if ($headers && isset($headers['cc_emails'])) {
foreach ($headers['cc_emails'] as $cc_emails) {
if (isset($cc_emails['address']) && strlen($cc_emails['address'])) {
$email->set_cc_manual($cc_emails['address'], isset($cc_emails['name']) ? $cc_emails['name'] : '');
}
}
}
if ($headers && isset($headers['bcc_emails'])) {
foreach ($headers['bcc_emails'] as $bcc_emails) {
if (isset($bcc_emails['address']) && strlen($bcc_emails['address'])) {
$email->set_bcc_manual($bcc_emails['address'], isset($bcc_emails['name']) ? $bcc_emails['name'] : '');
}
}
}
}
// do we reply to the user who created this, or to our ticketing system?
if (module_config::c('ticket_admin_alert_postback', 1) && $ticket_account_data && $ticket_account_data['email']) {
$email->set_reply_to($ticket_account_data['email'], $ticket_account_data['name']);
} else {
$email->set_reply_to($reply_to_address, $reply_to_name);
}
if ($last_message && $last_message['private_message']) {
$email->set_subject(sprintf(module_config::c('ticket_private_message_email_subject', 'Private Support Ticket Message: [TICKET:%s]'), $ticket_number));
//.........这里部分代码省略.........
示例10: date
case 'normal':
default:
?>
</div> <!-- end .inner -->
</div> <!-- end .outer -->
</div> <!-- end .content -->
</div>
<!-- /#wrap -->
<div id="footer">
<p>© <?php
echo module_config::s('admin_system_name', 'Ultimate Client Manager');
?>
- <?php
echo date("Y");
?>
- Version: <?php
echo module_config::current_version();
?>
- Time: <?php
echo round(microtime(true) - $start_time, 5);
?>
</p>
示例11: htmlspecialchars
* 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 ($header_logo = module_theme::get_config('theme_logo', _BASE_HREF . 'images/logo.png')) {
?>
<div class="text-center logo-box">
<img src="<?php
echo htmlspecialchars($header_logo);
?>
" border="0"
title="<?php
echo htmlspecialchars(module_config::s('header_title', 'UCM'));
?>
">
</div>
<?php
}
?>
<?php
if (isset($_REQUEST['signup']) && module_config::c('customer_signup_on_login', 0)) {
?>
<div id="signup" class="tab-pane">
示例12: update_job_completion_status
private static function update_job_completion_status($job_id)
{
module_cache::clear('job');
//module_cache::clear_cache();
$data = self::save_job_cache($job_id);
$return_status = $data['status'];
$tasks = self::get_tasks($job_id);
$all_completed = count($tasks) > 0;
foreach ($tasks as $task) {
if (module_config::c('job_task_log_all_hours', 1) && $task['fully_completed'] || !module_config::c('job_task_log_all_hours', 1) && ($task['fully_completed'] || $task['hours'] > 0 && $task['completed'] >= $task['hours'] || $task['hours'] <= 0 && $task['completed'] > 0)) {
// this one is done!
} else {
$all_completed = false;
break;
}
}
if ($all_completed) {
if (!isset($data['date_completed']) || !$data['date_completed'] || $data['date_completed'] == '0000-00-00') {
// update, dont complete if no tasks.
//if(count($tasks)){
$return_status = $data['status'] == module_config::s('job_status_default', 'New') ? _l('Completed') : $data['status'];
update_insert("job_id", $job_id, "job", array('date_completed' => date('Y-m-d'), 'status' => $return_status));
//}
}
} else {
// not completed. remove compelted date and reset the job status
$return_status = $data['status'] == _l('Completed') ? module_config::s('job_status_default', 'New') : $data['status'];
update_insert("job_id", $job_id, "job", array('date_completed' => '0000-00-00', 'status' => $return_status));
}
module_cache::clear('job');
return $return_status;
}
示例13: _l
</td>
<td valign="top">
<h3><?php
echo _l('Ticket Messages');
?>
</h3>
<div id="ticket_container" style="<?php
echo module_config::c('ticket_scroll', 0) ? ' max-height: 400px; overflow-y:auto;' : '';
?>
">
<?php
$ticket_messages = module_ticket::get_ticket_messages($ticket_id);
$reply__ine_default = '----- (Please reply above this line) -----';
// incase they change it
$reply__ine = module_config::s('ticket_reply_line', $reply__ine_default);
$ticket_message_count = count($ticket_messages);
$ticket_message_counter = 0;
foreach ($ticket_messages as $ticket_message) {
if ($ticket_message['private_message']) {
continue;
}
$ticket_message_counter++;
$attachments = module_ticket::get_ticket_message_attachments($ticket_message['ticket_message_id']);
?>
<div class="ticket_message ticket_message_<?php
//echo $ticket['user_id'] == $ticket_message['from_user_id'] ? 'creator' : 'admin';
echo !isset($admins_rel[$ticket_message['from_user_id']]) ? 'creator' : 'admin';
?>
">
示例14: array
$widget_columns[3] = array(1 => array(), 2 => array(), 3 => array());
// then display the welcome message:
module_template::init_template('welcome_message', '<p>
Hi {USER_NAME}, and Welcome to {SYSTEM_NAME}
</p>', 'Welcome message on Dashboard', array('USER_NAME' => 'Current user name', 'SYSTEM_NAME' => 'System name from settings area'));
// check if there is a template for this user role.
$my_account = module_user::get_user(module_security::get_loggedin_id());
$security_role = current($my_account['roles']);
$template = false;
if ($security_role && isset($security_role['security_role_id'])) {
$template = module_template::get_template_by_key('welcome_message_role_' . $security_role['security_role_id']);
}
if (!$template || !$template->template_key) {
$template = module_template::get_template_by_key('welcome_message');
}
$template->assign_values(array('user_name' => htmlspecialchars($_SESSION['_user_name']), 'system_name' => htmlspecialchars(module_config::s('admin_system_name'))));
$widget_sort_json = @json_decode(module_config::c('dash_widgets_sort_' . module_security::get_loggedin_id()), true);
if (!is_array($widget_sort_json)) {
$widget_sort_json = array();
}
$widget_sort_order = array();
$widget_sort_page_order = 1;
foreach ($widget_sort_json as $id => $vals) {
$bits = explode('|', $vals);
if (count($bits) == 3) {
$widget_sort_order[$bits[2]] = array('column' => $bits[0], 'column_number' => $bits[1], 'page_order' => $widget_sort_page_order++);
}
}
$widget_sort_id = 1;
// then display the alerts list.
if (module_config::c('dashboard_new_layout', 1) && class_exists('module_dashboard', false) && module_security::can_user(module_security::get_loggedin_id(), 'Show Dashboard Alerts')) {
示例15: htmlspecialchars
" class="navbar-brand"><img src="<?php
echo htmlspecialchars($header_logo);
?>
" border="0" title="<?php
echo htmlspecialchars(module_config::s('header_title', 'UCM'));
?>
"></a>
<?php
} else {
?>
<a href="<?php
echo _BASE_HREF;
?>
" class="navbar-brand"><?php
echo module_config::s('header_title', 'UCM');
?>
</a>
<?php
}
?>
</header>
<?php
/*if (module_security::getcred()){ ?>
<div class="topnav">
<div class="btn-toolbar">
<!-- <div class="btn-group">