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


PHP Render::dateFormat方法代码示例

本文整理汇总了PHP中Render::dateFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP Render::dateFormat方法的具体用法?PHP Render::dateFormat怎么用?PHP Render::dateFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Render的用法示例。


在下文中一共展示了Render::dateFormat方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get

 public static function get($inputData = array())
 {
     $limitQuery = "";
     $limitShow = isset($inputData['limitShow']) ? $inputData['limitShow'] : 0;
     $limitPage = isset($inputData['limitPage']) ? $inputData['limitPage'] : 0;
     $limitPage = (int) $limitPage > 0 ? $limitPage : 0;
     $limitPosition = $limitPage * (int) $limitShow;
     $limitQuery = (int) $limitShow == 0 ? '' : " limit {$limitPosition},{$limitShow}";
     $limitQuery = isset($inputData['limitQuery']) ? $inputData['limitQuery'] : $limitQuery;
     $field = "cronid,timenumber,timetype,timeinterval,last_update,jobdata,date_added,status";
     $selectFields = isset($inputData['selectFields']) ? $inputData['selectFields'] : $field;
     $whereQuery = isset($inputData['where']) ? $inputData['where'] : '';
     $orderBy = isset($inputData['orderby']) ? $inputData['orderby'] : 'order by cronid desc';
     $result = array();
     $command = "select {$selectFields} from cronjobs {$whereQuery} {$orderBy}";
     $queryCMD = isset($inputData['query']) ? $inputData['query'] : $command;
     $queryCMD .= $limitQuery;
     $query = Database::query($queryCMD);
     $inputData['isHook'] = isset($inputData['isHook']) ? $inputData['isHook'] : 'yes';
     if ((int) $query->num_rows > 0) {
         while ($row = Database::fetch_assoc($query)) {
             if (isset($row['jobdata'])) {
                 $row['jobdata'] = String::jsonToArray($row['jobdata']);
             }
             $row['date_addedFormat'] = Render::dateFormat($row['date_added']);
             $result[] = $row;
         }
     } else {
         return false;
     }
     // print_r($result);die();
     return $result;
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:33,代码来源:Cronjobs.php

示例2: get

 public static function get($inputData = array())
 {
     $limitQuery = "";
     $limitShow = isset($inputData['limitShow']) ? $inputData['limitShow'] : 0;
     $limitPage = isset($inputData['limitPage']) ? $inputData['limitPage'] : 0;
     $limitPage = (int) $limitPage > 0 ? $limitPage : 0;
     $limitPosition = $limitPage * (int) $limitShow;
     $limitQuery = (int) $limitShow == 0 ? '' : " limit {$limitPosition},{$limitShow}";
     $limitQuery = isset($inputData['limitQuery']) ? $inputData['limitQuery'] : $limitQuery;
     $field = "id,parentid,date_added,title,url,status,sort_order";
     $selectFields = isset($inputData['selectFields']) ? $inputData['selectFields'] : $field;
     $whereQuery = isset($inputData['where']) ? $inputData['where'] : '';
     $orderBy = isset($inputData['orderby']) ? $inputData['orderby'] : 'order by id desc';
     $result = array();
     $command = "select {$selectFields} from " . Database::getPrefix() . "links {$whereQuery}";
     $command .= " {$orderBy}";
     $queryCMD = isset($inputData['query']) ? $inputData['query'] : $command;
     $queryCMD .= $limitQuery;
     $cache = isset($inputData['cache']) ? $inputData['cache'] : 'yes';
     $cacheTime = isset($inputData['cacheTime']) ? $inputData['cacheTime'] : -1;
     $md5Query = md5($queryCMD);
     if ($cache == 'yes') {
         // Load dbcache
         $loadCache = Cache::loadKey('dbcache/system/link/' . $md5Query, $cacheTime);
         if ($loadCache != false) {
             $loadCache = unserialize($loadCache);
             return $loadCache;
         }
         // end load
     }
     $query = Database::query($queryCMD);
     if (isset(Database::$error[5])) {
         return false;
     }
     $inputData['isHook'] = isset($inputData['isHook']) ? $inputData['isHook'] : 'yes';
     if ((int) $query->num_rows > 0) {
         while ($row = Database::fetch_assoc($query)) {
             if (isset($row['title'])) {
                 $row['title'] = String::decode($row['title']);
             }
             if (isset($row['date_added'])) {
                 $row['date_addedFormat'] = Render::dateFormat($row['date_added']);
             }
             if (isset($row['url']) && !preg_match('/^http/i', $row['url'])) {
                 if (preg_match('/^\\/(.*?)$/i', $row['url'], $matches)) {
                     $tmp = $matches[1];
                     $row['urlFormat'] = System::getUrl() . $tmp;
                 }
             }
             $result[] = $row;
         }
     } else {
         return false;
     }
     // Save dbcache
     Cache::saveKey('dbcache/system/link/' . $md5Query, serialize($result));
     // end save
     return $result;
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:59,代码来源:Links.php

示例3: get

 public static function get($inputData = array())
 {
     $limitQuery = "";
     $limitShow = isset($inputData['limitShow']) ? $inputData['limitShow'] : 0;
     $limitPage = isset($inputData['limitPage']) ? $inputData['limitPage'] : 0;
     $limitPage = (int) $limitPage > 0 ? $limitPage : 0;
     $limitPosition = $limitPage * (int) $limitShow;
     $limitQuery = (int) $limitShow == 0 ? '' : " limit {$limitPosition},{$limitShow}";
     $limitQuery = isset($inputData['limitQuery']) ? $inputData['limitQuery'] : $limitQuery;
     $field = "userid,groupid,username,firstname,lastname,image,email,password,userdata,ip,verify_code,parentid,date_added,forgot_code,forgot_date";
     $selectFields = isset($inputData['selectFields']) ? $inputData['selectFields'] : $field;
     $whereQuery = isset($inputData['where']) ? $inputData['where'] : '';
     $orderBy = isset($inputData['orderby']) ? $inputData['orderby'] : 'order by date_added desc';
     $result = array();
     $prefix = '';
     $prefixall = Database::isPrefixAll();
     if ($prefixall != false || $prefixall == 'no') {
         $prefix = Database::getPrefix();
     }
     $command = "select {$selectFields} from " . $prefix . "users {$whereQuery}";
     $command .= " {$orderBy}";
     $queryCMD = isset($inputData['query']) ? $inputData['query'] : $command;
     $queryCMD .= $limitQuery;
     $cache = isset($inputData['cache']) ? $inputData['cache'] : 'yes';
     $cacheTime = isset($inputData['cacheTime']) ? $inputData['cacheTime'] : -1;
     $md5Query = md5($queryCMD);
     if ($cache == 'yes') {
         // Load dbcache
         $loadCache = Cache::loadKey('dbcache/system/user/' . $md5Query, $cacheTime);
         if ($loadCache != false) {
             $loadCache = unserialize($loadCache);
             return $loadCache;
         }
         // end load
     }
     // echo $queryCMD;die();
     $query = Database::query($queryCMD);
     if (isset(Database::$error[5])) {
         return false;
     }
     if ((int) $query->num_rows > 0) {
         while ($row = Database::fetch_assoc($query)) {
             if (isset($row['date_added'])) {
                 $row['date_addedFormat'] = Render::dateFormat($row['date_added']);
             }
             if (isset($row['image'])) {
                 $row['imageFormat'] = self::getAvatar($row['image']);
             }
             $result[] = $row;
         }
     } else {
         return false;
     }
     // Save dbcache
     Cache::saveKey('dbcache/system/user/' . $md5Query, serialize($result));
     // end save
     return $result;
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:58,代码来源:Users.php

示例4: get

 public static function get($inputData = array())
 {
     $limitQuery = "";
     $limitShow = isset($inputData['limitShow']) ? $inputData['limitShow'] : 0;
     $limitPage = isset($inputData['limitPage']) ? $inputData['limitPage'] : 0;
     $limitPage = (int) $limitPage > 0 ? $limitPage : 0;
     $limitPosition = $limitPage * (int) $limitShow;
     $limitQuery = (int) $limitShow == 0 ? '' : " limit {$limitPosition},{$limitShow}";
     $limitQuery = isset($inputData['limitQuery']) ? $inputData['limitQuery'] : $limitQuery;
     $field = "groupid,group_title,groupdata";
     $selectFields = isset($inputData['selectFields']) ? $inputData['selectFields'] : $field;
     $whereQuery = isset($inputData['where']) ? $inputData['where'] : '';
     $orderBy = isset($inputData['orderby']) ? $inputData['orderby'] : 'order by groupid desc';
     $result = array();
     $prefix = '';
     $prefixall = Database::isPrefixAll();
     if ($prefixall != false || $prefixall == 'no') {
         $prefix = Database::getPrefix();
     }
     $command = "select {$selectFields} from " . $prefix . "usergroups {$whereQuery}";
     $command .= " {$orderBy}";
     $queryCMD = isset($inputData['query']) ? $inputData['query'] : $command;
     $queryCMD .= $limitQuery;
     $cache = isset($inputData['cache']) ? $inputData['cache'] : 'yes';
     $cacheTime = isset($inputData['cacheTime']) ? $inputData['cacheTime'] : 15;
     $md5Query = md5($queryCMD);
     if ($cache == 'yes') {
         // Load dbcache
         $loadCache = Cache::loadKey('dbcache/system/usergroup/' . $md5Query, $cacheTime);
         if ($loadCache != false) {
             $loadCache = unserialize($loadCache);
             return $loadCache;
         }
         // end load
     }
     $query = Database::query($queryCMD);
     if (isset(Database::$error[5])) {
         return false;
     }
     $inputData['isHook'] = isset($inputData['isHook']) ? $inputData['isHook'] : 'yes';
     if ((int) $query->num_rows > 0) {
         while ($row = Database::fetch_assoc($query)) {
             if (isset($row['date_added'])) {
                 $row['date_addedFormat'] = Render::dateFormat($row['date_added']);
             }
             if (isset($row['groupdata'])) {
                 $row['groupdata'] = self::arrayToLine($row['groupdata']);
             }
             $result[] = $row;
         }
     } else {
         return false;
     }
     // Save dbcache
     Cache::saveKey('dbcache/system/usergroup/' . $md5Query, serialize($result));
     // end save
     return $result;
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:58,代码来源:UserGroups.php

示例5: get

 public static function get($inputData = array())
 {
     $limitQuery = "";
     $limitShow = isset($inputData['limitShow']) ? $inputData['limitShow'] : 0;
     $limitPage = isset($inputData['limitPage']) ? $inputData['limitPage'] : 0;
     $limitPage = (int) $limitPage > 0 ? $limitPage : 0;
     $limitPosition = $limitPage * (int) $limitShow;
     $limitQuery = (int) $limitShow == 0 ? '' : " limit {$limitPosition},{$limitShow}";
     $limitQuery = isset($inputData['limitQuery']) ? $inputData['limitQuery'] : $limitQuery;
     $field = "requestid,userid,total_request,date_added,status,comments";
     $selectFields = isset($inputData['selectFields']) ? $inputData['selectFields'] : $field;
     $whereQuery = isset($inputData['where']) ? $inputData['where'] : '';
     $orderBy = isset($inputData['orderby']) ? $inputData['orderby'] : 'order by requestid desc';
     $result = array();
     $command = "select {$selectFields} from " . Database::getPrefix() . "request_payments {$whereQuery}";
     $command .= " {$orderBy}";
     $queryCMD = isset($inputData['query']) ? $inputData['query'] : $command;
     $queryCMD .= $limitQuery;
     $cache = isset($inputData['cache']) ? $inputData['cache'] : 'yes';
     $cacheTime = isset($inputData['cacheTime']) ? $inputData['cacheTime'] : 1;
     if ($cache == 'yes') {
         // Load dbcache
         $loadCache = DBCache::get($queryCMD, $cacheTime);
         if ($loadCache != false) {
             $loadCache = unserialize($loadCache);
             return $loadCache;
         }
         // end load
     }
     $query = Database::query($queryCMD);
     if (isset(Database::$error[5])) {
         return false;
     }
     $inputData['isHook'] = isset($inputData['isHook']) ? $inputData['isHook'] : 'yes';
     if ((int) $query->num_rows > 0) {
         while ($row = Database::fetch_assoc($query)) {
             if (isset($row['comments'])) {
                 $row['comments'] = String::decode($row['comments']);
             }
             if (isset($row['date_added'])) {
                 $row['date_addedFormat'] = Render::dateFormat($row['date_added']);
             }
             if ($inputData['isHook'] == 'yes') {
                 if (isset($row['comments'])) {
                     $row['comments'] = Shortcode::load($row['comments']);
                 }
             }
             $result[] = $row;
         }
     } else {
         return false;
     }
     // Save dbcache
     DBCache::make(md5($queryCMD), $result);
     // end save
     return $result;
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:57,代码来源:RequestPayments.php

示例6: get

 public static function get($inputData = array())
 {
     $limitQuery = "";
     $limitShow = isset($inputData['limitShow']) ? $inputData['limitShow'] : 0;
     $limitPage = isset($inputData['limitPage']) ? $inputData['limitPage'] : 0;
     $limitPage = (int) $limitPage > 0 ? $limitPage : 0;
     $limitPosition = $limitPage * (int) $limitShow;
     $limitQuery = (int) $limitShow == 0 ? '' : " limit {$limitPosition},{$limitShow}";
     $limitQuery = isset($inputData['limitQuery']) ? $inputData['limitQuery'] : $limitQuery;
     $field = "userid,company,firstname,lastname,address_1,address_2,city,state,postcode,country,phone,fax";
     $selectFields = isset($inputData['selectFields']) ? $inputData['selectFields'] : $field;
     $whereQuery = isset($inputData['where']) ? $inputData['where'] : '';
     $orderBy = isset($inputData['orderby']) ? $inputData['orderby'] : 'order by userid desc';
     $result = array();
     $command = "select {$selectFields} from " . Database::getPrefix() . "address {$whereQuery}";
     $command .= " {$orderBy}";
     $queryCMD = isset($inputData['query']) ? $inputData['query'] : $command;
     $queryCMD .= $limitQuery;
     $cache = isset($inputData['cache']) ? $inputData['cache'] : 'yes';
     $cacheTime = isset($inputData['cacheTime']) ? $inputData['cacheTime'] : -1;
     $md5Query = md5($queryCMD);
     if ($cache == 'yes') {
         // Load dbcache
         $loadCache = Cache::loadKey('dbcache/system/address/' . $md5Query, $cacheTime);
         if ($loadCache != false) {
             $loadCache = unserialize($loadCache);
             return $loadCache;
         }
         // end load
     }
     $query = Database::query($queryCMD);
     if (isset(Database::$error[5])) {
         return false;
     }
     $inputData['isHook'] = isset($inputData['isHook']) ? $inputData['isHook'] : 'yes';
     if ((int) $query->num_rows > 0) {
         while ($row = Database::fetch_assoc($query)) {
             if (isset($row['title'])) {
                 $row['title'] = String::decode($row['title']);
             }
             if (isset($row['friendly_url'])) {
                 $row['url'] = self::url($row);
             }
             if (isset($row['date_added'])) {
                 $row['date_addedFormat'] = Render::dateFormat($row['date_added']);
             }
             $result[] = $row;
         }
     } else {
         return false;
     }
     // Save dbcache
     Cache::saveKey('dbcache/system/address/' . $md5Query, serialize($result));
     // end save
     return $result;
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:56,代码来源:Address.php

示例7: get

 public static function get($inputData = array())
 {
     $limitQuery = "";
     $limitShow = isset($inputData['limitShow']) ? $inputData['limitShow'] : 0;
     $limitPage = isset($inputData['limitPage']) ? $inputData['limitPage'] : 0;
     $limitPage = (int) $limitPage > 0 ? $limitPage : 0;
     $limitPosition = $limitPage * (int) $limitShow;
     $limitQuery = (int) $limitShow == 0 ? '' : " limit {$limitPosition},{$limitShow}";
     $limitQuery = isset($inputData['limitQuery']) ? $inputData['limitQuery'] : $limitQuery;
     $field = "commentid,postid,type,fullname,email,parentid,date_added,status,content";
     $selectFields = isset($inputData['selectFields']) ? $inputData['selectFields'] : $field;
     $whereQuery = isset($inputData['where']) ? $inputData['where'] : '';
     $orderBy = isset($inputData['orderby']) ? $inputData['orderby'] : 'order by commentid desc';
     $result = array();
     $command = "select {$selectFields} from " . Database::getPrefix() . "comments {$whereQuery}";
     $command .= " {$orderBy}";
     $queryCMD = isset($inputData['query']) ? $inputData['query'] : $command;
     $queryCMD .= $limitQuery;
     $cache = isset($inputData['cache']) ? $inputData['cache'] : 'yes';
     $cacheTime = isset($inputData['cacheTime']) ? $inputData['cacheTime'] : -1;
     $md5Query = md5($queryCMD);
     if ($cache == 'yes') {
         // Load dbcache
         $loadCache = Cache::loadKey('dbcache/system/comment/' . $md5Query, $cacheTime);
         if ($loadCache != false) {
             $loadCache = unserialize($loadCache);
             return $loadCache;
         }
         // end load
     }
     $query = Database::query($queryCMD);
     if (isset(Database::$error[5])) {
         return false;
     }
     $inputData['isHook'] = isset($inputData['isHook']) ? $inputData['isHook'] : 'yes';
     if ((int) $query->num_rows > 0) {
         while ($row = Database::fetch_assoc($query)) {
             if (isset($row['fullname'])) {
                 $row['fullname'] = String::decode($row['fullname']);
             }
             if (isset($row['content'])) {
                 $row['content'] = String::decode($row['content']);
             }
             if (isset($row['date_added'])) {
                 $row['date_addedFormat'] = Render::dateFormat($row['date_added']);
             }
             if ($inputData['isHook'] == 'yes') {
                 if (isset($row['content'])) {
                     $row['content'] = Shortcode::toHTML($row['content']);
                 }
             }
             $result[] = $row;
         }
     } else {
         return false;
     }
     // Save dbcache
     Cache::saveKey('dbcache/system/comment/' . $md5Query, serialize($result));
     // end save
     return $result;
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:61,代码来源:Comments.php

示例8: get

 public static function get($inputData = array())
 {
     $limitQuery = "";
     $limitShow = isset($inputData['limitShow']) ? $inputData['limitShow'] : 0;
     $limitPage = isset($inputData['limitPage']) ? $inputData['limitPage'] : 0;
     $limitPage = (int) $limitPage > 0 ? $limitPage : 0;
     $limitPosition = $limitPage * (int) $limitShow;
     $limitQuery = (int) $limitShow == 0 ? '' : " limit {$limitPosition},{$limitShow}";
     $limitQuery = isset($inputData['limitQuery']) ? $inputData['limitQuery'] : $limitQuery;
     $field = "postid,title,catid,userid,parentid,image,sort_order,date_added,views,content,type,keywords,friendly_url,is_featured,date_featured,expires_date,rating,allowcomment,status";
     $selectFields = isset($inputData['selectFields']) ? $inputData['selectFields'] : $field;
     $whereQuery = isset($inputData['where']) ? $inputData['where'] : '';
     $orderBy = isset($inputData['orderby']) ? $inputData['orderby'] : 'order by postid desc';
     $result = array();
     $command = "select {$selectFields} from " . Database::getPrefix() . "post {$whereQuery}";
     $command .= " {$orderBy}";
     $queryCMD = isset($inputData['query']) ? $inputData['query'] : $command;
     $queryCMD .= $limitQuery;
     $cache = isset($inputData['cache']) ? $inputData['cache'] : 'yes';
     $cacheTime = isset($inputData['cacheTime']) ? $inputData['cacheTime'] : -1;
     $md5Query = md5($queryCMD);
     if ($cache == 'yes') {
         // Load dbcache
         $loadCache = Cache::loadKey('dbcache/system/post/' . $md5Query, $cacheTime);
         if ($loadCache != false) {
             $loadCache = unserialize($loadCache);
             return $loadCache;
         }
         // end load
     }
     $query = Database::query($queryCMD);
     if (isset(Database::$error[5])) {
         return false;
     }
     $inputData['isHook'] = isset($inputData['isHook']) ? $inputData['isHook'] : 'yes';
     if ((int) $query->num_rows > 0) {
         while ($row = Database::fetch_assoc($query)) {
             if (isset($row['title'])) {
                 $row['title'] = String::decode($row['title']);
             }
             if (isset($row['friendly_url'])) {
                 $row['url'] = self::url($row);
             }
             if (isset($row['content'])) {
                 $row['content'] = String::decode($row['content']);
                 // die($row['content']);
             }
             if (isset($row['date_added'])) {
                 $row['date_addedReal'] = $row['date_added'];
                 $row['date_added'] = Render::dateFormat($row['date_added']);
             }
             if ($inputData['isHook'] == 'yes') {
                 if (isset($row['content'])) {
                     $row['content'] = String::decode($row['content']);
                     $row['content'] = html_entity_decode($row['content']);
                     $row['content'] = Shortcode::loadInTemplate($row['content']);
                     $row['content'] = Shortcode::load($row['content']);
                     $row['content'] = Shortcode::toHTML($row['content']);
                 }
             }
             $result[] = $row;
         }
     } else {
         return false;
     }
     // Save dbcache
     Cache::saveKey('dbcache/system/post/' . $md5Query, serialize($result));
     // end save
     return $result;
 }
开发者ID:neworldwebsites,项目名称:noblessecms,代码行数:70,代码来源:Post.php


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