更新handsome主题程序版本为9.2.1

    更新typecho 1.2

    网易云play推送了个什么东西啊,据说是车机版的,不更新就不更新呗,更新了个车机版的恶心谁呢??

    网站主题版本更新完毕,更新为8.2.0版本,开启全站音乐。

    不在的第一天

    今天上班了

    除夕快乐

联系方式

关于我

那年今日
// 历史上的今天 function updateBigMemory($db,$options,$login){ $year = date("Y"); $month = date("m"); $day = date("d"); $tempYear = $year; $tempMonth = $month; $tempDay = $day; $timeList = []; $pageId = Utils::get_time_cid(); for ($i = 1; $i <= 20; $i++) { $tempMonth = $tempMonth - 1; if ($tempMonth == 0) { $tempMonth = 12; $tempYear = $tempYear - 1; } $begin = strtotime($tempYear . "-" . $tempMonth . "-" . $tempDay . " 00:00:00"); $end = strtotime($tempYear . "-" . $tempMonth . "-" . $tempDay . " 23:59:59"); //查询数据 $comments = $db->fetchAll($db->select()->from('table.comments') ->where('table.comments.status = ?', 'approved') ->where('table.comments.created <= ?', $end) ->where('table.comments.created >= ?', $begin) ->where('table.comments.type = ?', 'comment') ->where('table.comments.authorId != ?', 0) //过滤游客评论 ->where('table.comments.cid = ?', $pageId) ->order('table.comments.created', Typecho_Db::SORT_DESC) ->limit(1)); if (!empty($comments[0])){ $tempArray = []; $tempArray['content'] = $comments[0]['text']; $tempArray['month'] = $i; $timeList[] = $tempArray; } $cache = new CacheUtil(); $expire = strtotime(date('Y-m-d').'23:59:59');#到期时间戳 $cache->cacheWrite("cross",json_encode($timeList),$expire-time(),"cross",false,true); } return json_encode($timeList); } $cache = new CacheUtil(); $contents = $cache->cacheRead("cross"); if (!$contents){ $contents = updateBigMemory($this->db,$this->options,$this->user->hasLogin()); } $data = Utils::json_decode($contents); for ($i = 1; $i <= count($data);$i++){ echoTimeMemoryItem($i,$data[$i-1]->month,$data[$i-1]->content,$this->user->hasLogin()); } if (count($data) == 0){ echoTimeMemoryItem(2,"某",_mt("大家就当无事发生过"),$this->user->hasLogin()); } ?>