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


PHP module_security::get_loggedin_name方法代码示例

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


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

示例1: die

    die('failed');
}
if (!module_quote::can_i('edit', 'Quotes')) {
    die('no perms');
}
$quote_id = (int) $_REQUEST['quote_id'];
$quote = module_quote::get_quote($quote_id);
// template for sending emails.
// are we sending the paid one? or the dueone.
//$template_name = 'quote_email';
$template_name = isset($_REQUEST['template_name']) ? $_REQUEST['template_name'] : 'quote_email';
$template = module_template::get_template_by_key($template_name);
$quote['total_amount_print'] = dollar($quote['total_amount'], true, $quote['currency_id']);
$quote['total_amount_due_print'] = dollar($quote['total_amount_due'], true, $quote['currency_id']);
$quote['quote_name'] = $quote['name'];
$quote['from_name'] = module_security::get_loggedin_name();
$quote['quote_url'] = module_quote::link_public($quote_id);
ob_start();
include module_theme::include_ucm('includes/plugin_quote/template/quote_task_list.php');
$public_html = ob_get_clean();
$quote['task_list'] = $public_html;
/*ob_start();
$quote_data = $quote;
$ignore_task_hook=true;
$for_email=true;
include('quote_public.php');
$quote['quote_tasks'] = ob_get_clean();*/
// generate the PDF ready for sending.
$pdf = module_quote::generate_pdf($quote_id);
// find available "to" recipients.
// customer contacts.
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:quote_admin_email.php

示例2: isset

} else {
    if ($invoice['date_paid'] && $invoice['date_paid'] != '0000-00-00') {
        $original_template_name = $template_name = $template_prefix . '_paid';
    } else {
        if ($invoice['overdue'] && $invoice['date_sent'] && $invoice['date_sent'] != '0000-00-00') {
            $original_template_name = $template_name = $template_prefix . '_overdue';
        } else {
            $original_template_name = $template_name = $template_prefix . '_due';
        }
    }
}
$template_name = isset($_REQUEST['template_name']) ? $_REQUEST['template_name'] : $template_name;
$template_name = hook_filter_var('invoice_email_template', $template_name, $invoice_id, $invoice);
$template = module_template::get_template_by_key($template_name);
$replace = module_invoice::get_replace_fields($invoice_id, $invoice);
$replace['from_name'] = module_security::get_loggedin_name();
// generate the PDF ready for sending.
$pdf = module_invoice::generate_pdf($invoice_id);
// find available "to" recipients.
// customer contacts.
$to_select = false;
$to = array();
if ($invoice['customer_id']) {
    $customer = module_customer::get_customer($invoice['customer_id']);
    $replace['customer_name'] = $customer['customer_name'];
    if ($invoice['user_id']) {
        $primary = module_user::get_user($invoice['user_id']);
        if ($primary) {
            $to_select = $primary['email'];
        }
    } else {
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:invoice_admin_email.php

示例3: die

<?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 (!$ticket_safe) {
    die('failed');
}
$ticket_id = (int) $_REQUEST['ticket_id'];
$ticket = module_ticket::get_ticket($ticket_id);
print_heading(_l('Notify Staff About Ticket: %s', module_ticket::ticket_number($ticket['ticket_id'])));
// template for sending emails.
// are we sending the paid one? or the dueone.
$template = module_template::get_template_by_key('ticket_email_notify');
$ticket['ticket_number'] = module_ticket::ticket_number($ticket['ticket_id']);
$ticket['from_name'] = module_security::get_loggedin_name();
$ticket['ticket_url'] = module_ticket::link_open($ticket_id);
$ticket['ticket_subject'] = $ticket['subject'];
// sending to the staff member.
$to = module_user::get_user($ticket['assigned_user_id']);
$ticket['staff_name'] = $to['name'] . ' ' . $to['last_name'];
$to = array($to);
$template->assign_values($ticket);
module_email::print_compose(array('to' => $to, 'bcc' => module_config::c('admin_email_address', ''), 'content' => $template->render('html'), 'subject' => $template->replace_description(), 'success_url' => module_ticket::link_open($ticket_id), 'cancel_url' => module_ticket::link_open($ticket_id)));
开发者ID:sgh1986915,项目名称:php-crm,代码行数:30,代码来源:ticket_admin_notify.php

示例4: 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

示例5: save_ticket


//.........这里部分代码省略.........
                         $ticket_data_key_value = module_encrypt::save_encrypt_value($available_extra_fields[$ticket_data_key_id]['encrypt_key_id'], $ticket_data_key_value, $page_name, $input_id);
                     }
                     // check for existing
                     $existing = get_single('ticket_data', array('ticket_id', 'ticket_data_key_id'), array($ticket_id, $ticket_data_key_id));
                     if ($existing) {
                         update_insert('ticket_data_id', $existing['ticket_data_id'], 'ticket_data', array('value' => $ticket_data_key_value));
                     } else {
                         update_insert('ticket_data_id', 'new', 'ticket_data', array('ticket_data_key_id' => $ticket_data_key_id, 'ticket_id' => $ticket_id, 'value' => $ticket_data_key_value));
                     }
                 }
             }
         }
         $ticket_message_id = false;
         if (isset($data['new_ticket_message']) && strlen($data['new_ticket_message']) > 1) {
             // post a new reply to this message.
             // who are we replying to?
             $ticket_data = $this->get_ticket($ticket_id);
             if (isset($data['change_status_id']) && $data['change_status_id']) {
                 update_insert("ticket_id", $ticket_id, "ticket", array('status_id' => $data['change_status_id']));
             } else {
                 if ($ticket_data['status_id'] == _TICKET_STATUS_RESOLVED_ID || $ticket_data['status_id'] == 7) {
                     $data['change_status_id'] = _TICKET_STATUS_IN_PROGRESS_ID;
                     // change to in progress.
                 }
             }
             module_cache::clear('ticket');
             // it's either a reply from the admin, or from the user via the web interface.
             $ticket_data = $this->get_ticket($ticket_id);
             $logged_in_user = isset($data['force_logged_in_user_id']) ? $data['force_logged_in_user_id'] : false;
             if (!$logged_in_user) {
                 $logged_in_user = module_security::get_loggedin_id();
                 if (!$logged_in_user) {
                     $logged_in_user = $ticket_data['user_id'];
                 }
             }
             if (!$ticket_data['user_id'] && module_security::get_loggedin_id()) {
                 update_insert('ticket_id', $ticket_id, 'ticket', array('user_id' => module_security::get_loggedin_id()));
                 $ticket_data['user_id'] = module_security::get_loggedin_id();
             }
             $ticket_creator = $ticket_data['user_id'];
             // echo "creator: $ticket_creator logged in: $logged_in_user"; print_r($ticket_data);exit;
             //echo "Creator: ".$ticket_data['user_id'] . " logged in ".$logged_in_user;exit;
             if ($ticket_creator == $logged_in_user) {
                 // we are sending a reply back to the admin, from the end user.
                 self::mark_as_unread($ticket_id);
                 $ticket_message_id = $this->send_reply($ticket_id, $data['new_ticket_message'], $ticket_creator, $ticket_data['assigned_user_id'] ? $ticket_data['assigned_user_id'] : module_config::c('ticket_default_user_id', 1), 'end_user', '', array('private_message' => isset($data['private_message']) && $data['private_message']));
             } else {
                 // we are sending a reply back to the ticket user.
                 // admin is allowed to change the status of a message.
                 $from_user_id = $ticket_data['assigned_user_id'] ? $ticket_data['assigned_user_id'] : module_security::get_loggedin_id();
                 //echo "From $from_user_id to $ticket_creator ";exit;
                 $ticket_message_id = $this->send_reply($ticket_id, $data['new_ticket_message'], $from_user_id, $ticket_creator, 'admin', '', array('private_message' => isset($data['private_message']) && $data['private_message']));
                 // do we add cc/bcc here?
             }
             if ($ticket_message_id && isset($data['change_status_id']) && $data['change_status_id']) {
                 // store the ticket status change here.
                 update_insert("ticket_message_id", $ticket_message_id, "ticket_message", array('status_id' => $data['change_status_id']));
             }
         }
         if (isset($data['change_status_id']) && $data['change_status_id']) {
             // we only update this status if the sent reply or send reply and next buttons are clicked.
             if (isset($_REQUEST['newmsg']) || isset($_REQUEST['newmsg_next'])) {
                 update_insert("ticket_id", $ticket_id, "ticket", array('status_id' => $data['change_status_id']));
             }
         }
     }
     module_extra::save_extras('ticket', 'ticket_id', $ticket_id);
     // automaticall send notification email to assigned staff membeR?
     if (module_config::c('ticket_auto_notify_staff', 0)) {
         module_cache::clear('ticket');
         $new_ticket_data = self::get_ticket($ticket_id);
         if ($new_ticket_data['assigned_user_id'] && (!$existing_ticket_data || $existing_ticket_data['assigned_user_id'] != $new_ticket_data['assigned_user_id'])) {
             // copied from ticket_admin_notify.php
             // template for sending emails.
             // are we sending the paid one? or the dueone.
             $template = module_template::get_template_by_key('ticket_email_notify');
             $new_ticket_data['from_name'] = module_security::get_loggedin_name();
             $new_ticket_data['ticket_url'] = module_ticket::link_open($ticket_id);
             $new_ticket_data['ticket_subject'] = $new_ticket_data['subject'];
             // sending to the staff member.
             $replace_fields = self::get_replace_fields($new_ticket_data['ticket_id'], $new_ticket_data);
             $template->assign_values($replace_fields);
             $template->assign_values($new_ticket_data);
             $html = $template->render('html');
             $email = module_email::new_email();
             $email->replace_values = $new_ticket_data + $replace_fields;
             $email->set_subject($template->description);
             $email->set_to('user', $new_ticket_data['assigned_user_id']);
             // do we send images inline?
             $email->set_html($html);
             if ($email->send()) {
                 // it worked successfully!!
             } else {
                 /// log err?
             }
         }
     }
     module_cache::clear('ticket');
     return $ticket_id;
 }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:101,代码来源:ticket.php

示例6: print_heading

$website_data = module_website::get_website($change_request['website_id']);
print_heading(_l('Email Change Request: %s', $change_request['url']));
module_template::init_template('change_request_email', 'Dear {NAME},<br>
<br>
This email is regarding your recent change request on the website {URL}.<br><br>
<em>{REQUEST}</em><br><br>
You can view and modify this change request by <a href="{CHANGE_REQUEST_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Change Request: {URL}', array('NAME' => 'Customers Name', 'URL' => 'Website address', 'REQUEST' => 'Change REquest', 'FROM_NAME' => 'Your name', 'CHANGE_REQUEST_URL' => 'Link to change request for customer'));
// template for sending emails.
// are we sending the paid one? or the dueone.
//$template_name = 'change_request_email';
$template_name = isset($_REQUEST['template_name']) ? $_REQUEST['template_name'] : 'change_request_email';
$template = module_template::get_template_by_key($template_name);
$change_request['from_name'] = module_security::get_loggedin_name();
$change_request['change_request_url'] = module_change_request::link_public_change($website_data['website_id'], $change_request_id);
ob_start();
$change_request['change_request_tasks'] = ob_get_clean();
// find available "to" recipients.
// customer contacts.
$to_select = false;
if ($website_data['customer_id']) {
    $customer = module_customer::get_customer($website_data['customer_id']);
    $change_request['customer_name'] = $customer['customer_name'];
    $to = module_user::get_contacts(array('customer_id' => $website_data['customer_id']));
    if ($customer['primary_user_id']) {
        $primary = module_user::get_user($customer['primary_user_id']);
        if ($primary) {
            $to_select = $primary['email'];
        }
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:change_request_email.php


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