prepare("SELECT ID FROM girls"); $stmt->execute(); $howmanyentries = $stmt->rowCount(); $pages = $howmanyentries/32 ; if($_REQUEST["page"] == ""){ $_REQUEST["page"] = 1; } $pages = ceil($pages); ?>
""){ $start = ($_REQUEST["page"]*32) - 32; }else{ $start = 0; } if($_REQUEST["country"] <> ""){ $stmt = $pdodb->prepare("SELECT fname,mainpic,tviews,country,aboutme,username,country FROM girls WHERE country=:country ORDER by lastact desc LIMIT ".$start.",32"); $stmt->bindParam(':country',$_REQUEST["country"]); }else{ $stmt = $pdodb->prepare("(SELECT fname,mainpic,tviews,country,aboutme,username,country,premium FROM girls WHERE premium > 0 ORDER by lastact desc LIMIT 0,3) UNION (SELECT fname,mainpic,views,country,aboutme,username,country,premium FROM girls ORDER by lastact desc LIMIT ".$start.",32) "); } $stmt->execute(); echo '
'; while($i3=$stmt->fetch()) { if($i3["premium"] == 1){ $pre = "border:1px solid #82a800;"; $addpro = '
PRO'; }else{ $pre = "border:1px solid #534b40;"; $addpro = ""; } $npic = str_replace("s","",$i3["mainpic"]); echo '
'; if($npic <> ""){ echo '
'; }else{ echo '
'; } echo ''.$i3["fname"].' '.$addpro.'
'.$i3["tviews"].' Views
'.$c_codes[$i3["country"]].'
'; } echo '
'; ?>