File: /home/httpd/html/tubeshemale.com/public_html/models.php
<?
session_start();
if(($_REQUEST[mode] == 'favorites' || $_REQUEST[mode] == 'my_uploads') && !$_SESSION[username]) {
header("Location: /login.php");
}
include('admin/db.php');
include($basepath.'/includes/inc.seo.php');
$result_count = mysql_query("SELECT COUNT(record_num) as counter FROM pornstars") or die(mysql_error());
$count = mysql_fetch_array($result_count);
$total_results = $count[counter];
$result = mysql_query("SELECT * FROM pornstars ORDER BY name ASC LIMIT $from,$max_results") or die(mysql_error());
while($row = mysql_fetch_array($result)) {
$array[] = $row;
}
$string = serialize($array);
file_put_contents($cached_file, $string);
$cache_total_pages = $cache_path.'/total_pages/'.rawurlencode($_SERVER[REQUEST_URI]);
file_put_contents($cache_total_pages, $total_pages);
$thisfile = 'index';
include($basepath.'/templates/template.overall_header.php');
if(is_array($array)) {
foreach($array as $row) {
include($basepath.'/templates/template.model_item.php');
}
}
else {
echo "Sorry, no videos were found.";
}
include($basepath.'/templates/template.overall_footer.php');
?>