"" ? " and siteid='$site' ":""; }else{ $arg .= ""; } $cid = is_string($_GET[cid]) ? $_GET[cid]:""; if (!empty($cid)){ $arg = $cid > "" ? " and cid='$cid' ":""; }else{ $arg .= ""; } if (!empty($cid)) { $tatol = $catecache['feed_count']; $pageurl .= '&cid='.$cid; }elseif(!empty($site)){ $tatol = $catecache['feed_count']; $pageurl .= '&site='.$site; }else{ $tatol = $stats['feed_count']; $pageurl = './index.php'; } $pagenum = 20; if($page) { $start_limit = ($page - 1) * $pagenum; } else { $start_limit = 0; $page = 1; } $query = $db->query("SELECT * FROM {$tablepre}xna_feed WHERE state!=0 $arg order by $hots state desc,addtime desc LIMIT $start_limit,$pagenum"); $multipage = multi($tatol, $pagenum, $page, $pageurl); while ($row=$db->row($query)){ $row[id] = $row["feedid"]; $row[title] = $row["feed_title"]; $row[content] = $row["feed_description"]; $row[addtime] = date("Y-m-d H:m:s",$row["addtime"]); $n++; $feed[] = $row; } include template("index", _ROOT ."/template/digg/"); } ?>