本文整理汇总了PHP中Format::userdate方法的典型用法代码示例。如果您正苦于以下问题:PHP Format::userdate方法的具体用法?PHP Format::userdate怎么用?PHP Format::userdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Format
的用法示例。
在下文中一共展示了Format::userdate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: export
function export($value)
{
$config = $this->getConfiguration();
if (!$value) {
return '';
} elseif ($config['gmt']) {
return Format::userdate('Y-m-d H:i:s', $value);
} else {
return Format::date('Y-m-d H:i:s', $value);
}
}
示例2: die
<?php
if (!defined('KTKADMININC') || !is_object($ticket) || !is_object($thisuser) || !$thisuser->isStaff()) {
die(_('Access Denied'));
}
if (!($thisuser->canEditTickets() || $thisuser->isManager() && $ticket->getDeptId() == $thisuser->getDeptId())) {
die(_('Access Denied. Perm error.'));
}
if ($_POST && $errors) {
$info = Format::input($_POST);
} else {
$info = array('email' => $ticket->getEmail(), 'name' => $ticket->getName(), 'phone' => $ticket->getPhone(), 'pri' => $ticket->getPriorityId(), 'topicId' => $ticket->getTopicId(), 'topic' => $ticket->getTopic(), 'subject' => $ticket->getSubject(), 'duedate' => $ticket->getDueDate() ? Format::userdate('m/d/Y', Misc::db2gmtime($ticket->getDueDate())) : '', 'time' => $ticket->getDueDate() ? Format::userdate('G:i', Misc::db2gmtime($ticket->getDueDate())) : '');
}
?>
<div width="100%">
<?php
if ($errors['err']) {
?>
<p align="center" id="errormessage"><?php
echo $errors['err'];
?>
</p>
<?php
} elseif ($msg) {
?>
<p align="center" class="infomessage"><?php
echo $msg;
?>
</p>
<?php
} elseif ($warn) {
示例3: db_daydatetime
function db_daydatetime($time)
{
global $cfg;
return Format::userdate($cfg->getDayDateTimeFormat(), Misc::db2gmtime($time));
}
示例4:
if(!($thisuser->canEditTickets() || ($thisuser->isManager() && $ticket->getDeptId()==$thisuser->getDeptId()))) die('Access Denied. Perm error.');
if($_POST && $errors){
$info=Format::input($_POST);
}else{
$info=array('email'=>$ticket->getEmail(),
'name' =>$ticket->getName(),
'phone'=>$ticket->getPhone(),
'phone_ext'=>$ticket->getPhoneExt(),
'pri'=>$ticket->getPriorityId(),
'topicId'=>$ticket->getTopicId(),
'topic'=>$ticket->getHelpTopic(),
'subject' =>$ticket->getSubject(),
'duedate' =>$ticket->getDueDate()?(Format::userdate('m/d/Y',Misc::db2gmtime($ticket->getDueDate()))):'',
'time'=>$ticket->getDueDate()?(Format::userdate('G:i',Misc::db2gmtime($ticket->getDueDate()))):'',
);
/*Note: Please don't make me explain how dates work - it is torture. Trust me! */
}
?>
<div width="100%">
<?if($errors['err']) {?>
<p align="center" id="errormessage"><?=$errors['err']?></p>
<?}elseif($msg) {?>
<p align="center" class="infomessage"><?=$msg?></p>
<?}elseif($warn) {?>
<p class="warnmessage"><?=$warn?></p>
<?}?>
</div>
<table width="100%" border="0" cellspacing=1 cellpadding=2>
示例5: getUpdateInfo
function getUpdateInfo()
{
global $cfg;
$info = array('source' => $this->getSource(), 'topicId' => $this->getTopicId(), 'slaId' => $this->getSLAId(), 'user_id' => $this->getOwnerId(), 'duedate' => $this->getDueDate() ? Format::userdate($cfg->getDateFormat(), Misc::db2gmtime($this->getDueDate())) : '', 'time' => $this->getDueDate() ? Format::userdate('G:i', Misc::db2gmtime($this->getDueDate())) : '');
return $info;
}
示例6: getUpdateInfo
function getUpdateInfo()
{
$info = array('name' => $this->getName(), 'email' => $this->getEmail(), 'phone' => $this->getPhone(), 'phone_ext' => $this->getPhoneExt(), 'subject' => $this->getSubject(), 'source' => $this->getSource(), 'topicId' => $this->getTopicId(), 'priorityId' => $this->getPriorityId(), 'slaId' => $this->getSLAId(), 'duedate' => $this->getDueDate() ? Format::userdate('m/d/Y', Misc::db2gmtime($this->getDueDate())) : '', 'time' => $this->getDueDate() ? Format::userdate('G:i', Misc::db2gmtime($this->getDueDate())) : '');
return $info;
}
示例7: die
<?php
if (!defined('OSTSCPINC') || !is_object($ticket) || !is_object($thisuser) || !$thisuser->isStaff()) {
die('Access Denied');
}
if (!($thisuser->canEditTickets() || $thisuser->isManager() && $ticket->getDeptId() == $thisuser->getDeptId())) {
die('Access Denied. Perm error.');
}
if ($_POST && $errors) {
$info = Format::input($_POST);
} else {
$info = array('email' => $ticket->getEmail(), 'name' => $ticket->getName(), 'phone' => $ticket->getPhone(), 'phone_ext' => $ticket->getPhoneExt(), 'pri' => $ticket->getPriorityId(), 'topicId' => $ticket->getTopicId(), 'topic' => $ticket->getHelpTopic(), 'subject' => Format::htmlchars($ticket->getSubject()), 'assetid' => $ticket->getAssetId(), 'tickettypeid' => $ticket->getTicketTypeId(), 'duedate' => $ticket->getDueDate() ? Format::userdate('m/d/Y', Misc::db2gmtime($ticket->getDueDate())) : '', 'time' => $ticket->getDueDate() ? Format::userdate('G:i', Misc::db2gmtime($ticket->getDueDate())) : '');
/*Note: Please don't make me explain how dates work - it is torture. Trust me! */
}
?>
<script type="text/javascript">
function change(){
var text=document.forms["form"]["subject"].value;
var len = text.length;
var s = text;
for(i=0; i<len; i++)
{
s = s.replace(/[\u2018|\u2019|\u201A]/g, "\'");
// smart double quotes
s = s.replace(/[\u201C|\u201D|\u201E]/g, "\"");
// ellipsis
s = s.replace(/\u2026/g, "...");