foreach ($arr as $aid) { if (is_numeric($aid)) { $aidarr[] = $aid; } } // 读取频道下的文章列表 if ($cids != "") { $arr = explode(",", $cids); $cidarr = array(); foreach ($arr as $cid) { if (is_numeric($cid)) { $cidarr[] = $cid; } } if ($clearcache) { Bigapp_Portal_Article::clearCache($cidarr, $aidarr); $ret["data"] = "clear cache"; bigapp_core::result(bigapp_core::variable($ret)); } $ret["data"] = Bigapp_Portal_Article::getArticalInChannelExceptAids($cidarr, $aidarr, $page); } else { if (!empty($aidarr)) { $ret["data"] = Bigapp_Portal_Article::getByArticleIds($aidarr); } } bigapp_core::result(bigapp_core::variable($ret)); } catch (Exception $e) { //echo $e->getMessage(); die(0); bigapp_core::result(bigapp_core::variable($ret)); } // vim600: sw=4 ts=4 fdm=marker syn=php
if ("" !== $aids) { $aids = explode(',', $aids); } else { $aids = array(); } //取文章数据 $aidarr = array(); if (is_array($aids) && !empty($aids)) { foreach ($aids as $aid) { if (is_numeric($aid)) { $aidarr[] = $aid; } } } if (!empty($aidarr)) { $articles = Bigapp_Portal_Article::getByArticleIds($aidarr); $ret['data'] = array_merge($ret['data'], $articles['list']); } } if ('2' == $contentset['type']) { $tids = $contentset['id']; if ("" !== $tids) { $tids = explode(',', $tids); } else { $tids = array(); } //取帖子数据 $threadInfos = getSingleTidList($tids, $ispic_mode); //取forum name $sql = "SELECT name FROM " . DB::table('forum_forum') . " where fid="; foreach ($threadInfos as $key => &$thread) {