$categoryz\n"; } $result = mysql_query("SELECT pornstar,videos from pornstars where videos >= $minvidpornstars order by pornstar;",$lnk); while ($myrow = mysql_fetch_row($result)) { $pornstarz = $myrow[0]; $count = $myrow[1]; $pornstararray[] = $pornstarz; } $break = count($pornstararray) / 6; $cnt = 0;$column = 1; $pornstarlist = ""; $date = date('Y-m-d 00:00:00'); $query = "SELECT count(*) FROM videos;";$query = mysql_query($query,$lnk);$query = mysql_fetch_array($query);$totalvideos = $query[0]; $query = "SELECT count(*) FROM videos where dateadded >= '$date';";$query = mysql_query($query,$lnk);$query = mysql_fetch_array($query);$totaltoday = $query[0]; $cnt=0;$tot=0;$blk=0;$brk=$cols-1;$split=$split-1; if($letter) { $result3 = mysql_query("SELECT pornstar,videos,thumb from pornstars where letter = '$letter' and videos > 0;",$lnk); } else { $result3 = mysql_query("SELECT pornstar,videos,thumb from pornstars where videos > 0 order by alltime desc limit $pornstarpage;",$lnk); } while ($myrow3 = mysql_fetch_row($result3)) { $name = $myrow3[0]; $count = $myrow3[1]; $thumb = $myrow3[2]; $name2 = strtolower($name); $name2 = preg_replace("/\s/si","-",$name2); $categories .= "
\"\"$name $count pics
"; if($cnt == $brk){$categories .= "";$cnt=0;}else{$cnt++;} } $html = file_get_contents("template6.html", "r"); preg_match_all ("/--include:(.*?)--/si", $html, &$matches2); $matches2 = $matches2[1]; foreach($matches2 as $var) { $inc = file_get_contents("$var", "r"); $var = preg_replace("/\//si","\/",$var); $html = preg_replace("/--include:$var--/i", "$inc", $html); } $html = preg_replace("/--block1--/i", "$categories", $html); mysql_query("update categories set views = 0;",$lnk); $result = mysql_query("SELECT keyword from keywords order by date desc limit $limitlastresults;",$lnk); while ($myrow = mysql_fetch_row($result)) { $rel = $myrow[0]; $last .= "".ucwords(strtolower($rel))." \n"; } $last = trim($last); $html = preg_replace("/--totalvideos--/i", "$totalvideos", $html); $html = preg_replace("/--totaltoday--/i", "$totaltoday", $html); $html = preg_replace("/--allcats--/i", "$allcats", $html); $html = preg_replace("/--biglist--/i", "$biglist", $html); $html = preg_replace("/--last--/i", "$last", $html); $html = preg_replace("/--pornstarlist--/i", "$pornstarlist", $html); $html = preg_replace("/--biglist--/i", "$biglist", $html); $html = preg_replace("/--pornstarlist--/i", "$pornstarlist", $html); $html = preg_replace("/--pornstarlist2--/i", "$pornstarlist2", $html); $html = preg_replace("/--letter--/i", ucwords("By Letter $letter"), $html); $xix = "[an error occurred while processing this directive]"; $html = preg_replace("/--script--/i", "$xix", $html); $fp = @fopen($cachefile, 'w'); @fwrite($fp, $html); @fclose($fp); echo $html; } function curPageURL() { $pageURL = 'http'; if($_SERVER["HTTPS"] == "on") { $pageURL .= "s"; } $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } ?>