"; else $firstURL=""; $urls=""; if($_REQUEST['p']<10) $startPage=1; else $startPage=(int)($_REQUEST['p']/10)*10+1; //echo $startPage; if($startPage+10<=$totPages) $endPage=$startPage+10; else $endPage=$lastPage; $prevPage=$startPage-2; if($prevPage>=0) $prevURL=""; else $prevURL=""; //echo $startPage.", ".$endPage; for($i=$startPage-1;$i<$endPage;$i++) { $j=$i+1; if($i==$_REQUEST['p']) { $urls.=""; } else { $urls.=""; } if($j%10==0) break; } $nextPage=$i+1; if($nextPage-1!=$lastPage) $nextURL=""; else { $k=$nextPage-1; if($k==$_REQUEST['p']) $urls.=""; else $urls.=""; $nextURL=""; } if($nextPage-1!=$lastPage) $lastURL=""; else $lastURL=""; $query=$sql." limit $start, $pageSize"; $rs=mysql_query($query); //echo $query; echo "
FirstFirstPreviousPrevious$j$jNext$nextPage$nextPageNextLastLast
"; if($totRecords==0) { echo ""; echo ""; echo ""; } while($row=mysql_fetch_array($rs)) { $voteSql="select sum(votes) from vote where article_id=".$row["article_id"]; $votes=ReturnAnyValue($voteSql); if($votes=="") $votes=0; $id=$row["article_id"]; if($row["image"]=="") { echo ""; echo ""; echo ""; echo ""; } else { echo ""; echo ""; echo ""; echo ""; echo ""; } } if($totPages > 1) { echo ""; echo ""; echo ""; } echo ""; echo ""; //echo ""; echo ""; echo ""; echo "
"; echo "Currently there are no news/articles in this category."; echo "
"; echo ""; echo ""; echo "
$votes
"; //echo "Votes"; echo "Vote"; echo "
"; echo ""; echo "
Posted by ".$row["user_name"]." on ".formatDate($row["post_date"])." (".trimURL($row["url"]).")
"; echo "
Category : ".$row["cat_name"]." | Tags : ".splitTags($row["tags"])."
"; echo $row["summary"]."
"; include 'inc/middle-adds.php'; echo "
"; echo ""; echo ""; echo "
$votes
"; //echo "Votes"; echo "Vote"; echo "
"; echo ""; echo "
Posted by ".$row["user_name"]." on ".formatDate($row["post_date"])." (".trimURL($row["url"]).")
"; echo "
Category : ".$row["cat_name"]." | Tags : ".splitTags($row["tags"])."
"; echo $row["summary"]."
"; include 'inc/middle-adds.php'; echo "

(Click to Enlarge)
"; echo ""; echo $firstURL.$prevURL.$urls.$nextURL.$lastURL; echo "
"; echo "
"; include_once 'inc/tags.php'; echo "
"; ?>