File: /home/httpd/html/tubeshemale.com/public_html/random.php
<?
session_start();
include('admin/db.php');
$title = 'Random Porn Tube Videos';
$headertitle = 'Random Porn Tube Videos';
$metakeywords = "";
$metadescription = "";
$cacheName = $_SERVER[REQUEST_URI];
$cacheResult = getCache($cacheName);
if($cacheResult) {
$array = $cacheResult;
}
else {
$result = mysql_query("SELECT content.*, (SELECT content_views.views FROM content_views WHERE content_views.content = content.record_num) as views FROM content WHERE enabled = 1 AND photos = 0 ORDER BY RAND() LIMIT 0,$results_per_page") or die(mysql_error());
while($row = mysql_fetch_assoc($result)) {
$array[] = $row;
}
setCache($cacheName,$array,$overall_cache_time);
}
$thisfile = 'random';
if($isMobile) {
include($basepath.'/templates/mobile.overall_header.php');
}
else {
include($basepath.'/templates/template.overall_header.php');
}
if(empty($_GET[mode]) && !$_GET[page]) {
include($basepath.'/templates/template.home.php');
}
if(is_array($array)) {
foreach($array as $row) {
if($row[photos] == 1) {
if($isMobile) {
include($basepath.'/templates/mobile.content_item_photo.php');
}
else {
include($basepath.'/templates/template.content_item_photo.php');
}
}
else {
if($isMobile) {
include($basepath.'/templates/mobile.content_item.php');
}
else {
include($basepath.'/templates/template.content_item.php');
}
}
}
}
else {
echo "Sorry, no results were found.";
}
if($isMobile) {
include($basepath.'/templates/mobile.overall_footer.php');
}
else {
include($basepath.'/templates/template.overall_footer.php');
}
?>