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


PHP Format::userdate方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:iHunt101,项目名称:phlite,代码行数:11,代码来源:DatetimeField.php

示例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) {
开发者ID:jahanzaibbahadur,项目名称:Katak-support,代码行数:31,代码来源:editticket.inc.php

示例3: db_daydatetime

 function db_daydatetime($time)
 {
     global $cfg;
     return Format::userdate($cfg->getDayDateTimeFormat(), Misc::db2gmtime($time));
 }
开发者ID:gizur,项目名称:osticket,代码行数:5,代码来源:class.format.php

示例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>
开发者ID:jeremyweiss,项目名称:osTicket-Beinahe-Zwei,代码行数:30,代码来源:editticket.inc.php

示例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;
 }
开发者ID:gizur,项目名称:osticket,代码行数:6,代码来源:class.ticket.php

示例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;
 }
开发者ID:nicolap,项目名称:osTicket-1.7,代码行数:5,代码来源:class.ticket.php

示例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, "...");
开发者ID:kumarsivarajan,项目名称:ctrl-dock,代码行数:31,代码来源:editticket.inc.php


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