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


PHP FSS_Helper::createRandomPassword方法代码示例

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


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

示例1: OpenNewTicketUnreg

 function OpenNewTicketUnreg($messageid)
 {
     $db = JFactory::getDBO();
     $priid = $this->params['pri_id'];
     $catid = $this->params['cat_id'];
     $deptid = $this->params['dept_id'];
     $prodid = $this->params['prod_id'];
     $userid = 0;
     $admin_id = FSS_Ticket_Helper::AssignHandler($prodid, $deptid, $catid);
     $subject = $this->subject;
     $body = $this->plainmsg;
     $email = "{$this->from[0]->mailbox}@{$this->from[0]->host}";
     $name = $this->from[0]->personal;
     if (trim($name) == "") {
         $name = $email;
     }
     $this->Log("Unreg Name : {$name}");
     $password = FSS_Helper::createRandomPassword();
     $now = FSS_Helper::CurDate();
     $def_open = FSS_Ticket_Helper::GetStatusID('def_open');
     $source = "email_accepted";
     if (isset($this->params['confirmnew']) && $this->params['confirmnew']) {
         $source = "email";
     }
     $qry = "INSERT INTO #__fss_ticket_ticket (reference, ticket_status_id, ticket_pri_id, ticket_cat_id, ticket_dept_id, prod_id, title, opened, lastupdate, user_id, admin_id, email, password, unregname, source) VALUES ";
     $qry .= "('', {$def_open}, '" . FSSJ3Helper::getEscaped($db, $priid) . "', '" . FSSJ3Helper::getEscaped($db, $catid) . "', '" . FSSJ3Helper::getEscaped($db, $deptid) . "', '" . FSSJ3Helper::getEscaped($db, $prodid) . "', '" . FSSJ3Helper::getEscaped($db, $subject) . "', '{$now}', '{$now}', '" . FSSJ3Helper::getEscaped($db, $userid) . "', '" . FSSJ3Helper::getEscaped($db, $admin_id) . "', '" . FSSJ3Helper::getEscaped($db, $email) . "', '" . FSSJ3Helper::getEscaped($db, $password) . "', '" . FSSJ3Helper::getEscaped($db, $name) . "', '{$source}')";
     //echo $qry."<br>";
     $db->setQuery($qry);
     $db->Query();
     $ticketid = $db->insertid();
     $ref = FSS_Ticket_Helper::createRef($ticketid);
     $qry = "UPDATE #__fss_ticket_ticket SET reference = '" . FSSJ3Helper::getEscaped($db, $ref) . "' WHERE id = '" . FSSJ3Helper::getEscaped($db, $ticketid) . "'";
     $db->setQuery($qry);
     $db->Query();
     //echo $qry."<br>";
     $qry = "INSERT INTO #__fss_ticket_messages (ticket_ticket_id, subject, body, user_id, posted) VALUES ('";
     $qry .= FSSJ3Helper::getEscaped($db, $ticketid) . "','" . FSSJ3Helper::getEscaped($db, $subject) . "','" . FSSJ3Helper::getEscaped($db, $body) . "','" . FSSJ3Helper::getEscaped($db, $userid) . "','{$now}')";
     //echo $qry."<br>";
     $messageid = $db->insertid();
     $db->setQuery($qry);
     $db->Query();
     $ticket = $this->getTicket($ticketid);
     //FSS_EMail::User_Create_Unreg($ticket, $subject, $body);
     //FSS_EMail::Admin_Create($ticket, $subject, $body, array());
     return $ticketid;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:46,代码来源:emailcheck_horde.php

示例2: saveTicket

 function saveTicket()
 {
     $subject = FSS_Input::getString('subject');
     $body = FSS_Input::getBBCode('body');
     $prodid = FSS_Input::getInt('prodid');
     $deptid = FSS_Input::getInt('deptid');
     $catid = FSS_Input::getInt('catid');
     $priid = FSS_Input::getInt('priid');
     $handler = FSS_Input::getInt('handler');
     $user = JFactory::getUser();
     $userid = $user->get('id');
     $name = "";
     $session = JFactory::getSession();
     $this->admin_create = 0;
     if ($session->Get('admin_create')) {
         $this->admin_create = $session->Get('admin_create');
     }
     if ($this->admin_create == 1) {
         $this->admin_create = 1;
         $userid = $session->Get('admin_create_user_id');
     } else {
         if ($this->admin_create == 2) {
             $userid = 0;
         }
     }
     $db = JFactory::getDBO();
     if ($priid < 1) {
         $priid = FSS_Settings::get('support_default_priority');
     }
     $ticket['subject'] = $subject;
     $ticket['body'] = $body;
     $ticket['priid'] = $priid;
     $ticket['handler'] = $handler;
     $ok = true;
     $errors['subject'] = '';
     $errors['body'] = '';
     $errors['cat'] = '';
     $errors['captcha'] = '';
     $fields = FSSCF::GetCustomFields(0, $prodid, $deptid);
     if (FSS_Settings::get('support_subject_message_hide') == "subject") {
         $ticket['subject'] = substr(strip_tags($ticket['body']), 0, 40);
         $subject = $ticket['subject'];
     }
     if (FSS_Settings::get('support_altcat')) {
         $cats = $this->get('Cats');
         if (count($cats) > 0 && FSS_Input::getInt('catid') < 1) {
             $errors['cat'] = JText::_("YOU_MUST_SELECT_A_CATEGORY");
             $ok = false;
         }
     }
     if ($body == "" && FSS_Settings::get('support_subject_message_hide') != "message" && FSS_Settings::get('support_subject_message_hide') != "both") {
         $errors['body'] = JText::_("YOU_MUST_ENTER_A_MESSAGE_FOR_YOUR_SUPPORT_TICKET");
         $ok = false;
     }
     if (!FSSCF::ValidateFields($fields, $errors)) {
         $ok = false;
     }
     $email = "";
     $password = "";
     $now = FSS_Helper::CurDate();
     $this->sortCaptchaType();
     $captcha = new FSS_Captcha();
     if (!$captcha->ValidateCaptcha('support_captcha_type')) {
         $errors['captcha'] = JText::_("INVALID_SECURITY_CODE");
         $ok = false;
     }
     if ($userid < 1) {
         $email = FSSJ3Helper::getEscaped($db, $session->Get('ticket_email'));
         if ($session->Get('ticket_name')) {
             $name = FSSJ3Helper::getEscaped($db, $session->Get('ticket_name'));
         }
         if ($email == "" && $this->admin_create != 2) {
             $ok = false;
         } else {
             $password = FSS_Helper::createRandomPassword();
             $session->Set('ticket_pass', $password);
         }
     }
     // assign handler to ticket
     $admin_id = $handler;
     if (!$admin_id) {
         $admin_id = FSS_Ticket_Helper::AssignHandler($prodid, $deptid, $catid);
     }
     $now = FSS_Helper::CurDate();
     $def_open = FSS_Ticket_Helper::GetStatusID('def_open');
     if (FSS_Settings::get('support_subject_format') != "") {
         $parser = new FSSParser();
         foreach ($_POST as $var => $value) {
             $parser->setVar($var, FSS_Input::GetString($var));
         }
         foreach ($fields as $field) {
             $parser->setVar('custom_' . $field['alias'], FSS_Input::GetString('custom_' . $field['id']));
         }
         $user = JFactory::getUser($userid);
         $parser->setVar('userid', $userid);
         $parser->setVar('username', $user->username);
         $parser->setVar('name', $user->name);
         $parser->setVar('email', $user->email);
         $parser->setVar('subject', $subject);
         $parser->SetVar('product', FSS_EMail::GetProduct($prodid));
//.........这里部分代码省略.........
开发者ID:vstorm83,项目名称:propertease,代码行数:101,代码来源:view.html.php

示例3: OpenNewTicketUnreg

 function OpenNewTicketUnreg($messageid)
 {
     $db = JFactory::getDBO();
     $priid = $this->params['pri_id'];
     $catid = $this->params['cat_id'];
     $deptid = $this->params['dept_id'];
     $prodid = $this->params['prod_id'];
     $userid = 0;
     $admin_id = FSS_Ticket_Helper::AssignHandler($prodid, $deptid, $catid);
     $subject = $this->headers->subject->text;
     $body = $this->plainmsg;
     $email = "{$this->headers->from[0]->mailbox}@{$this->headers->from[0]->host}";
     $name = "";
     if (isset($this->headers->from[0]->personal)) {
         $name = $this->headers->from[0]->personal;
     }
     if (trim($name) == "") {
         $name = $email;
     }
     $this->Log("Unreg Name : {$name}");
     $password = FSS_Helper::createRandomPassword();
     $now = FSS_Helper::CurDate();
     if ($this->messagetime > 0) {
         $now = date("Y-m-d H:i:s", $this->messagetime);
     }
     $def_open = FSS_Ticket_Helper::GetStatusID('def_open');
     $source = "email_accepted";
     if (isset($this->params['confirmnew']) && $this->params['confirmnew']) {
         $source = "email";
     }
     $qry = "INSERT INTO #__fss_ticket_ticket (reference, ticket_status_id, ticket_pri_id, ticket_cat_id, ticket_dept_id, prod_id, title, opened, lastupdate, user_id, admin_id, email, password, unregname, source) VALUES ";
     $qry .= "('', {$def_open}, '" . FSSJ3Helper::getEscaped($db, $priid) . "', '" . FSSJ3Helper::getEscaped($db, $catid) . "', '" . FSSJ3Helper::getEscaped($db, $deptid) . "', '" . FSSJ3Helper::getEscaped($db, $prodid) . "', '" . FSSJ3Helper::getEscaped($db, $subject) . "', '{$now}', '{$now}', '" . FSSJ3Helper::getEscaped($db, $userid) . "', '" . FSSJ3Helper::getEscaped($db, $admin_id) . "', '" . FSSJ3Helper::getEscaped($db, $email) . "', '" . FSSJ3Helper::getEscaped($db, $password) . "', '" . FSSJ3Helper::getEscaped($db, $name) . "', '{$source}')";
     //echo $qry."<br>";
     $db->setQuery($qry);
     $db->Query();
     $ticketid = $db->insertid();
     $ref = FSS_Ticket_Helper::createRef($ticketid);
     $qry = "UPDATE #__fss_ticket_ticket SET reference = '" . FSSJ3Helper::getEscaped($db, $ref) . "' WHERE id = '" . FSSJ3Helper::getEscaped($db, $ticketid) . "'";
     $db->setQuery($qry);
     $db->Query();
     //echo $qry."<br>";
     $qry = "INSERT INTO #__fss_ticket_messages (ticket_ticket_id, subject, body, user_id, posted, source) VALUES ('";
     $qry .= FSSJ3Helper::getEscaped($db, $ticketid) . "','" . FSSJ3Helper::getEscaped($db, $subject) . "','" . FSSJ3Helper::getEscaped($db, $body) . "','" . FSSJ3Helper::getEscaped($db, $userid) . "','{$now}', 'email')";
     $db->setQuery($qry);
     $db->Query();
     $messageid = $db->insertid();
     // attach files to ticket
     if (FSS_Settings::get('support_user_attach') > 1) {
         $this->AttachFiles($ticketid, $userid, $messageid);
         $this->processInlineImages($messageid, $body);
     }
     // process body for inline attachments
     $ticket = $this->getTicket($ticketid);
     if (isset($this->params['confirmnew']) && $this->params['confirmnew']) {
         // send admin pending email
         FSS_EMail::Admin_Pending($ticket, $subject, $body);
     } else {
         FSS_EMail::User_Create_Unreg($ticket, $subject, $body);
         FSS_EMail::Admin_Create($ticket, $subject, $body, $this->files);
     }
     return $ticketid;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:62,代码来源:emailcheck.php


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