本文整理汇总了PHP中FSS_Helper::Date方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper::Date方法的具体用法?PHP FSS_Helper::Date怎么用?PHP FSS_Helper::Date使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Helper
的用法示例。
在下文中一共展示了FSS_Helper::Date方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialchars
echo $row->subject;
?>
</td>
<td>
<?php
echo $row->currentlog;
?>
</td>
<td>
<?php
echo $row->from;
?>
</td>
<td style="white-space: nowrap;">
<?php
echo FSS_Helper::Date($row->lastseen, FSS_DATETIME_MYSQL);
?>
</td>
<td>
<?php
$log = str_replace("\n", "<br />", $row->oldlog);
$log = htmlspecialchars($log);
?>
<a href="#" onclick="return false;" data-placement="left" class="fssTip" title="<?php
echo $log;
?>
">Log</a>
</td>
</tr>
<?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));
//.........这里部分代码省略.........
示例3: foreach
echo FSS_Helper::PageTitle("ANNOUNCEMENTS");
?>
<?php
if (count($this->announces) > 0) {
?>
<form method="post" action="<?php
echo FSSRoute::_('');
?>
" name="form">
<?php
foreach ($this->announces as $announce) {
$this->parser->SetVar('editpanel', $this->content->EditPanel($announce));
$this->parser->SetVar('date', FSS_Helper::Date($announce['added'], FSS_DATE_MID));
$this->parser->SetVar('link', FSSRoute::_('index.php?option=com_fss&view=announce&announceid=' . $announce['id']));
$this->parser->setVar('title', FSS_Helper::PageSubTitle($announce['title']));
$this->parser->setVar('subtitle', $announce['subtitle']);
$authid = $announce['author'];
$user = JFactory::getUser($authid);
if ($user->id > 0) {
$this->parser->setVar('author', $user->name);
$this->parser->setVar('author_username', $user->username);
} else {
$this->parser->setVar('author', JText::_('UNKNOWN'));
$this->parser->setVar('author_username', JText::_('UNKNOWN'));
}
if (FSS_Settings::get('glossary_announce')) {
$this->parser->setVar('body', FSS_Glossary::ReplaceGlossary($announce['body']));
} else {
示例4: foreach
<?php
foreach ($this->rows as $row) {
?>
<tr id="row_<?php
echo $row->id;
?>
" onmouseenter="showRow(<?php
echo $row->id;
?>
);" class='hlrow'>
<td width="100"><?php
echo $row->cron;
?>
</td>
<td width="180"><?php
echo FSS_Helper::Date($row->when, FSS_DATETIME_MYSQL);
?>
</td>
<td id="entry_<?php
echo $row->id;
?>
" style='display: none'><?php
echo $row->log;
?>
</td>
</tr>
<?php
}
?>
</table>
示例5: fss_end_col
<?php
fss_end_col();
}
?>
<?php
fss_start_col();
?>
<th><?php
echo JText::_("LAST_UPDATE");
?>
</th>
<td>
<?php
echo FSS_Helper::Date($this->ticket->lastupdate, FSS_DATETIME_MID);
?>
</td>
<?php
fss_end_col();
?>
<?php
fss_start_col();
?>
<th style="vertical-align: middle"><?php
echo JText::_("STATUS");
?>
</th>
<td>
示例6:
?>
<?php
if ($field->link) {
?>
</a><?php
}
?>
</td>
<?php
}
?>
<?php
if ($this->list_added) {
?>
<td nowrap><?php
echo FSS_Helper::Date($item['added'], FSS_DATE_SHORT);
?>
</td>
<?php
}
?>
<?php
if ($this->list_published) {
?>
<td nowrap>
<a href="#" id="publish_<?php
echo $item['id'];
?>
" class="fss_publish_button" state="<?php
echo $item['published'];
示例7: kb_mod_show_extra
function kb_mod_show_extra($row, $pos)
{
global $posdata, $date_format;
if (!array_key_exists($pos, $posdata)) {
return;
}
$output = "<div class='fss_mod_kbart_{$pos}'>";
foreach ($posdata[$pos] as $item) {
$output .= "<div class='fss_mod_kbart_{$item}'>";
switch ($item) {
case 'date':
if ($row->modified != "0000-00-00 00:00:00") {
$output .= FSS_Helper::Date($row->modified, $date_format);
}
break;
case 'added':
if ($row->created != "0000-00-00 00:00:00") {
$output .= FSS_Helper::Date($row->created, $date_format);
}
break;
case 'author':
$user = JFactory::getUser($row->author);
if ($user->name) {
$output .= "By <span class='fss_mod_kbart_{$item}_inner'>" . $user->name . "</span>";
}
break;
case 'rating':
$output .= "Rating: <span class='fss_mod_kbart_{$item}_inner'>" . $row->rating . "</span>";
break;
case 'views':
$output .= "<span class='fss_mod_kbart_{$item}_inner'>" . $row->views . "</span> Views";
break;
case 'blank':
$output .= " ";
break;
}
$output .= "</div>";
}
$output .= "</div>";
return $output;
}
示例8:
?>
' title='Delete Attachment' class='fssTip'>
<i class="icon-delete"></i>
</a>
</div>
<?php
}
?>
<div class="pull-right" style="text-align: right;">
<?php
echo FSS_Helper::display_filesize($attach->size);
?>
<br />
<?php
echo FSS_Helper::Date($attach->added, FSS_DATETIME_MID);
?>
<br />
</div>
<h4 class="media-heading"><a href='<?php
echo JRoute::_('index.php?option=com_fss&view=admin_support&task=attach.download&ticketid=' . $this->ticket->id . '&fileid=' . $attach->id);
?>
'><?php
echo $attach->filename;
?>
</a></h4>
<?php
echo JText::_('UPLOADED_BY');
?>
示例9: mt_rand
}
}
}
}
if ($this->opt_max_length > 0 && strlen($this->comment['body']) > $this->opt_max_length) {
$randno = mt_rand(100000, 999999);
$result = array();
$is_trimmed = false;
$result[] = "<div id='test_short_" . $randno . "'>";
$result[] = FSS_Helper::truncate($this->comment['body'], $this->opt_max_length, $is_trimmed, '');
if ($is_trimmed) {
$result[] = "… <a href='#' onclick='expand_test(" . $randno . ");return false;'>" . JText::_("MOD_FSS_TEST_READ_MORE") . "</a><div id='test_full_" . $randno . "' style='display:none'>" . $this->comment['body'] . "</div>";
$result[] = "</div>";
$this->comment['body'] = trim(implode($result));
}
}
$this->comment['body'] = str_replace("\n", "<br />", $this->comment['body']);
$this->comment['body'] = str_replace("\n", "<br />", $this->comment['body']);
$this->parser->AddVars($this->comment);
$this->parser->SetVar('divid', "fss_comment_{$this->uid}_{$this->comment['id']}");
if (count($custom) > 0) {
$this->parser->SetVar('custom', implode(", ", $custom));
} else {
$this->parser->SetVar('custom', "");
}
$this->parser->SetVar('created_nice', FSS_Helper::Date($this->comment['created'], FSS_DATETIME_SHORT));
$this->parser->SetVar('date', FSS_Helper::Date($this->comment['created'], FSS_DATE_SHORT));
$this->parser->SetVar('moderation', $moderation);
//print_p($this->comment);
//print_p($this->parser);
echo $this->parser->Parse();
示例10:
?>
</dd>
<?php
}
?>
<?php
if (FSS_Settings::get('kb_show_dates') == 2 && $this->art['modified'] != "0000-00-00 00:00:00") {
?>
<dd class="create">
<span class="icon-calendar"></span> <?php
echo JText::_("MODIFIED");
?>
: <?php
echo FSS_Helper::Date($this->art['modified']);
?>
</dd>
<?php
}
?>
</dl>
</div>
<?php
}
?>
示例11: 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();
}
示例12:
if ($this->view_mode != 'popup') {
?>
<div class='media'>
<div class="pull-right">
<?php
echo $this->content->EditPanel($art);
?>
</div>
<div class="media-body">
<?php
if ($what == "recent" && FSS_Settings::get('kb_show_recent_stats') && $art['modified'] != "0000-00-00 00:00:00") {
?>
<span class="pull-right">
<?php
echo FSS_Helper::Date($art['modified'], FSS_DATE_SHORT);
?>
</span>
<?php
}
?>
<?php
if ($what == "viewed" && FSS_Settings::get('kb_show_viewed_stats')) {
?>
<span class="pull-right">
<?php
echo $art['views'];
?>
<?php
echo JText::_("VIEW_S");
?>
示例13:
?>
<br />
<span class="small">
<?php
echo $ticket->getUserEMail();
?>
</span>
</td>
<td style="vertical-align:middle;text-align:center;word-break: break-all;" nowrap>
<?php
echo FSS_Helper::Date($ticket->opened, FSS_DATE_SHORT);
?>
<br />
<span class="small"><?php
echo FSS_Helper::Date($ticket->opened, FSS_TIME_SHORT);
?>
</span>
</td>
<td style="vertical-align:middle;text-align:center;" nowrap class="action_buttons">
<?php
if ($this->state == "") {
?>
<a href="#" class="btn btn-success accept_button" onclick="email_accept(<?php
echo $ticket->id;
?>
); return false; "><?php
echo JText::_('ACCEPT');
?>
</a>
示例14: foreach
px;
overflow: hidden;
}
</style>
<?php
}
?>
<div id="fss_announce_scroll" class="fss_announce_scroll">
<?php
foreach ($rows as $announce) {
$parser->SetVar('title', $announce['title']);
$parser->SetVar('subtitle', $announce['subtitle']);
$parser->SetVar('date', FSS_Helper::Date($announce['added'], FSS_DATE_MID));
$parser->SetVar('time', FSS_Helper::Date($announce['added'], FSS_TIME_SHORT));
$parser->SetVar('body', $announce['body']);
$parser->SetVar('link', FSSRoute::_('index.php?option=com_fss&view=announce&announceid=' . $announce['id']));
$authid = $announce['author'];
$user = JFactory::getUser($authid);
if ($user->id > 0) {
$parser->setVar('author', $user->name);
$parser->setVar('author_username', $user->username);
} else {
$parser->setVar('author', JText::_('UNKNOWN'));
$parser->setVar('author_username', JText::_('UNKNOWN'));
}
echo $parser->Parse();
}
?>
示例15: listItemTask
<a href="<?php
echo $link;
?>
"><?php
echo $row->title;
?>
</a>
</td>
<td>
<?php
echo $row->subtitle;
?>
</td>
<td nowrap>
<?php
echo FSS_Helper::Date($row->added, FSS_DATETIME_MID);
?>
</td>
<td>
<?php
echo $row->name;
?>
</td>
<td align="center">
<a href="javascript:void(0);" class="jgrid btn btn-micro" onclick="return listItemTask('cb<?php
echo $i;
?>
','<?php
echo $row->published ? 'unpublish' : 'publish';
?>
')">