• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getLastDate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getLastDate函数的典型用法代码示例。如果您正苦于以下问题:PHP getLastDate函数的具体用法?PHP getLastDate怎么用?PHP getLastDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: get_reply

 function get_reply($uid, $num = 20)
 {
     $pw_posts = GetPtable($GLOBALS['db_ptable']);
     $array = $tTable = $tids = array();
     $query = $this->_db->query("SELECT DISTINCT tid,pid FROM {$pw_posts} WHERE authorid=" . S::sqlEscape($uid) . " AND ifcheck=1 AND fid!=0 ORDER BY postdate DESC " . S::sqlLimit($num));
     while ($rt = $this->_db->fetch_array($query)) {
         $tids[] = $rt['tid'];
         $pids[$rt[tid]][] = $rt['pid'];
     }
     if ($tids) {
         $query = $this->_db->query("SELECT t.tid,t.subject,t.replies,t.hits,t.postdate,f.fid as forumsid,f.name as forums FROM pw_threads t LEFT JOIN pw_forums f ON t.fid=f.fid WHERE t.tid IN(" . S::sqlImplode($tids) . ") ORDER BY t.tid DESC");
         while ($rt = $this->_db->fetch_array($query)) {
             $rt['subject'] = substrs($rt['subject'], 45);
             $rt['forums'] = substrs(stripWindCode($rt['forums']), 100, 'N');
             list($rt['postdate']) = getLastDate($rt['postdate']);
             $rt['pid'] = $pids[$rt[tid]][0];
             $tTable[getTtable($rt['tid'])][] = $rt['tid'];
             $array[$rt['tid']] = $rt;
         }
         foreach ($tTable as $pw_tmsgs => $ids) {
             $query = $this->_db->query("SELECT tid,content FROM {$pw_tmsgs} WHERE tid IN (" . S::sqlImplode($ids) . ')');
             while ($rt = $this->_db->fetch_array($query)) {
                 $array[$rt['tid']]['content'] = substrs(stripWindCode($rt['content']), 100, 'N');
             }
         }
     }
     return $array;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:28,代码来源:usermodedata.class.php


示例2: getRecommendByType

 /**
  * @param $type
  * @param $page
  * @return unknown_type
  */
 function getRecommendByType($type, $page = 1)
 {
     $result = array();
     $where = " WHERE (t.fid != 0 OR t.fid IS NULL) ";
     if ($type) {
         $where .= " AND  p.typeid = " . pwEscape($type);
     }
     (int) $page < 1 && ($page = 1);
     $start = ($page - 1) * $this->perPage;
     $limit = pwLimit($start, $this->perPage);
     $query = $this->db->query("SELECT p.*,t.replies,t.hits,t.author,t.authorid,t.lastposter,t.lastpost FROM pw_wappush p LEFT JOIN pw_threads t ON p.tid = t.tid \r\n\t\t\t\t\t{$where} ORDER BY p.id DESC {$limit}");
     while ($rt = $this->db->fetch_array($query)) {
         $rt['index'] = ++$start;
         list(, $lastDate) = getLastDate($rt['lastpost']);
         $rt['lastpost'] = $lastDate;
         $result[] = $rt;
     }
     return $result;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:24,代码来源:recommend.db.php


示例3: get_pinglogs

function get_pinglogs($tid, $pingIdArr)
{
    if (empty($pingIdArr)) {
        return;
    }
    global $db, $fid, $creditnames;
    $pingIds = array();
    $pingLogs = array();
    foreach ($pingIdArr as $pid => $markInfo) {
        list($count, $ids, $creditCount) = explode(":", $markInfo);
        $pingLogs[$pid]['count'] = $count;
        $pingLogs[$pid]['creditCount'] = parseCreditCount($creditCount);
        $pingIds = array_merge($pingIds, explode(",", $ids));
    }
    if (!count($pingIds)) {
        return array();
    }
    $query = $db->query("SELECT a.*,b.uid,b.icon FROM pw_pinglog a LEFT JOIN pw_members b ON a.pinger=b.username WHERE a.id IN (" . S::sqlImplode($pingIds) . ") ");
    while ($rt = $db->fetch_array($query)) {
        $rt['pid'] = $rt['pid'] ? $rt['pid'] : 'tpc';
        list($rt['pingtime'], $rt['pingdate']) = getLastDate($rt['pingdate']);
        $rt['record'] = $rt['record'] ? $rt['record'] : "-";
        if ($rt['point'] > 0) {
            $rt['point'] = "+" . $rt['point'];
        }
        $tmp = showfacedesign($rt['icon'], true, 's');
        $rt['icon'] = $tmp[0];
        isset($creditnames[$rt['name']]) && ($rt['name'] = $creditnames[$rt['name']]);
        $pingLogs[$rt['pid']]['data'][$rt['id']] = $rt;
    }
    foreach ($pingLogs as $pid => $data) {
        if (is_array($pingLogs[$pid]['data'])) {
            krsort($pingLogs[$pid]['data']);
        }
    }
    return $pingLogs;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:37,代码来源:pingfunc.php


示例4: drawDiagram

function drawDiagram($img)
{
    global $num_horiz;
    $axes_color = imagecolorallocate($img, 0, 0, 0);
    $grid_color = imagecolorallocate($img, 204, 204, 204);
    $caption_color = imagecolorallocate($img, 0, 0, 0);
    $border_color = imagecolorallocate($img, 204, 204, 204);
    $background_color = imagecolorallocate($img, 255, 255, 255);
    $host_color = imagecolorallocate($img, 241, 29, 29);
    $hits_color = imagecolorallocate($img, 20, 203, 80);
    $visitors_color = imagecolorallocate($img, 29, 59, 241);
    $end_date = getLastDate();
    $start_date = strtotime("-28 day", $end_date);
    $max_data = getMaxData($start_date, $end_date);
    if ($max_data < 14 && $max_data != 0) {
        $num_horiz = $max_data;
    }
    imagefill($img, 0, 0, $background_color);
    imagerectangle($img, 0, 0, IMG_WIDTH - 1, IMG_HEIGHT - 1, $border_color);
    drawAxes($img, $axes_color);
    drawGrid($img, $grid_color);
    drawCaptions($img, $start_date, $max_data, $caption_color);
    drawGraphs($img, $start_date, $end_date, $max_data, $host_color, $hits_color, $visitors_color);
}
开发者ID:Blu2z,项目名称:implsk,代码行数:24,代码来源:diagram.php


示例5: buildReplyData

 /**
  * 数据处理
  * 
  * @param array $data
  * @return array
  */
 function buildReplyData($data)
 {
     global $db_windpost;
     if (!S::isArray($data)) {
         return array();
     }
     $uids = $tmpreplydata = array();
     foreach ($data as $v) {
         $uids[] = $v['uid'];
     }
     $userService = L::loadClass('UserService', 'user');
     $userInfo = $userService->getUserInfoWithFace($uids);
     foreach ($data as $value) {
         list($value['postdate'], $value['postdate_s']) = getLastDate($value['postdate']);
         $tmpreplydata[] = array_merge((array) $value, (array) $userInfo[$value['uid']]);
     }
     return $tmpreplydata;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:24,代码来源:commentreplyservice.class.php


示例6: get_pinglogs

function get_pinglogs($tid, $pingIdArr)
{
    if (empty($pingIdArr)) {
        return;
    }
    global $db, $fid;
    $pingIds = array();
    $pingLogs = array();
    foreach ($pingIdArr as $pid => $markInfo) {
        if (!preg_match("/^[0-9\\:\\,]*\$/", $markInfo)) {
            //$markInfo = update_markinfo($fid, $tid, $pid);
            continue;
        }
        list($count, $ids) = explode(":", $markInfo);
        $pingLogs[$pid]['count'] = $count;
        $pingIds = array_merge($pingIds, explode(",", $ids));
    }
    if (!count($pingIds)) {
        return array();
    }
    $query = $db->query("SELECT a.*,b.uid,b.icon FROM pw_pinglog a LEFT JOIN pw_members b ON a.pinger=b.username WHERE a.id IN (" . pwImplode($pingIds) . ") ");
    while ($rt = $db->fetch_array($query)) {
        $rt['pid'] = $rt['pid'] ? $rt['pid'] : 'tpc';
        list($rt['pingtime'], $rt['pingdate']) = getLastDate($rt['pingdate']);
        $rt['record'] = $rt['record'] ? $rt['record'] : "-";
        if ($rt['point'] > 0) {
            $rt['point'] = "+" . $rt['point'];
        }
        $tmp = showfacedesign($rt['icon'], true);
        $rt['icon'] = $tmp[0];
        $pingLogs[$rt['pid']]['data'][$rt['id']] = $rt;
    }
    foreach ($pingLogs as $pid => $data) {
        if (is_array($pingLogs[$pid]['data'])) {
            krsort($pingLogs[$pid]['data']);
        }
    }
    return $pingLogs;
}
开发者ID:adi00,项目名称:wumaproject,代码行数:39,代码来源:read.php


示例7: getPingLogs

 function getPingLogs($tid, $pingIdArr, $page = null)
 {
     if (empty($pingIdArr)) {
         return array();
     }
     global $db, $fid;
     static $creditnames;
     is_array($creditnames) or $creditnames = pwCreditNames();
     $pingIds = array();
     $pingLogs = array();
     if ($page) {
         $page = intval($page);
         if ($page < 1) {
             $page = 1;
         }
     }
     foreach ($pingIdArr as $pid => $markInfo) {
         list($count, $ids, $creditCount) = explode(":", $markInfo);
         $pingLogs[$pid]['count'] = $count;
         $pingLogs[$pid]['creditCount'] = $this->parseCreditCount($creditCount);
         $pingIds = array_merge($pingIds, explode(",", $ids));
         $page && ($pingLogs[$pid]['pages'] = numofpage($count, $page, ceil($count / 10), "apps.php?q=ajax&a=pingpage&tid={$tid}&count={$count}&pid={$pid}&fid={$fid}&", null, 'ajaxPingcp'));
     }
     if (!count($pingIds) && !$page) {
         return array();
     }
     $query = $this->db->query("SELECT a.*,b.uid FROM pw_pinglog a LEFT JOIN pw_members b ON a.pinger=b.username WHERE a.id IN (" . S::sqlImplode($pingIds) . ")");
     while ($rt = $this->db->fetch_array($query)) {
         $rt['pid'] = $rt['pid'] ? $rt['pid'] : 'tpc';
         list($rt['pingtime'], $rt['pingdate']) = getLastDate($rt['pingdate']);
         $rt['record'] = $rt['record'] ? $rt['record'] : "-";
         if ($rt['point'] > 0) {
             $rt['point'] = "+" . $rt['point'];
         }
         //$tmp = showfacedesign($rt['icon'],true,'s');
         //$rt['icon'] = $tmp[0];
         isset($creditnames[$rt['name']]) && ($rt['name'] = $creditnames[$rt['name']]);
         $pingLogs[$rt['pid']]['data'][$rt['id']] = $rt;
     }
     foreach ($pingLogs as $pid => $data) {
         if (is_array($pingLogs[$pid]['data'])) {
             krsort($pingLogs[$pid]['data']);
         }
     }
     return $pingLogs;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:46,代码来源:ping.class.php


示例8: viewOneReply

function viewOneReply($tid, $pid, $ptable)
{
    global $db, $db_waplimit, $c_page, $db_anonymousname, $pwAnonyHide, $winduid;
    $pw_posts = GetPtable($ptable);
    $sql = "SELECT pid,subject,author,authorid,content,postdate,anonymous,aid FROM {$pw_posts} WHERE pid=" . pwEscape($pid);
    $ct = $db->get_one($sql);
    if ($ct) {
        $ct['subject'] = str_replace('&nbsp;', '', wap_cv($ct['subject']));
        $content = viewContent($ct['content']);
        $yxqw = "";
        /*************对内容进行分页**********/
        (int) $c_page < 1 && ($c_page = 1);
        $clen = wap_strlen($content, $db_charset);
        //TODO mbstring
        $maxp = ceil($clen / $db_waplimit);
        $c_nextp = $c_page + 1;
        $c_prep = $c_page - 1;
        if ($c_nextp > $maxp) {
            $c_nextp = $maxp;
        }
        if ($c_prep <= 0) {
            $c_prep = 1;
        }
        $yxqw = "";
        if ($maxp > 1) {
            $content = wap_substr($content, $db_waplimit * ($c_page - 1), $db_waplimit, $db_charset);
            $content = wap_img2($content);
            if (empty($content)) {
                wap_msg("已到最后一页", "index.php?a=read&tid={$tid}");
            }
            if ($c_page == 1) {
                $yxqw = "<a href='index.php?a=reply&pid=" . $pid . "&amp;tid=" . $tid . "&amp;c_page={$c_nextp}'>下一页</a>";
            } elseif ($c_page == $maxp) {
                $yxqw = "<a href='index.php?a=reply&pid=" . $pid . "&amp;tid=" . $tid . "&amp;c_page={$c_prep}'>上一页</a>&nbsp;";
            } else {
                $yxqw = "<a href='index.php?a=reply&pid=" . $pid . "&amp;tid=" . $tid . "&amp;c_page={$c_nextp}'>下一页</a>";
                $yxqw .= "<a href='index.php?a=reply&pid=" . $pid . "&amp;tid=" . $tid . "&amp;c_page={$c_prep}'>上一页</a>&nbsp;";
            }
            $yxqw .= "&nbsp;({$c_page}/{$maxp})<br/>";
        } else {
            $content = wap_img2($content);
        }
        $ct['content'] = $content;
        /*************对内容进行分页**********/
        if ($ct['anonymous'] && $ct['authorid'] != $winduid && !$pwAnonyHide) {
            $ct['author'] = $db_anonymousname;
            $ct['authorid'] = 0;
        }
        list(, $ct['postdate']) = getLastDate($ct['postdate']);
        $ct['id'] = $id;
        //$ct ['author'] = $ct ['anonymous'] ? $db_anonymousname : $ct ['author'];
        $ct['author'] = wap_cv($ct['author']);
        $ct['yxqw'] = $yxqw;
        if ($ct['aid'] && $ct['aid'] != '') {
            $ct['aidimgs'] = viewAidsForHtml($tid, $pid);
            $ct['aidatts'] = viewDownloads($tid, $pid);
        } else {
            $ct['aidimgs'] = '';
            $ct['aidatts'] = '';
        }
    }
    return $ct;
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:63,代码来源:threadfunction.php


示例9: formateDate

function formateDate($time)
{
    $temp = getLastDate($time, 0);
    return $temp[0];
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:5,代码来源:index.php


示例10: _buildUsersLists

 /**
  * 私用组装前台展示信息函数
  * @param $arrays 消息体+关系体信息
  * 注意:$tpc_author参数用于组装表情用户名前缀
  * @return array
  */
 function _buildUsersLists($arrays)
 {
     global $tpc_author;
     if (!$arrays) {
         return false;
     }
     $userIds = array();
     foreach ($arrays as $v) {
         0 < $v['create_uid'] ? $userIds[] = $v['create_uid'] : 0;
     }
     $tmp = $this->_retrieveUsers($userIds);
     require_once R_P . 'require/bbscode.php';
     $groupInfos = $tmpArrays = array();
     foreach ($arrays as $rid => $a) {
         $created_timefromat = getLastDate($a['created_time']);
         $modified_timefromat = getLastDate($a['modified_time']);
         $a['title'] = $this->_reverseString($a['title']);
         $tpc_author = $a['create_username'];
         $a['created_time_format'] = $created_timefromat[0];
         $a['modified_time_format'] = $modified_timefromat[0];
         $a['created_time_detail'] = get_date($a['created_time'], 'Y-m-d H:i');
         $a['modified_time_detail'] = get_date($a['modified_time'], 'Y-m-d H:i');
         $a['content'] = $this->_reverseString($this->_stringReplace(convert($a['content'], $this->_windpost)));
         $a['extra'] = $a['extra'] ? unserialize($a['extra']) : '';
         $tmpArrays[$rid] = isset($tmp[$a['create_uid']]) ? $tmp[$a['create_uid']] + $a : $a;
         $a['typeid'] == $this->getMap($this->_groupsms_colony) ? $groupInfos[$a['mid']] = $a['extra'] : 0;
     }
     // build group
     if ($groupInfos && ($groups = $this->_buildColonyList($groupInfos))) {
         $t = array();
         foreach ($tmpArrays as $rid => $v) {
             $t[$rid] = isset($groups[$v['mid']]) ? $groups[$v['mid']] + $v : $v;
         }
         return $t;
     }
     return $tmpArrays;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:43,代码来源:base.ms.php


示例11: list

if ($count2 = $colony['writenum']) {
    $smileParser = L::loadClass('smileparser', 'smile');
    /* @var $smileParser PW_SmileParser */
    require_once R_P . 'require/showimg.php';
    $page = (int) S::getGP('page');
    list($pages, $limit) = pwLimitPages($count2, $page, "{$basename}&showtype=write&cyid={$cyid}&");
    $query = $db->query("SELECT w.*,m.username,m.icon,m.groupid FROM pw_cwritedata w LEFT JOIN pw_members m ON w.uid=m.uid WHERE w.cyid=" . S::sqlEscape($cyid) . " ORDER BY w.replay_time DESC {$limit}");
    while ($rt = $db->fetch_array($query)) {
        if ($rt['groupid'] == 6 && $db_shield && $groupid != 3) {
            $rt['content'] = appShield('ban_write');
        }
        $rt['content'] = $smileParser->parse($rt['content']);
        list($rt['postdate']) = getLastDate($rt['postdate']);
        list($rt['icon']) = showfacedesign($rt['icon'], 1, 'm');
        $writedata[$rt['id']] = $rt;
        $typeid[] = $rt['id'];
    }
}
if ($typeid) {
    $sql = "SELECT tt.* FROM (SELECT cm.*,m.icon FROM pw_comment cm LEFT JOIN pw_members m ON cm.uid=m.uid WHERE type='groupwrite' AND typeid in (" . S::sqlImplode($typeid, false) . ") ORDER BY cm.id DESC) tt GROUP BY tt.typeid ";
    $query2 = $db->query($sql);
    while ($rt2 = $db->fetch_array($query2)) {
        $writedata[$rt2['typeid']]['replayuid'] = $rt2['uid'];
        $writedata[$rt2['typeid']]['replayusername'] = $rt2['username'];
        $writedata[$rt2['typeid']]['replaytitle'] = $rt2['title'];
        list($writedata[$rt2['typeid']]['replaypoastdate']) = getLastDate($rt2['postdate']);
        list($writedata[$rt2['typeid']]['replayicon']) = showfacedesign($rt2['icon'], 1, 'm');
    }
}
require_once PrintEot('thread_write');
footer();
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:thread_write.php


示例12: buildReplyData

 function buildReplyData($data)
 {
     global $db_windpost, $timestamp;
     if (!S::isArray($data)) {
         return array();
     }
     $uids = $comment = array();
     foreach ($data as $v) {
         $uids[] = $v['uid'];
     }
     $userService = L::loadClass('UserService', 'user');
     $userInfo = $userService->getUserInfoWithFace($uids);
     require_once R_P . 'require/bbscode.php';
     foreach ($data as $value) {
         $value['content'] = convert($value[content], $db_windpost);
         $value['postdate'] == $timestamp && ($value['postdate'] = $value['postdate'] - 1);
         list($value['postdate'], $value['postdate_s']) = getLastDate($value['postdate']);
         $comment[] = array_merge((array) $value, (array) $userInfo[$value['uid']]);
     }
     return $comment;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:21,代码来源:cmscommentservice.class.php


示例13: getLastThread

 function getLastThread($limit = 10)
 {
     $openforum = array();
     require_once R_P . 'require/bbscode.php';
     $openforum = $this->_getOpenforums();
     $service = L::loadClass('threads', 'forum');
     $data = $service->getLatestThreads($openforum, '', '', 0, $limit);
     if (!S::isArray($data)) {
         return array();
     }
     foreach ($data as $v) {
         if ($v['ifhide']) {
             $v['content'] = "[内容已隐藏]";
         }
         if ($v['anonymous']) {
             $v['author'] = '匿名用户';
             $v['authorid'] = 0;
         }
         if ($v['locked'] == 2) {
             $v['content'] = "主题已被关闭";
             $v['subject'] = "主题已被关闭";
         }
         $v['content'] = $this->_replace($v['content']);
         //$v['content'] = convert($v['content'],'','post');
         $v['content'] = substrs($v['content'], 160, 'Y');
         list($v['postdate'], $v['postdate_s']) = getLastDate($v['postdate']);
         $arr[] = array('tid' => $v['tid'], 'fid' => $v['fid'], 'author' => $v['author'], 'authorid' => $v['authorid'], 'subject' => $v['subject'], 'postdate' => $v['postdate'], 'content' => $v['content'], 'anonymous' => $v['anonymous'], 'url' => "read.php?tid=" . $v['tid']);
         $uids[] = $v['authorid'];
     }
     $usersInfo = $this->_getUserInfo($uids, true);
     if (empty($arr)) {
         return array();
     }
     foreach ($arr as $k => $value) {
         !is_array($usersInfo[$value['authorid']]) && ($usersInfo[$value['authorid']] = array());
         $arr[$k]['icon'] = $usersInfo[$value['authorid']]['icon'];
     }
     return $arr;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:39,代码来源:squareservice.class.php


示例14: str_replace

if (strpos($quote_content, 'p_w_upload') !== false) {
    $quote_content = str_replace('p_w_upload', $db_attachname, $quote_content);
}
$quote_content = preg_replace('/(\\[attachment=\\d+\\])+/', '[图片]', $quote_content);
//face
//title
list($guidename, $forumtitle) = $pwforum->getTitle();
if (!$replytitle) {
    $atc_title = "Re:{$read['subject']}";
    //$forumtitle = "$atc_title|$forumtitle";
} else {
    $atc_title = "Re:{$replytitle}";
    //$forumtitle = "$atc_title|$tpcarray[subject]|$forumtitle";
}
//time
list($postTime) = getLastDate($atcarray['postdate']);
$atc_title = substrs(str_replace('&nbsp;', ' ', $atc_title), $db_titlemax - 3);
//quote
if ((!$tpc_locked || $SYSTEM['replylock']) && ($admincheck || $pwforum->allowreply($winddb, $groupid))) {
    if (!$admincheck && !$foruminfo['allowrp'] && !$_G['allowrp']) {
        quickPostMessage('reply_group_right');
    }
    require_once PrintEot('quickpost');
    ajax_footer();
}
if (!$isGM && $tpc_locked && !pwRights($isBM, 'replylock')) {
    //locked
    quickPostMessage('reply_lockatc');
}
quickPostMessage('reply_group_right');
function quickPostMessage($message)
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:quickpost.php


示例15: array_merge

$visituids = array_merge(array_keys($whovisit), array_keys($tovisit));
if ($visituids) {
    $query = $db->query("SELECT m.uid,m.username,m.icon,m.honor,md.thisvisit FROM pw_members m LEFT JOIN pw_memberdata md ON m.uid=md.uid WHERE m.uid IN (" . pwImplode($visituids, false) . ")");
    while ($rt = $db->fetch_array($query)) {
        list($rt['icon']) = showfacedesign($rt['icon'], 1, 'm');
        if ($db_showonline && $rt['thisvisit'] + $db_onlinetime * 1.5 > $timestamp) {
            $rt['thisvisit'] = 1;
        } else {
            $rt['thisvisit'] = 0;
        }
        if (isset($whovisit[$rt['uid']])) {
            list($whovisit[$rt['uid']]) = getLastDate($whovisit[$rt['uid']], '2');
            $whovisit[$rt['uid']] = array('visittime' => $whovisit[$rt['uid']]) + $rt;
        }
        if (isset($tovisit[$rt['uid']])) {
            list($tovisit[$rt['uid']]) = getLastDate($tovisit[$rt['uid']], '2');
            $tovisit[$rt['uid']] = array('visittime' => $tovisit[$rt['uid']]) + $rt;
        }
    }
}
function getAppIcon($type)
{
    switch ($type) {
        case 'record':
            $icon = 'record.png';
            break;
        case 'diary':
            $icon = 'posts.png';
            break;
        case 'photo':
            $icon = 'albums.png';
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:m_user.php


示例16: pwEscape

if ($uid && $uid != $winduid) {
    $userdb = $db->get_one("SELECT m.uid,m.icon,m.username,m.honor FROM pw_members m WHERE m.uid = " . pwEscape($uid));
} elseif ($username && $username != $windid) {
    $userdb = $db->get_one("SELECT m.uid,m.icon,m.username,m.honor FROM pw_members m WHERE m.username = " . pwEscape($username));
    $uid = $userdb['uid'];
} else {
    $userdb =& $winddb;
    $uid = $userdb['uid'];
}
if (empty($userdb)) {
    $errorname = '';
    wap_msg('user_not_exists');
}
require_once R_P . 'require/showimg.php';
list($usericon) = showfacedesign($userdb['icon'], 1, 's');
list($lastDate) = getLastDate($userdb['postdate']);
require_once W_P . 'include/db/myspace.db.php';
$myspace = new MyspaceDB();
$myspace->setPerPage(5);
$myArticles = $myspace->getArticlesByUser($uid);
$myReplaies = $myspace->getReplaysByUser($uid);
if ($winduid == $uid) {
    $collectionService = L::loadClass('Collection', 'collection');
    $mydata = $collectionService->findByUidAndTypeInPage($winduid, 'postfavor', 1, 5, 'all');
    $myFavThreads = array();
    foreach ($mydata as $key => $value) {
        $temp = array();
        $temp['url'] = "index.php?a=read&tid=" . $value['typeid'];
        $temp['subject'] = $value['content']['postfavor']['subject'];
        $myFavThreads[] = $temp;
    }
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:myhome.php


示例17: adorn_weibo

 function adorn_weibo($data)
 {
     if (empty($data) || !is_array($data)) {
         return $data;
     }
     foreach ($data as $key => $value) {
         list($value['lastdate'], $value['postdate_s']) = getLastDate($value['postdate']);
         $data[$key] = $value;
     }
     return $data;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:11,代码来源:spacemodel.class.php


示例18: getMemberSort

 /**
  * @param $tags
  * @param $nums
  * @return unknown_type
  */
 function getMemberSort($tags, $nums)
 {
     if (!empty($tags) && !empty($nums)) {
         $sql = "SELECT m.uid, m.icon, m.username, md.lastvisit\n\t\t\t\t\tFROM pw_members m LEFT JOIN pw_memberdata md ON m.uid=md.uid\n\t\t\t\t\tWHERE m.uid IN ( " . S::sqlImplode($tags) . " ) ";
         $query = $this->db->query($sql);
         $result = array();
         while ($rt = $this->db->fetch_array($query)) {
             $r['id'] = $rt['uid'];
             $r['title'] = $rt['username'];
             $r['url'] = USER_URL . $rt['uid'];
             list($userIcon) = showfacedesign($rt["icon"], 1, 'm');
             $r['image'] = $userIcon;
             list($lastDate) = getLastDate($rt["lastvisit"]);
             $r['lastDate'] = $lastDate;
             $r['value'] = $nums[$rt['uid']];
             //$this->getOnlineTime($nums [$rt ['uid']]);
             $result[$rt['uid']] = $r;
         }
     }
     return $result;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:26,代码来源:datanalyse.class.php


示例19: pwCreditNames

$creditnames = pwCreditNames();
//х╗оч
$foruminfo = $db->get_one('SELECT * FROM pw_forums f LEFT JOIN pw_forumsextra fe USING(fid) WHERE f.fid=' . S::sqlEscape($fid));
!$foruminfo && Showmsg('data_error');
$isGM = $isBM = $admincheck = 0;
if ($groupid != 'guest') {
    $isGM = S::inArray($windid, $manager);
    $isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
    $admincheck = $isGM || $isBM ? 1 : 0;
}
$count = $db->get_value("SELECT COUNT(*) FROM pw_pinglog WHERE  fid=" . S::sqlEscape($fid) . " AND tid=" . S::sqlEscape($tid) . " AND pid=" . S::sqlEscape($pid) . "  AND ifhide=0");
$total = ceil($count / $perpage);
if ($page < 2) {
    $page = 2;
}
$offset = ($page - 1) * $perpage;
$ping_db = array();
$query = $db->query("SELECT a.*,b.uid,b.icon FROM pw_pinglog a LEFT JOIN pw_members b ON a.pinger=b.username WHERE a.fid=" . S::sqlEscape($fid) . " AND a.tid=" . S::sqlEscape($tid) . " AND a.pid=" . S::sqlEscape($pid) . " AND ifhide=0 ORDER BY a.pingdate DESC LIMIT {$offset},{$perpage}");
while ($rt = $db->fetch_array($query)) {
    list($rt['pingtime'], $rt['pingdate']) = getLastDate($rt['pingdate']);
    $rt['record'] = $rt['record'] ? $rt['record'] : "-";
    if ($rt['point'] > 0) {
        $rt['point'] = "+" . $rt['point'];
    }
    $tmp = showfacedesign($rt['icon'], true);
    $rt['icon'] = $tmp[0];
    isset($creditnames[$rt['name']]) && ($rt['name'] = $creditnames[$rt['name']]);
    $ping_db[] = $rt;
}
require_once PrintEot('ajax');
ajax_footer();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:pingpage.php


示例20: findWritesToUserInPage

 /**
  * 取得@我的记录列表
  * 
  * @param $userId
  * @param $page
  * @param $perpage
  * @param $pageUrl
  */
 function findWritesToUserInPage($userId, $page = 1, $perpage = 20, $pageUrl)
 {
     global $db_shield, $groupid, $winduid, $windid;
     $count = $this->countWritesToUser($userId);
     if (!$count) {
         return array();
     }
     $pages = numofpage($count, $page, ceil($count / $perpage), $pageUrl);
     $writeDb = $this->_getWriteDB();
     $writedata = $writeDb->findWritesToUser($userId, $page, $perpage);
     if (!$writedata) {
         return array();
     }
     $result = array();
     foreach ($writedata as $write) {
         if ($write['groupid'] == 6 && $db_shield && $groupid != 3) {
             $write['content'] = appShield('ban_write');
         }
         list($write['postdate']) = getLastDate($write['postdate']);
         list($write['icon']) = showfacedesign($write['icon'], 1, 'm');
         if ($write['touid'] && $write['username']) {
             $write['content'] = '<a href="' . USER_URL . $write['uid'] . '">' . $write['username'] . '</a> @<a href="u.php?&uid=' . $winduid . '">' . $windid . '</a> ' . $write['content'];
         }
         $result[] = $write;
     }
     return array($this->parse($result), $pages, $count);
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:35,代码来源:write.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getLastInsertID函数代码示例发布时间:2022-05-15
下一篇:
PHP getLanguages函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap