當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。