Gender: $osgender
";} if($osfirstmovie){$bio .= "First Movie: $osfirstmovie
";} if($osname){$bio .= "Name: $osname
";} if($osbirthplace){$bio .= "Birthplace: $osbirthplace
";} if($osbirthday && $osbirthday != "0000-00-00"){$bio .= "Birthday: $osbirthday (".birthday($osbirthday)." Years Old)
";$bio .= "Astrology: ".getsign($osbirthday)."
";} if($oshome){$bio .= "Home: $oshome
";} if($osethnicity){$bio .= "Ethnicity: $osethnicity
";} if($osrace){$bio .= "Race: $osrace
";} if($oshair){$bio .= "Hair Color: $oshair
";} if($oseyes){$bio .= "Eyes Color: $oseyes
";} if($osheight){$bio .= "Height: $osheight
";} if($osweight){$bio .= "Weight: $osweight
";} if($osshoes){$bio .= "Shoes Size: $osshoes
";} if($osmeasurements){$bio .= "Measurements: $osmeasurements
";} if($ostattoo){$bio .= "Tattoo: $ostattoo
";} if($ospiercing){$bio .= "Piercing: $ospiercing
";} if($osaka){$bio .= "A.k.a: $osaka
";} if($ostwitter){$social .= "";} if($osfacebook){$social .= "";} if($osmyspace){$social .= "";} if($ossocial){$bio .= "Social Links: $ossocial
";} $result = mysql_query("SELECT category,count,featured,country,thumb from categories order by views;",$lnk); while ($myrow = mysql_fetch_row($result)) { $categoryz = $myrow[0]; $count = $myrow[1]; $featured = $myrow[2]; $ccountry = $myrow[3]; $thumb = $myrow[4]; if(!$ccountry) { $catarray[] = $categoryz; } } sort($catarray); foreach($catarray as $categoryz) { $categoryz2 = preg_replace("/\s/si","-",$categoryz); $biglist .= "
  • $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 = ""; $tagcount=0; $result = mysql_query("SELECT keyword from keywords where MATCH(keyword) AGAINST ('$q') limit $limitsearchtags;",$lnk); while ($myrow = mysql_fetch_row($result)) { $rel = $myrow[0]; $related .= "".ucwords(strtolower($rel))." "; $tagcount++; } $related = trim($related); if($tagcount < $limitsearchtags) { $newtotal = $limitsearchtags - $tagcount; $result = mysql_query("SELECT pornstar from pornstars order by rand() limit $newtotal;",$lnk); while ($myrow = mysql_fetch_row($result)) { $rel = $myrow[0]; $related .= "".ucwords(strtolower($rel))." "; $tagcount++; } $related = trim($related); } $q = urlencode($q); $cl = new SphinxClient(); $cl->SetServer($sphinxhost, $sphinxport); $cl->SetConnectTimeout(2); $cl->SetMatchMode(SPH_MATCH_PHRASE); if($ty == 1 || !$ty) { $cl->SetSortMode(SPH_SORT_EXTENDED,'dateadded desc'); } else if($ty == 2) { $cl->SetSortMode(SPH_SORT_EXTENDED,'views desc'); } else if($ty == 3) { $cl->SetSortMode(SPH_SORT_EXTENDED,'length desc'); } $total = $rows * $cols; if(!$p){$p=1;} $page = ($p-1) * $total; $cl->SetArrayResult(true); $cl->SetLimits($page,$total); $res = $cl->Query($q, $sphinxindex); if(!$res) { echo $cl->GetLastError(); echo $cl->GetLastWarning(); } foreach($res["matches"] as $docinfo) { $id = $docinfo['id']; $ids[] = $id; } $tresults = $res["total"]; mysql_query("update pornstars set videos = '$tresults' where id = '$osid';"); $total_pages = ceil($tresults / $total); if($total_pages == 0){$total_pages = 1;} if($total_pages <= 20) { for($i = 1; $i <= $total_pages; $i++) { if(($p) == $i) { $nav .= " $i \n"; } else { $nav .= " $i \n"; } } } else { if($p < 11) { $i=1; $f=10; } else { if($total_pages-$p > 4){$i=$p-4;$f=$p+5;}else{$i=$total_pages-9;$f=$total_pages;} } for($a = $i; $a <= $f; $a++) { if($p == $a) { $nav .= " $a \n"; } else { $i2=$i-1; $nav .= " $a \n"; } } } $b=$p-1; $p++; if($p <= $total_pages){$next = "";}else{$next = "";} if($p > 2){$back = "";}else{$back="";} $b=$p-1; $p++; if($p <= $total_pages){$next = " » ";}else{$next = " » ";} if($p > 2){$back = " « ";}else{$back=" « /a>";} $navbar = "
    $back $nav $next
    "; $cnt=0;$tot=0;$blk=0;$brk=$cols-1;$split=$split-1;$cc=0; if($tresults > 0) { foreach($ids as $id) { $result = mysql_query("SELECT id,title,site,thumbs,url,dateadded,orientation,length,tags,category from videos where id = $id;",$lnk); while ($myrow = mysql_fetch_row($result)) { $id = $myrow[0]; $title = $myrow[1]; $site = $myrow[2]; $thumbs = $myrow[3]; $url = $myrow[4]; $date = $myrow[5]; $orientation = $myrow[6]; $length = $myrow[7]; $tags = $myrow[8]; $category = $myrow[9]; $tags = explode(",",$tags); shuffle($tags); foreach($tags as $tag) { $tag = trim($tag); $tag2 = urlencode(strtolower($tag)); $tag = ucwords($tag); if(strlen($tag) > 2) { $alltags .= "
    $tag, "; } } $alltags = trim($alltags,", "); $starttime=time(); $endtime=strtotime($date); $timediff = $starttime-$endtime; $days=intval($timediff/86400); $remain=$timediff%86400; $hours=intval($remain/3600); $remain=$remain%3600; $mins=intval($remain/60); $secs=$remain%60; if($days < 1){if($hours < 1){$dc = "$mins Minutes Ago";}else{if($hours == 1){$dc = "$hours Hour Ago";}else{$dc = "$hours Hours Ago";}}} else if($days < 7 && $days > 0){$dc = "$days Days Ago";} else if($days < 30 && $days >=7){$dc = floor($days/7);if($dc == 1){$dc = "$dc Week Ago";}else{$dc = "$dc Weeks Ago";}} else if($days >= 30){$dc = floor($days/30);if($dc == 1){$dc = "$dc Month Ago";}else{$dc = "$dc Months Ago";}} else if($days >= 365){$dc = floor($days/365);if($dc == 1){$dc = "$dc Year Ago";}else{$dc = "$dc2 Years Ago";}} $length = explode(":",$length); if($length[0] > 0) { $length = "$length[0]:$length[1]:$length[2]"; } else { $length = "$length[1]:$length[2]"; } $ftitle = $title; if(strlen($title)>$maxtitle) { $title = substr($title, 0, $maxtitle); $title = trim($title); $title = $title . "..."; } $content[$blk] .= "
    $title$title
    $dc
    $alltags
    "; if($cnt == $brk && $tot != $split){$content[$blk] .= "";$cnt=0;}else{$cnt++;} if($tot == $split){$blk++;$tot=0;$cnt=0;}else{$tot++;} $alltags = ""; } if($cc == 1 && $thumb){mysql_query("update pornstars set thumb = '$thumbs' where id = '$osid';");} $cc++; } } else { $nfmsg = "

    We're sorry but the video you're looking for was not found, however we recommend you the following videos:


    "; $result = mysql_query("SELECT id,title,site,thumbs,url,dateadded,orientation,length,tags,category from videos order by lastview desc limit $total;",$lnk); $cnt=0;$tot=0;$blk=0;$brk=$cols-1;$split=$split-1; while ($myrow = mysql_fetch_row($result)) { $id = $myrow[0]; $title = $myrow[1]; $site = $myrow[2]; $thumbs = $myrow[3]; $url = $myrow[4]; $date = $myrow[5]; $orientation = $myrow[6]; $length = $myrow[7]; $tags = $myrow[8]; $category = $myrow[9]; $tags = explode(",",$tags); shuffle($tags); foreach($tags as $tag) { $tag = trim($tag); $tag2 = urlencode(strtolower($tag)); $tag = ucwords($tag); if(strlen($tag) > 2) { $alltags .= "$tag, "; } } $alltags = trim($alltags,", "); $starttime=time(); $endtime=strtotime($date); $timediff = $starttime-$endtime; $days=intval($timediff/86400); $remain=$timediff%86400; $hours=intval($remain/3600); $remain=$remain%3600; $mins=intval($remain/60); $secs=$remain%60; if($days < 1){if($hours < 1){$dc = "$mins Minutes Ago";}else{if($hours == 1){$dc = "$hours Hour Ago";}else{$dc = "$hours Hours Ago";}}} else if($days < 7 && $days > 0){$dc = "$days Days Ago";} else if($days < 30 && $days >=7){$dc = floor($days/7);if($dc == 1){$dc = "$dc Week Ago";}else{$dc = "$dc Weeks Ago";}} else if($days >= 30){$dc = floor($days/30);if($dc == 1){$dc = "$dc Month Ago";}else{$dc = "$dc Months Ago";}} else if($days >= 365){$dc = floor($days/365);if($dc == 1){$dc = "$dc Year Ago";}else{$dc = "$dc2 Years Ago";}} $length = explode(":",$length); if($length[0] > 0) { $length = "$length[0]:$length[1]:$length[2]"; } else { $length = "$length[1]:$length[2]"; } $ftitle = $title; if(strlen($title)>$maxtitle) { $title = substr($title, 0, $maxtitle); $title = trim($title); $title = $title . "..."; } $content[$blk] .= "
    $title$title
    $dc
    $alltags
    "; if($cnt == $brk && $tot != $split){$content[$blk] .= "";$cnt=0;}else{$cnt++;} if($tot == $split){$blk++;$tot=0;$cnt=0;}else{$tot++;} $alltags = ""; } } $html = file_get_contents("template5.html", "r"); preg_match_all ("/--include:(.*?)--/si", $html, &$matches2); $matches2 = $matches2[1]; foreach($matches2 as $var) { $inc = file_get_contents("$var", "r"); $html = preg_replace("/--include:$var--/i", "$inc", $html); } for($x=0;$x<$blocks;$x++) { $y=$x+1; $html = preg_replace("/--block$y--/i", "$nfmsg$content[$x]", $html); } $html = preg_replace("/--bio--/i", "$bio", $html); $html = preg_replace("/--navbar--/i", "$navbar", $html); $html = preg_replace("/--q--/i", "$q", $html); $html = preg_replace("/--q2--/i", $q2, $html); $html = preg_replace("/--tags--/i", "$related", $html); $html = preg_replace("/--last--/i", "$last", $html); $html = preg_replace("/--allcats--/i", "$allcats", $html); $html = preg_replace("/--biglist--/i", "$biglist", $html); $html = preg_replace("/--hardlinks--/i", "$hardlinks", $html); $html = preg_replace("/--pornstarlist--/i", "$pornstarlist", $html); $html = preg_replace("/--pornstarlist2--/i", "$pornstarlist2", $html); $xix = "[an error occurred while processing this directive]"; $html = preg_replace("/--script--/i", "$xix", $html); $hardlinks = file_get_contents("http://fooxy.com/hlfiles/pornstars.php?pornstar=$q&domain=amateurpornx.com", "r"); $html = preg_replace("/--hardlinks--/i", $hardlinks, $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; } function birthday($birthday) { list($year,$month,$day) = explode("-",$birthday); $year_diff = date("Y") - $year; $month_diff = date("m") - $month; $day_diff = date("d") - $day; if($day_diff < 0 || $month_diff < 0) { $year_diff--; } return $year_diff; } function getsign($date) { list($year,$month,$day)=explode("-",$date); if(($month==1 && $day>20)||($month==2 && $day<20)) { return "Aquarius"; } else if(($month==2 && $day>18 )||($month==3 && $day<21)) { return "Pisces"; } else if(($month==3 && $day>20)||($month==4 && $day<21)) { return "Aries"; } else if(($month==4 && $day>20)||($month==5 && $day<22)) { return "Taurus"; } else if(($month==5 && $day>21)||($month==6 && $day<22)) { return "Gemini"; } else if(($month==6 && $day>21)||($month==7 && $day<24)) { return "Cancer"; } else if(($month==7 && $day>23)||($month==8 && $day<24)) { return "Leo"; } else if(($month==8 && $day>23)||($month==9 && $day<24)) { return "Virgo"; } else if(($month==9 && $day>23)||($month==10 && $day<24)) { return "Libra"; } else if(($month==10 && $day>23)||($month==11 && $day<23)) { return "Scorpio"; } else if(($month==11 && $day>22)||($month==12 && $day<23)) { return "Sagittarius"; } else if(($month==12 && $day>22)||($month==1 && $day<21)) { return "Capricorn"; } } ?>