本文整理匯總了PHP中MyDate函數的典型用法代碼示例。如果您正苦於以下問題:PHP MyDate函數的具體用法?PHP MyDate怎麽用?PHP MyDate使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了MyDate函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GetSendTimeMk
function GetSendTimeMk($mktime)
{
if ($mktime == "0") {
return "<font color='red'>未發送</font>";
} else {
return MyDate('Y-m-d H:i:s', $mktime);
}
}
示例2: GetTagList
/**
* 獲得特定的Tag列表
*
* @param unknown_type $dsql
* @param unknown_type $pageno
* @param unknown_type $pagesize
* @param unknown_type $orderby
*/
function GetTagList($dsql, $pageno, $pagesize, $orderby = 'aid')
{
global $cfg_phpurl, $addsql;
$start = ($pageno - 1) * $pagesize;
$printhead = "<table width='98%' border='0' cellpadding='1' cellspacing='1' align='center' class='tbtitle' style='background:#E2F5BC;margin-bottom:5px;'>\r\n\t\t<tr align='center' bgcolor='#FBFCE2'>\r\n <td width='5%' class='tbsname'><a href='#' onclick=\"ReloadPage('aid')\"><u>ID</u></a></td>\r\n\t\t <td width='20%' class='tbsname'>列表名稱</td>\r\n\t\t <td width='20%' class='tbsname'>模板文件</td>\r\n\t\t <td width='5%' class='tbsname'><a href='#' onclick=\"ReloadPage('click')\"><u>點擊</u></a></td>\r\n\t\t <td width='15%' class='tbsname'>創建時間</td>\r\n\t\t <td class='tbsname'>管理</td>\r\n \t\t </tr>\r\n";
echo $printhead;
$dsql->SetQuery("Select aid,title,templet,click,edtime,namerule,listdir,defaultpage,nodefault From #@__freelist {$addsql} order by {$orderby} desc limit {$start},{$pagesize} ");
$dsql->Execute();
while ($row = $dsql->GetArray()) {
$listurl = GetFreeListUrl($row['aid'], $row['namerule'], $row['listdir'], $row['defaultpage'], $row['nodefault']);
$line = "\r\n\t<tr align='center' bgcolor='#FFFFFF' onMouseMove=\"javascript:this.bgColor='#FCFEDA';\" onMouseOut=\"javascript:this.bgColor='#FFFFFF';\">\r\n <td>{$row['aid']}</td>\r\n <td> <a href='{$listurl}' target='_blank'>{$row['title']}</a> </td>\r\n <td> {$row['templet']} </td>\r\n <td> {$row['click']} </td>\r\n <td>" . MyDate("y-m-d", $row['edtime']) . "</td>\r\n <td> <a href='#' onclick='EditNote({$row['aid']})'>更改</a> |\r\n \t<a href='#' onclick='CreateNote({$row['aid']})'>更新</a> |\r\n \t<a href='#' onclick='DelNote({$row['aid']})'>刪除</a>\r\n\t</td>\r\n </tr>";
echo $line;
}
echo "</table>\r\n";
}
示例3: GetKeywordList
function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid')
{
global $cfg_phpurl;
$start = ($pageno - 1) * $pagesize;
$printhead = "<table width='98%' border='0' cellpadding='1' cellspacing='1' bgcolor='#D1DDAA' style='margin-bottom:3px'>\r\n <tr align='center' bgcolor='#E9F4D5' height='24'>\r\n <td width='6%' height='23'><a href='#' onclick=\"ReloadPage('aid')\"><u>ID</u></a></td>\r\n <td width='20%'>關鍵字</td>\r\n <td width='35%'>分詞結果</td>\r\n <td width='6%'><a href='#' onclick=\"ReloadPage('count')\"><u>頻率</u></a></td>\r\n <td width='6%'><a href='#' onclick=\"ReloadPage('result')\"><u>結果</u></a></td>\r\n <td width='16%'><a href='#' onclick=\"ReloadPage('lasttime')\"><u>最後搜索時間</u></a></td>\r\n <td>管理</td>\r\n </tr>\r\n";
echo $printhead;
if ($orderby == 'result') {
$orderby = $orderby . " asc";
} else {
$orderby = $orderby . " desc";
}
$dsql->SetQuery("Select * From #@__search_keywords order by {$orderby} limit {$start},{$pagesize} ");
$dsql->Execute();
while ($row = $dsql->GetArray()) {
$line = "\r\n <tr align='center' bgcolor='#FFFFFF' onMouseMove=\"javascript:this.bgColor='#FCFEDA';\" onMouseOut=\"javascript:this.bgColor='#FFFFFF';\">\r\n <td height='24'>{$row['aid']}</td>\r\n <td><input name='keyword' type='text' id='keyword{$row['aid']}' value='{$row['keyword']}' class='ininput'></td>\r\n <td><input name='spwords' type='text' id='spwords{$row['aid']}' value='{$row['spwords']}' class='ininput'></td>\r\n <td><input name='count' type='text' id='count{$row['aid']}' value='{$row['count']}' class='ininput'></td>\r\n <td><a href='{$cfg_phpurl}/search.php?kwtype=0&keyword=" . urlencode($row['keyword']) . "&searchtype=titlekeyword' target='_blank'><u>{$row['result']}</u></a></td>\r\n <td>" . MyDate("Y-m-d H:i:s", $row['lasttime']) . "</td>\r\n <td>\r\n <a href='#' onclick='UpdateNote({$row['aid']})'>更新</a> |\r\n <a href='#' onclick='DelNote({$row['aid']})'>刪除</a>\r\n </td>\r\n </tr>";
echo $line;
}
echo "</table>\r\n";
}
示例4: GetList
/**
* 獲得特定的關鍵字列表
*
* @access public
* @param object $dsql 數據庫操作類
* @param int $pageno 頁麵數
* @param int $pagesize 頁麵尺寸
* @return string
*/
function GetList(&$dsql, $pageno, $pagesize)
{
global $cfg_phpurl, $cfg_ml;
$pagesize = intval($pagesize);
$pageno = intval($pageno);
$start = ($pageno - 1) * $pagesize;
$dsql->SetQuery("SELECT * FROM `#@__member_guestbook` WHERE mid='" . $cfg_ml->M_ID . "' ORDER BY aid DESC LIMIT {$start},{$pagesize} ");
$dsql->Execute();
$line = '';
while ($row = $dsql->GetArray()) {
$line .= "<table width='100%' border='0' cellpadding='0' cellspacing='0' class='list'>\r\n <thead>\r\n <tr>\r\n <th colspan='6'><strong class='fLeft' style='padding-left: 5px;'>留言標題:" . $row['title'] . "</strong><span class='fRight'>\r\n <input name=\"ids\" type=\"checkbox\" id=\"ids\" value=\"" . $row['aid'] . "\" />\r\n <a href='#' onclick='DelNote(" . $row['aid'] . ")' style='color:#29A5C9;'>刪除</a></span></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr>\r\n <td width='18%' style='padding-left: 10px;'>用戶稱呼:" . $row['uname'] . "</td>\r\n <td>時間:" . MyDate("Y-m-d H:i", $row['dtime']) . " IP地址:" . $row['ip'] . " ";
if (!empty($row['gid'])) {
$line .= " <a href='index.php?uid={$row['uname']}&action=infos' target='_blank'>資料</a> <a href='index.php?uid={$row['uname']}' target='_blank'>空間</a> <a href='index.php?uid={$row['uname']}&action=guestbook' target='_blank'>回複</a> ";
}
$line .= "</td>\r\n </tr>\r\n <tr>\r\n <td colspan='2' style='padding-left: 10px;'>" . Text2Html($row['msg']) . "</td>\r\n </tr>\r\n </tbody>\r\n </table>";
}
$line = $line == '' ? '暫無留言' : $line;
echo $line;
}
示例5: GetList
function GetList($dsql, $pageno, $pagesize)
{
global $cfg_phpurl, $cfg_ml;
$pagesize = intval($pagesize);
$pageno = intval($pageno);
$start = ($pageno - 1) * $pagesize;
$dsql->SetQuery("Select * From `#@__member_guestbook` where mid='" . $cfg_ml->M_ID . "' order by aid desc limit {$start},{$pagesize} ");
$dsql->Execute();
$line = '';
while ($row = $dsql->GetArray()) {
$line .= "<table cellspacing='1' class='list mB10'>\r\n <thead>\r\n <tr>\r\n <th colspan='2' ><strong class='fLeft'>留言標題:" . $row['title'] . "</strong><span class='fRight'>\r\n <input name=\"ids\" type=\"checkbox\" id=\"ids\" value=\"" . $row['aid'] . "\" />\r\n <a href='#' onclick='DelNote(" . $row['aid'] . ")'>刪除</a></span></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr>\r\n <td width='15%' align='left' valign='top'>用戶稱呼:" . $row['uname'] . "</td>\r\n <td>時間:" . MyDate("Y-m-d H:i", $row['dtime']) . " IP地址:" . $row['ip'] . " ";
if (!empty($row['gid'])) {
$line .= " <a href='index.php?uid={$row['uname']}&action=infos' target='_blank'>資料</a> <a href='index.php?uid={$row['uname']}' target='_blank'>空間</a> <a href='index.php?uid={$row['uname']}&action=guestbook' target='_blank'>回複</a> ";
}
$line .= "\r\n\t\t</td>\r\n </tr>\r\n <tr>\r\n <td align='left' valign='top'><p>Email:" . $row['email'] . "</p><p>聯係電話:" . $row['tel'] . "</p><p>其它:" . $row['qq'] . "</p></td>\r\n <td align='left' valign='top'>" . Text2Html($row['msg']) . "</td>\r\n </tr>\r\n </tbody>\r\n</table>";
}
$line = $line == '' ? '暫無留言' : $line;
echo $line;
}
示例6: GetKeywordList
function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid')
{
global $cfg_phpurl;
$start = ($pageno - 1) * $pagesize;
$printhead = "<form name='form3' action=\"search_keywords_main.php\" method=\"post\">\r\n <input name=\"dopost\" type=\"hidden\" value=\"\">\r\n <table width='98%' border='0' cellpadding='1' cellspacing='1' bgcolor='#cfcfcf' style='margin-bottom:3px' align='center'>\r\n <tr align='center' bgcolor='#FBFCE2' height='24'>\r\n <td width='5%'>選擇</td>\r\n <td width='6%' height='23'><a href='#' onclick=\"ReloadPage('aid')\"><u>ID</u></a></td>\r\n <td width='20%'>關鍵字</td>\r\n <td width='35%'>分詞結果</td>\r\n <td width='6%'><a href='#' onclick=\"ReloadPage('count')\"><u>頻率</u></a></td>\r\n <td width='6%'><a href='#' onclick=\"ReloadPage('result')\"><u>結果</u></a></td>\r\n <td width='15%'><a href='#' onclick=\"ReloadPage('lasttime')\"><u>最後搜索時間</u></a></td>\r\n <td>管理</td>\r\n </tr>\r\n\r\n ";
echo $printhead;
if ($orderby == 'result') {
$orderby = $orderby . " ASC";
} else {
$orderby = $orderby . " DESC";
}
$dsql->SetQuery("SELECT * FROM #@__search_keywords ORDER BY {$orderby} LIMIT {$start},{$pagesize} ");
$dsql->Execute();
while ($row = $dsql->GetArray()) {
$line = "\r\n <tr align='center' bgcolor='#FFFFFF' onMouseMove=\"javascript:this.bgColor='#FCFDEE';\" onMouseOut=\"javascript:this.bgColor='#FFFFFF';\">\r\n <td height='24'><input name=\"aids[]\" type=\"checkbox\" class=\"np\" value=\"{$row['aid']}\" /></td>\r\n <td height='24'>{$row['aid']}</td>\r\n <td style='padding:5px;'><input name='keyword' type='text' id='keyword{$row['aid']}' value='{$row['keyword']}' style='width:93%;'></td>\r\n <td style='padding:5px;'><input name='spwords' type='text' id='spwords{$row['aid']}' value='{$row['spwords']}' style='width:95%;'></td>\r\n <td style='padding:5px;'><input name='count' type='text' id='count{$row['aid']}' value='{$row['count']}' size='5'></td>\r\n <td><a href='{$cfg_phpurl}/search.php?kwtype=0&keyword=" . urlencode($row['keyword']) . "&searchtype=titlekeyword' target='_blank'><u>{$row['result']}</u></a></td>\r\n <td>" . MyDate("Y-m-d H:i:s", $row['lasttime']) . "</td>\r\n <td>\r\n <a href='#' onclick='UpdateNote({$row['aid']})'>更新</a> |\r\n <a href='#' onclick='DelNote({$row['aid']})'>刪除</a>\r\n </td>\r\n </tr>\r\n ";
echo $line;
}
echo " <tr align='left' bgcolor='#ffffff' height='30'>\r\n <td colspan='8' style='padding-left:10px;'>\r\n <a href='javascript:selAll()' class='coolbg np'>反選</a>\r\n <a href='javascript:noselAll()' class='coolbg np'>取消</a>\r\n <a href='javascript:delall()' class='coolbg np'>刪除</a>\r\n </td>\r\n </tr>\r\n";
echo "</table></form>\r\n";
}
示例7: __construct
function __construct($kptime = -1, $cache = FALSE)
{
global $dsql;
if ($kptime == -1) {
$this->M_KeepTime = 3600 * 24 * 7;
} else {
$this->M_KeepTime = $kptime;
}
$formcache = FALSE;
$this->M_ID = $this->GetNum(GetCookie("DedeUserID"));
$this->M_LoginTime = GetCookie("DedeLoginTime");
$this->fields = array();
$this->isAdmin = FALSE;
if (empty($this->M_ID)) {
$this->ResetUser();
} else {
$this->M_ID = intval($this->M_ID);
if ($cache) {
$this->fields = GetCache($this->memberCache, $this->M_ID);
if (empty($this->fields)) {
$this->fields = $dsql->GetOne("Select * From `#@__member` where mid='{$this->M_ID}' ");
} else {
$formcache = TRUE;
}
} else {
$this->fields = $dsql->GetOne("Select * From `#@__member` where mid='{$this->M_ID}' ");
}
if (is_array($this->fields)) {
#api{{
if (defined('UC_API') && @(include_once DEDEROOT . '/uc_client/client.php')) {
if ($data = uc_get_user($this->fields['userid'])) {
if (uc_check_avatar($data[0]) && !strstr($this->fields['face'], UC_API)) {
$this->fields['face'] = UC_API . '/avatar.php?uid=' . $data[0] . '&size=middle';
$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET `face`='" . $this->fields['face'] . "' WHERE `mid`='{$this->M_ID}'");
}
}
}
#/aip}}
//間隔一小時更新一次用戶登錄時間
if (time() - $this->M_LoginTime > 3600) {
$dsql->ExecuteNoneQuery("update `#@__member` set logintime='" . time() . "',loginip='" . GetIP() . "' where mid='" . $this->fields['mid'] . "';");
PutCookie("DedeLoginTime", time(), $this->M_KeepTime);
}
$this->M_LoginID = $this->fields['userid'];
$this->M_MbType = $this->fields['mtype'];
$this->M_Money = $this->fields['money'];
$this->M_UserName = FormatUsername($this->fields['uname']);
$this->M_Scores = $this->fields['scores'];
$this->M_Face = $this->fields['face'];
$this->M_Rank = $this->fields['rank'];
$this->M_Spacesta = $this->fields['spacesta'];
$sql = "Select titles From #@__scores where integral<={$this->fields['scores']} order by integral desc";
$scrow = $dsql->GetOne($sql);
$this->fields['honor'] = $scrow['titles'];
$this->M_Honor = $this->fields['honor'];
if ($this->fields['matt'] == 10) {
$this->isAdmin = TRUE;
}
$this->M_UpTime = $this->fields['uptime'];
$this->M_ExpTime = $this->fields['exptime'];
$this->M_JoinTime = MyDate('Y-m-d', $this->fields['jointime']);
if ($this->M_Rank > 10 && $this->M_UpTime > 0) {
$this->M_HasDay = $this->Judgemember();
}
if (!$formcache) {
SetCache($this->memberCache, $this->M_ID, $this->fields, 1800);
}
} else {
$this->ResetUser();
}
}
}
示例8: ListSkin
/**
* 列出風格目錄
*
* @access public
* @param string
* @return string
*/
function ListSkin()
{
global $cfg_ml;
$dir = 'space';
$allskins = array();
//讀取文件夾
if (file_exists($dir . '/skinlist.inc')) {
$ds = file($dir . '/skinlist.inc');
foreach ($ds as $d) {
$d = trim($d);
if (empty($d) || substr($d, 0, 2) == '//') {
continue;
}
if (!is_dir($dir . '/' . $d)) {
continue;
}
$dirs[] = $d;
}
} else {
$fp = opendir($dir);
while ($sysname = readdir($fp)) {
$dirs[] = $sysname;
}
closedir($dh);
}
//獲得模板摘要信息
foreach ($dirs as $sysname) {
if ($sysname == '.' || $sysname == '..' || $sysname == 'CVS' || !file_exists("{$dir}/{$sysname}/info.txt")) {
continue;
}
$demopic = showdemopic($dir, $sysname);
$date = MyDate('Y-m-d', filemtime("{$dir}/{$sysname}"));
$listdb = array('sign' => $sysname, 'demo' => $demopic, 'name' => '', 'author' => 'Unkown', 'date' => '');
$infodatas = file("{$dir}/{$sysname}/info.txt");
foreach ($infodatas as $d) {
$d = trim($d);
if (empty($d)) {
continue;
}
$ds = explode(':', $d);
$listdb[trim($ds[0])] = trim($ds[1]);
}
if ($listdb['type'] != 'default' && $listdb['type'] != $cfg_ml->M_MbType) {
continue;
}
$allskins[] = $listdb;
}
//輸出模板列表
$num = 0;
print '<tr class="head" height="25"><td colspan="2"> <b></b></td></tr>';
foreach ($allskins as $value) {
if ($num == 0) {
print '<tr height="20">';
}
$num++;
print '<td class="b"><img src="' . $value['demo'] . '" width="150" height="150" border="0" /><br />';
print '風格名稱:' . $value['name'] . "({$value['sign']})" . '<br />';
print '風格作者:' . $value['author'] . '<br />';
//print '建立時間:'.$value['date'].'<br />';
print '操作:' . checkuse($value['sign']) . '';
if ($num == 4) {
$num = 0;
print '</tr>';
}
}
if ($num != 0) {
for ($i = $num; $num < 4; $num++) {
print ' <td class="b"> </td>';
}
print '</tr>';
}
print '</td>';
}
示例9: GetArcList
/**
* 獲取當前頁數據列表
*
* @param array $atts
* @param object $refObj
* @param array $fields
* @return array
*/
function GetArcList($atts, $refObj = '', $fields = array())
{
$rsArray = array();
$t1 = Exectime();
if (!$this->isQuery) {
$this->dsql->Execute('dlist', $this->sourceSql);
}
$i = 0;
while ($arr = $this->dsql->GetArray('dlist')) {
$i++;
$arr['filename'] = $arr['arcurl'] = GetFileUrl($arr['id'], $arr['typeid'], $arr['senddate'], $arr['title'], $arr['ismake'], $arr['arcrank'], $arr['namerule'], $arr['typedir'], $arr['money'], $arr['filename'], $arr['moresite'], $arr['siteurl'], $arr['sitepath']);
$arr['typeurl'] = GetTypeUrl($arr['typeid'], MfTypedir($arr['typedir']), $arr['isdefault'], $arr['defaultname'], $arr['ispart'], $arr['namerule2'], $arr['moresite'], $arr['siteurl'], $arr['sitepath']);
if ($arr['litpic'] == '-' || $arr['litpic'] == '') {
$arr['litpic'] = 'templets/images/dfpic.gif';
}
if (!preg_match("#^http:\\/\\/#i", $arr['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$arr['litpic'] = $GLOBALS['cfg_mainsite'] . $arr['litpic'];
}
$arr['picname'] = $arr['litpic'];
$arr['alttitle'] = $arr['userid'] . " 的空間";
$arr['face'] = $arr['face'] != '' ? $arr['face'] : 'images/nopic.gif';
if ($arr['userid'] != '') {
$arr['spaceurl'] = $GLOBALS['cfg_basehost'] . '/member/index.php?uid=' . $arr['userid'];
} else {
$arr['alttitle'] = $arr['title'];
$arr['spaceurl'] = $arr['arcurl'];
$arr['face'] = $arr['litpic'];
$arr['face'] = str_replace('defaultpic', 'dfcaicai', $arr['face']);
}
if (!empty($arr['lastpost'])) {
$arr['lastpost'] = MyDate('m-d h:i', $arr['lastpost']);
} else {
$arr['lastpost'] = "<a href='../plus/feedback.php?aid={$arr['id']}'>說幾句>></a>";
}
$rsArray[$i] = $arr;
if ($i >= $this->pageSize) {
break;
}
}
$this->dsql->FreeResult('dlist');
$this->queryTime = Exectime() - $t1;
return $rsArray;
}
示例10: GetDateMk
function GetDateMk($mktime)
{
return MyDate('Y-m-d', $mktime);
}
示例11: ShowMsg
ShowMsg("你所上傳的圖片類型不在許可列表,請更改係統對擴展名限定的配置!", "-1");
exit;
}
$nowtme = time();
$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp");
$imgfile_type = strtolower(trim($imgfile_type));
if (!in_array($imgfile_type, $sparr)) {
ShowMsg("上傳的圖片格式錯誤,請使用JPEG、GIF、PNG、WBMP格式的其中一種!", "-1");
exit;
}
$mdir = MyDate($cfg_addon_savetype, $nowtme);
if (!is_dir($cfg_basedir . $activepath . "/{$mdir}")) {
MkdirAll($cfg_basedir . $activepath . "/{$mdir}", $cfg_dir_purview);
CloseFtp();
}
$filename_name = $cuserLogin->getUserID() . '-' . dd2char(MyDate("ymdHis", $nowtme) . mt_rand(100, 999));
$filename = $mdir . '/' . $filename_name;
$fs = explode('.', $imgfile_name);
$filename = $filename . '.' . $fs[count($fs) - 1];
$filename_name = $filename_name . '.' . $fs[count($fs) - 1];
$fullfilename = $cfg_basedir . $activepath . "/" . $filename;
move_uploaded_file($imgfile, $fullfilename) or die("上傳文件到 {$fullfilename} 失敗!");
if ($cfg_remote_site == 'Y' && $remoteuploads == 1) {
//分析遠程文件路徑
$remotefile = str_replace(DEDEROOT, '', $fullfilename);
$localfile = '../..' . $remotefile;
//創建遠程文件夾
$remotedir = preg_replace('/[^\\/]*\\.(jpg|gif|bmp|png)/', '', $remotefile);
$ftp->rmkdir($remotedir);
$ftp->upload($localfile, $remotefile);
}
示例12: exit
$sname = '.bmp';
break;
}
}
if ($ftype == '') {
@unlink($Filedata);
echo "ERROR: Image type Error! ";
exit(0);
}
//保存原圖
$filedir = $cfg_image_dir . '/' . MyDate($cfg_addon_savetype, time());
if (!is_dir(DEDEROOT . $filedir)) {
MkdirAll($cfg_basedir . $filedir, $cfg_dir_purview);
CloseFtp();
}
$filename = $cuserLogin->getUserID() . '-' . dd2char(MyDate('ymdHis', time()));
if (file_exists($cfg_basedir . $filedir . '/' . $filename . $sname)) {
for ($i = 50; $i <= 5000; $i++) {
if (!file_exists($cfg_basedir . $filedir . '/' . $filename . '-' . $i . $sname)) {
$filename = $filename . '-' . $i;
break;
}
}
}
$fileurl = $filedir . '/' . $filename . $sname;
$rs = copy($FiledataNew, $cfg_basedir . $fileurl);
unlink($FiledataNew);
if (!$rs) {
echo "ERROR: Copy Uploadfile Error! ";
exit(0);
}
示例13: gb2utf8
if ($cfg_soft_lang == 'gb2312') {
$row['uname'] = gb2utf8($row['uname']);
$row['title'] = gb2utf8(htmlspecialchars_decode($row['title'], ENT_QUOTES));
$row['note'] = gb2utf8(quoteReplace($row['note']));
$row['dtime'] = gb2utf8(FloorTime(time() - $row['dtime']));
} else {
$row['title'] = htmlspecialchars_decode($row['title'], ENT_QUOTES);
$row['dtime'] = FloorTime(time() - $row['dtime']);
}
$feeds[] = $row;
}
} else {
require_once DEDEINC . '/channelunit.func.php';
$sql = "SELECT arc.id,arc.typeid,arc.senddate,arc.title,arc.ismake,arc.arcrank,arc.money,arc.filename,a.namerule,a.typedir,a.moresite,a.siteurl, a.sitepath,m.userid FROM #@__archives arc LEFT JOIN #@__arctype a on a.id=arc.typeid LEFT JOIN #@__member m on m.mid=arc.mid WHERE arc.arcrank > -1 ORDER BY arc.sortrank DESC LIMIT 12";
$dsql->SetQuery($sql);
$dsql->Execute();
while ($row = $dsql->GetArray()) {
$row['htmlurl'] = GetFileUrl($row['id'], $row['typeid'], $row['senddate'], $row['title'], $row['ismake'], $row['arcrank'], $row['namerule'], $row['typedir'], $row['money'], $row['filename'], $row['moresite'], $row['siteurl'], $row['sitepath']);
if ($cfg_soft_lang == 'gb2312') {
$row['userid'] = gb2utf8($row['userid']);
$row['title'] = gb2utf8($row['title']);
$row['senddate'] = gb2utf8(MyDate('m-d H:i', $row['senddate']));
} else {
$row['senddate'] = MyDate('m-d H:i', $row['senddate']);
}
$feeds[] = $row;
}
}
}
$output = json_encode($feeds);
print $output;
示例14: FormatDate
function FormatDate($fvalue, $ftype, $fformat = '')
{
if ($ftype == 'INT' || ($ftype = 'TIMESTAMP')) {
return MyDate($fvalue, $fformat);
} else {
return $fvalue;
}
}
示例15: dirname
require_once dirname(__FILE__) . '/header.php';
?>
</div>
<div class="mainbody">
<?php
require_once dirname(__FILE__) . '/lefterguest.php';
?>
<div class="rightarea">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="35%">登錄時間</td>
<td>登錄IP</td>
</tr>
<tr>
<td><strong class="loginfo"><?php
echo MyDate('Y-m-d H:i', $c_logintime);
?>
</strong></td>
<td><strong class="loginfo"><?php
echo $c_loginip;
?>
</strong></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
<h3 class="dftitle">賬號操作</h3>
您是第一次使用該賬號登錄,接下來需要 完善賬號信息 或 綁定已有賬號
<div class="pbArea">
<a href="?c=perfect" class="perfect">完善賬號信息</a>