prepare($query_page); $page_query->execute(); $row_page = $page_query->fetch(PDO::FETCH_ASSOC); //random link out $out_redirect_rand = rand(1, 5); if($out_redirect_rand == 5 && $link_out != ''){ include('function_global/page_banner/link_out_banner.php'); }else{ $link_out = $row_page['url']; } //aggiungo automaticamente stella random tra 3 e 5 $star_rand = rand(3,5); $star_rand = (int)($row_page['star'] + $star_rand) / 2; $reviewcount = $row_page['reviewcount'] + 1; $new_viewed = $row_page['viewed']+1; //echo $star_rand; $update_star = $db->prepare("UPDATE ".$prefix."photo SET star = :star, reviewcount = :reviewcount WHERE id_photo = :id_photo"); $update_star->bindParam(':star', $star_rand); $update_star->bindParam(':reviewcount', $reviewcount); $update_star->bindParam(':id_photo', $_GET['id_photo']); $update_star->execute(); //aggiorno visualizzazioni $update_views = $db->prepare("UPDATE ".$prefix."photo SET viewed = :viewed WHERE id_photo = :id_photo"); $update_views->bindParam(':viewed', $new_viewed); $update_views->bindParam(':id_photo', $_GET['id_photo']); $update_views->execute(); $title = $row_page['title']; /*HEADER*/ include_once('function_global/set_header.php'); if($set_header_last_modified == 1){ header('Last-Modified: '.gmdate('D, d M Y H:i:s', $row_page['data_ins']).' GMT'); } if($set_header_if_modified_since == 1){ header('If-Modified-Since: '.gmdate('D, d M Y H:i:s', $row_page['data_ins']).' GMT'); } if($set_header_expires == 1){ header('Expires: '.gmdate('D, d M Y H:i:s', time() + 31536000).' GMT'); } $testometa = utf8_encode(ucfirst($row_page['title'])).' pics. '.utf8_encode(ucfirst($row_page['description']).'.'); // aggiungo titoli correlati a description if($search_model == 1){ $query_photo_description = "SELECT title, MATCH(title, description, model) AGAINST('".str_replace('-', ' ', trim(addslashes($title)))."') as score FROM ".$prefix."photo WHERE MATCH(title, description, model) AGAINST('".str_replace('-', ' ', trim(addslashes($title)))."') AND id_photo<>'".$_GET['id_photo']."' AND id_photo<'".$_GET['id_photo']."' ORDER BY score DESC LIMIT 10"; }else{ $query_photo_description = "SELECT title, MATCH(title, description) AGAINST('".str_replace('-', ' ', trim(addslashes($title)))."') as score FROM ".$prefix."photo WHERE MATCH(title, description) AGAINST('".str_replace('-', ' ', trim(addslashes($title)))."') AND id_photo<>'".$_GET['id_photo']."' AND id_photo<'".$_GET['id_photo']."' ORDER BY score DESC LIMIT 10"; } //echo $query_photo_description; $photo_description_query = $db->prepare($query_photo_description); $photo_description_query->execute(); while($row_page_description = $photo_description_query->fetch(PDO::FETCH_ASSOC)){ $testometa .= ' '.utf8_encode(ucfirst($row_page_description['title'])).'.'; } $acapo = array("
", "
", "
", "
", "

", "

"); $testoconspazi = utf8_encode(str_replace($acapo, ' ', $testometa)); $caratteridaeliminare = array("\n", "\r", " ", " "); $testoxmeta = tagliaparoleintere(strip_tags(str_replace($caratteridaeliminare, '', $testoconspazi._SITE_DESCRIPTION)), 150); //preparo keyword $testoxkey = substr(strip_tags(str_replace($preposizioni, ' ', strtolower(trim($testoconspazi._SITE_DESCRIPTION)))), 0, 150); $escludi_key = array('Page '.$_GET['page'], '|', 'shemale ', _SITE_NAME); $testoxkey = str_replace($escludi_key, '', $testoxkey); $testoxkey = explode(" ", str_replace(' ', ' ', trim($testoxkey))); //svuoto keywords da mainfile $keyword = $first_keyword; for ($k = 0; $k<9; $k++) { $keyword = $keyword.", ".$testoxkey[$k]; } $all_title = ucfirst($row_page['title']).' | #'.$_GET['id_photo'].' | '._SITE_NAME; ?> <? echo tagliaparoleintere($all_title, 65); ?>
Rating: out of 5 by visitors


Related