本文整理汇总了PHP中FSS_Helper::getFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper::getFormat方法的具体用法?PHP FSS_Helper::getFormat怎么用?PHP FSS_Helper::getFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Helper
的用法示例。
在下文中一共展示了FSS_Helper::getFormat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCalFormat
static function getCalFormat($format = '')
{
$format = FSS_Helper::getFormat($format);
$data = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
foreach ($data as $letter) {
$format = str_replace($letter, "%" . $letter, $format);
$format = str_replace(strtoupper($letter), "%" . strtoupper($letter), $format);
}
return $format;
}
示例2: doReply
function doReply()
{
$this->ticketid = FSS_Input::getInt('ticketid');
$this->ticket = new SupportTicket();
if (!$this->ticket->load($this->ticketid)) {
return JError::raiseWarning(404, JText::_('Ticket not found'));
}
$this->ticket->loadAll();
if (FSS_Settings::get('time_tracking') != "") {
if (FSS_Settings::get('time_tracking_type') == 'se') {
$this->time_start = FSS_Helper::Date(time(), FSS_DATE_CUSTOM, "H:i:s");
$this->time_end = FSS_Helper::Date(time(), FSS_DATE_CUSTOM, "H:i:s");
} elseif (FSS_Settings::get('time_tracking_type') == 'tm') {
$this->time_start = FSS_Helper::Date(time(), FSS_DATE_CUSTOM, FSS_Helper::getFormat());
$this->time_end = FSS_Helper::Date(time(), FSS_DATE_CUSTOM, FSS_Helper::getFormat());
} else {
$this->taken_hours = 0;
$this->taken_mins = 0;
}
}
if (FSS_Settings::get('time_tracking') == "auto") {
$session = JFactory::getSession();
$taken = $session->get('ticket_' . $this->ticket->id . "_opened");
if (FSS_Settings::get('time_tracking_type') == 'se') {
$document = JFactory::getDocument();
$document->addScript(JURI::root() . 'components/com_fss/assets/js/bootstrap/bootstrap-timepicker.min.js');
$document->addScriptDeclaration("jQuery(document).ready(function () {jQuery('#timetaken_start').timepicker({minuteStep:5, showMeridian: false});jQuery('#timetaken_end').timepicker({minuteStep:5, showMeridian: false});});");
$this->time_start = FSS_Helper::Date($taken, FSS_DATE_CUSTOM, "H:i:s");
} else {
if ($taken > 0) {
$taken = time() - $taken;
}
$this->time_taken = $taken;
$taken = ceil($taken / 60);
$this->taken_hours = floor($taken / 60);
$this->taken_mins = $taken % 60 + 1;
}
}
$this->fields = FSSCF::GetCustomFields($this->ticket->id, $this->ticket->prod_id, $this->ticket->ticket_dept_id, 3);
$this->fieldvalues = FSSCF::GetTicketValues($this->ticket->id, $this->ticket);
$pathway = JFactory::getApplication()->getPathway();
$pathway->addItem(JText::_("SUPPORT"), FSSRoute::_('index.php?option=com_fss&view=admin_support&tickets=' . $this->ticket_view, false));
$pathway->addItem(JText::_("VIEW_TICKET") . " : " . $this->ticket->reference . " - " . $this->ticket->title, FSSRoute::_('index.php?option=com_fss&view=admin_support&tickets=' . $this->ticket_view . "&ticketid=" . $this->ticket->id, false));
$this->reply_type = FSS_Input::getCmd('type', 'reply');
if ($this->reply_type == "") {
$this->reply_type = "reply";
}
switch ($this->reply_type) {
case 'reply':
$this->reply_title = "REPLY_TO_SUPORT_TICKET";
$this->reply_button = "POST_REPLY";
$pathway->addItem(JText::_("POST_REPLY"));
break;
case 'private':
$this->reply_title = "ADD_HANDLER_COMMENT_TO_TICKET";
$this->reply_button = "POST_COMMENT";
$pathway->addItem(JText::_("ADD_COMMENT"));
break;
case 'user':
$this->reply_title = "FORWARD_TICKET_TO_A_DIFFERENT_USER";
$this->reply_button = "FORWARD_TICKET";
if ($this->ticket->user_id > 0) {
$user = JFactory::getUser($this->ticket->user_id);
} else {
$user = new stdClass();
$user->username = $this->ticket->email;
$user->name = $this->ticket->unregname;
}
$this->user = $user;
$pathway->addItem(JText::_("FORWARD_TO_USER"));
break;
case 'product':
$this->reply_title = "FORWARD_TICKET_TO_A_DIFFERENT_DEPARTMENT";
$this->reply_button = "FORWARD_TICKET";
$this->handlers = SupportUsers::getHandlers(false, true);
$pathway->addItem(JText::_("FORWARD_TO_DEPARTMENT"));
break;
case 'handler':
$this->reply_title = "FORWARD_TICKET_TO_A_DIFFERENT_HANDLER";
$this->reply_button = "FORWARD_TICKET";
$this->handlers = SupportUsers::getHandlers(false, true);
$pathway->addItem(JText::_("FORWARD_TO_HANDLER"));
break;
}
$this->draft = FSS_Input::getInt('draft');
$this->user_message = $this->loadDraft($this->draft);
$this->support_assign_reply = FSS_Settings::get('support_assign_reply');
FSS_Helper::IncludeModal();
FSS_Helper::AddSCEditor();
parent::_display();
}