![]() |
if(!isset($_GET['page'])){ $page = 1; } else { $page = $_GET['page']; } if ($catt){ $vpage = "http://www.".$domain."/videos.php?c=$catt&page="; } else { $vpage = "http://www.".$domain."/videos.php?page="; } $max_results = $config['limitvids']; $from = (($page * $max_results) - $max_results); if ($catt) { $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM videos WHERE status='1' AND cat LIKE '".$catt."'"),0); } else { $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM videos WHERE status='1'"),0); } $total_pages = ceil($total_results / $max_results); if ($catt){ $sql = mysql_query("SELECT * FROM videos WHERE status=1 AND cat LIKE ".$catt." ORDER by id DESC LIMIT $from, $max_results"); } else { $sql = mysql_query("SELECT * FROM videos WHERE status=1 ORDER by id DESC LIMIT $from, $max_results"); } while($row = mysql_fetch_array($sql)){ $vtext = strtolower(str_replace('--', '_', str_replace(' ', '_', preg_replace('/[^\sA-Za-z0-9]+/', '', $row['title'])))); $vsql = mysql_query("SELECT * FROM cat WHERE id='".$row['cat']."'"); while($roww = mysql_fetch_array($vsql)){ $catnam = $roww['cat']; $vctext = strtolower(str_replace('--', '_', str_replace(' ', '_', preg_replace('/[^\sA-Za-z0-9]+/', '', $catnam)))); } echo "
| ".$row['title']." Series: ".$catnam." Added: ".$row['date']." Views: ".$row['views']." |
";
for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "$i ";
}
}
echo "
"; // Prev if($page > 1){ $prev = ($page - 1); echo " << prev "; } echo " "; //random if($total_pages > 1){ $rand = rand(1, $total_pages); echo " rand "; } echo " "; // Next if($page < $total_pages){ $next = ($page + 1); echo " next >> "; } echo "
";
?>
"; // Prev if($page > 1){ $prev = ($page - 1); echo " << prev "; } echo " "; //random if($total_pages > 1){ $rand = rand(1, $total_pages); echo " rand "; } echo " "; // Next if($page < $total_pages){ $next = ($page + 1); echo " next >> "; } echo "



