template_dir = $rootdir . '/templates'; $smarty->compile_dir = $rootdir . '/templates_c'; $smarty->cache_dir = $rootdir . '/cache'; $smarty->config_dir = $rootdir . '/configs'; $pi = "swg"; if (isset($_GET['pi'])) { $pi = $_GET['pi']; } $dbh = MysqlConnect(); // download last 2 movies $sql = mysql_query("select id,titel,publish_date,verhaal,rating,speelduur,txt_lang,url_voice_trailer,keywords from episodes where publish_date <= now() and website != 'barebackers.nl' order by publish_date desc limit 1") or die(mysql_error()); while ($row = mysql_fetch_assoc($sql)) { $sqlb = mysql_query("select thumb from episodethumbs where filmid='$row[id]' and thumb like '%".$cfg['imagesize']."%' limit 1") or die(mysql_error()); $sta = mysql_fetch_array($sqlb); $row['thumb'] = $sta['thumb']; $films[] = $row; } // view the last 15 webcamers $sql = mysql_query("select b.id as id,b.voiceid as voiceid,b.naam as naam,b.geslacht as geslacht,(YEAR(CURDATE()) - YEAR(b.geboren)) as leeftijd,b.waardering as waardering from webcamgirlsonline as a,webcamgirls as b where b.voiceid=a.voiceid order by b.waardering desc limit 10") or die(mysql_error()); while ($row = mysql_fetch_assoc($sql)) { $row['status']="online"; $webcams[] = $row; } // view last 25 galleries $sql = mysql_query("select id,thumbnail from gallery order by date desc limit 20") or die(mysql_error()); while ($row = mysql_fetch_assoc($sql)) { $gallery[] = $row; } $smarty->assign('pi',$pi); $smarty->assign('gallery',$gallery); $smarty->assign('webcams',$webcams); $smarty->assign('films',$films); $content = $smarty->fetch('index.tpl'); // ophalen van de partner links $sql = mysql_query("select id,titel,urltext,url from links where status='a' and menu='l' order by id desc") or die(mysql_error()); while ($row = mysql_fetch_assoc($sql)) { $linksleft[] = $row; } $sql = mysql_query("select id,titel,urltext,url from links where status='a' and menu='r' order by id desc") or die(mysql_error()); while ($row = mysql_fetch_assoc($sql)) { $linksright[] = $row; } $smarty->assign('metatitle',$cfg['sitename'] . ": Porno portal, seksfilm overzicht + webcam sletjes"); $smarty->assign('metadescription',"laatste seksfilm: " . $films[0]['txt_lang'] . ". Laatste webcam sletjes online: " . $webcams[0]['naam'].",".$webcams[1]['naam'].",".$webcams[2]['naam'].",".$webcams[3]['naam']); $smarty->assign('metakeywords',$cfg['metakeywords']); $smarty->assign('linksleft',$linksleft); $smarty->assign('linksright',$linksright); $smarty->assign('content',$content); $smarty->display('template.tpl'); ?>