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


PHP FSS_Input::getBBCode方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     if (FSS_Settings::Get('support_only_admin_open')) {
         return $this->noPermission("Access Denied", "CREATING_NEW_TICKETS_BY_USERS_IS_CURRENTLY_DISABLED");
     }
     if (!FSS_Permission::auth("fss.ticket.open", "com_fss.support_user")) {
         return FSS_Helper::NoPerm();
     }
     $mainframe = JFactory::getApplication();
     $user = JFactory::getUser();
     $userid = $user->get('id');
     $this->assign('userid', $userid);
     $this->assign('email', '');
     // defaults for blank ticket
     $this->ticket = new stdClass();
     $this->ticket->prodid = FSS_Input::getInt('prodid');
     $this->ticket->deptid = FSS_Input::getInt('deptid');
     $this->ticket->catid = FSS_Input::getInt('catid');
     $this->ticket->priid = FSS_Input::getInt('priid');
     $this->ticket->subject = FSS_Input::getString('subject');
     $this->ticket->body = FSS_Input::getBBCode('body');
     $this->errors['subject'] = '';
     $this->errors['body'] = '';
     $this->errors['cat'] = '';
     $what = FSS_Input::getCmd('what');
     // done with ticket, try and save, if not, display any errors
     if ($what == "add") {
         if ($this->saveTicket()) {
             echo "Saved OK!";
             exit;
             $link = 'index.php?option=com_fss&view=ticket&layout=view&Itemid=' . FSS_Input::getInt('Itemid') . '&ticketid=' . $this->ticketid;
             $mainframe->redirect($link);
             return;
         }
     }
     $this->product = $this->get('Product');
     $this->dept = $this->get('Department');
     $this->cats = SupportHelper::getCategories();
     $this->pris = SupportHelper::getPriorities();
     $this->support_user_attach = FSS_Settings::get('support_user_attach');
     $this->fields = FSSCF::GetCustomFields(0, $prodid, $deptid);
     parent::display();
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:43,代码来源:view.html.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: saveReply

 function saveReply()
 {
     $this->removeDraft(FSS_Input::getInt('draft'));
     // get posted data
     $ticketid = FSS_Input::getInt('ticketid');
     $reply_type = FSS_Input::getCmd('reply_type');
     $user_message = FSS_Input::getBBCode('body');
     $handler_message = FSS_Input::getBBCode('body2');
     $subject = FSS_Input::getString('subject');
     // load ticket
     $ticket = new SupportTicket();
     if (!$ticket->load($ticketid)) {
         exit;
     }
     // set up some variables
     $user_id = JFactory::getUser()->id;
     $handler_id = $user_id;
     $old_st = $ticket->getStatus();
     $action_name = "";
     $action_params = array();
     $message_id = 0;
     $files_private = 0;
     // add signatures to messages
     if (FSS_Input::getInt('signature')) {
         if ($user_message) {
             $user_message .= SupportCanned::AppendSig(FSS_Input::getInt('signature'), $ticket);
         }
         if ($handler_message) {
             $handler_message .= SupportCanned::AppendSig(FSS_Input::getInt('signature'), $ticket);
         }
     }
     $extra_time = 0;
     $timestart = 0;
     $timeend = 0;
     if (FSS_Settings::Get('time_tracking') != "") {
         if (FSS_Settings::get('time_tracking_type') == 'se') {
             $timestart = strtotime("1970-01-01 " . FSS_Input::getString('timetaken_start'));
             $timeend = strtotime("1970-01-01 " . FSS_Input::getString('timetaken_end'));
             $extra_time = (int) (($timeend - $timestart) / 60);
         } elseif (FSS_Settings::get('time_tracking_type') == 'tm') {
             $timestart = strtotime(FSS_Input::getString('timetaken_start'));
             $timeend = strtotime(FSS_Input::getString('timetaken_end'));
             $extra_time = (int) (($timeend - $timestart) / 60);
         } else {
             $extra_time = (int) (FSS_Input::getInt('timetaken_hours') * 60 + FSS_Input::getInt('timetaken_mins'));
         }
     }
     // different reply types
     switch ($reply_type) {
         case 'reply':
             // post reply to user
             if ($user_message) {
                 $message_id = $ticket->addMessage($user_message, $subject, $user_id, TICKET_MESSAGE_ADMIN, $extra_time, $timestart, $timeend);
                 $ticket->addTime($extra_time);
             } elseif ($extra_time > 0) {
                 // no message, add time if needed
                 $ticket->addTime($extra_time, "", true, $timestart, $timeend);
             }
             // update status
             $new_status = FSS_Input::getInt('reply_status');
             $ticket->updateStatus($new_status);
             // reassign ticket if needed
             if (FSS_Settings::get('support_assign_reply') == 1 && FSS_Input::getInt('dontassign') == 0) {
                 $ticket->assignHandler($handler_id, TICKET_ASSIGN_TOOK_OWNER);
             } elseif (FSS_Settings::get('support_autoassign') == 3 && $ticket->admin_id == 0 && FSS_Input::getInt('dontassign') == 0) {
                 $ticket->assignHandler($handler_id, TICKET_ASSIGN_ASSIGNED);
             }
             // call SupportActions handler for admin reply
             $action_name = "Admin_Reply";
             $action_params = array('subject' => $subject, 'user_message' => $user_message, 'status' => $new_status);
             break;
         case 'private':
             // add message to ticket
             if ($handler_message) {
                 $message_id = $ticket->addMessage($handler_message, $subject, $user_id, TICKET_MESSAGE_PRIVATE, $extra_time, $timestart, $timeend);
                 $ticket->addTime($extra_time);
             } else {
                 if ($extra_time > 0) {
                     $ticket->addTime($extra_time, "", true, $timestart, $timeend);
                 }
             }
             $files_private = 1;
             // call support actions for private comment
             $action_name = "Admin_Private";
             $action_params = array('subject' => $subject, 'handler_message' => $handler_message);
             break;
         case 'user':
             // update user on ticket
             $new_user_id = FSS_Input::getInt("user_id");
             $ticket->updateUser($new_user_id);
             if ($user_message) {
                 $message_id = $ticket->addMessage($user_message, $subject, $user_id, TICKET_MESSAGE_ADMIN, $extra_time, $timestart, $timeend);
                 $ticket->addTime($extra_time);
             } else {
                 if ($extra_time > 0) {
                     $ticket->addTime($extra_time, "", true, $timestart, $timeend);
                     $extra_time = 0;
                 }
             }
             $action_name = "Admin_ForwardUser";
//.........这里部分代码省略.........
开发者ID:vstorm83,项目名称:propertease,代码行数:101,代码来源:layout.reply.php

示例4: delete_message

 function delete_message()
 {
     if (!$this->view->can_EditTicket()) {
         exit;
     }
     $messageid = FSS_Input::getInt('messageid');
     $subject = FSS_Input::getString('subject');
     $body = FSS_Input::getBBCode('body');
     $body = urldecode($body);
     $subject = urldecode($subject);
     $db = JFactory::getDBO();
     $qry = "SELECT * FROM #__fss_ticket_messages WHERE id = " . FSSJ3Helper::getEscaped($db, $messageid);
     $db->setQuery($qry);
     $row = $db->LoadAssoc();
     $ticket = new SupportTicket();
     if ($ticket->load($row['ticket_ticket_id'])) {
         $ticket->deleteMessage($messageid, $subject, $body);
         if ($row['time'] > 0) {
             $ticket->addTime(-$row['time']);
         }
     }
     exit;
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:23,代码来源:task.update.php


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