'community','dir_name'=>'qnmit'); $u=TDev_User::getFactory($opt); $LV = new TDev_Tpl(array('encoding'=>'UTF-8'), $opt); if($u->isFBConnected()) { $fbn = $u->getName(); $name = ''.$fbn['nome'].' '.$fbn['cognome'].''; $logout = 'Esci'; $fbclass = 'fb-user '; } else { $name = $u->getNick(); $logout = 'Esci'; } $help_popup = TDev_Utils::makePopup(TDev_Link::getAbs('qnmit_community','popup.php?v=faq'),"Help", 'rel="nofollow"'); $pm = $u->getNumPM(); if(!$pm) $pm = 0; if($u->isLogged()){ $cache = 0; $div_loggati = "
\n"; $div_loggati .= " \n"; $div_loggati .= "
\n"; }else{ $cache = 0; $div_loggati = "
\n"; $div_loggati .= " \n"; $div_loggati .= "
\n"; $div_loggati .= " \"Facebook\n"; } }else{ $cache = 0; } define('_ZEND_FORUM_CACHE_', $cache); date_default_timezone_set('Europe/Rome'); define('_LIBRARY_ZEND_', realpath($root.'src/library')); set_include_path(get_include_path() . PATH_SEPARATOR . _LIBRARY_ZEND_); if ($cache) { /* $frontendOptions = array( 'lifetime' => 21600, 'caching' => true, 'automatic_serialization' => false, 'automatic_cleaning_factor' => 3000, ); $backendOptions = array( 'cache_dir' => '/cache/bellezze/', 'hashed_directory_level' => 0, 'read_control' => false, 'file_locking' => false ); */ $zend_id_pagina = 'qnm_'.md5($_SERVER['REQUEST_URI']); $timeout = set_timeout(); $frontendOptions = array( 'lifetime' => $timeout, 'caching' => true, 'automatic_serialization' => false, 'automatic_cleaning_factor' => 0, ); $memcachedOptions = array( 'compression'=>false, //'compatibility'=>false, 'servers'=>array( 0=>array( 'host'=>'172.16.1.51', 'port'=>'11600', 'persistent'=>true, 'weight'=>1, 'timeout'=>5, 'retry_interval'=>15, 'status'=>true, //'failure_callback'=>'' ), ) ); require_once _LIBRARY_ZEND_ . '/Zend/Cache.php'; $zend_cache = Zend_Cache::factory('Core', 'Memcached', $frontendOptions, $memcachedOptions); // $zend_cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions); // $zend_id_pagina = md5($_SERVER["REQUEST_URI"]); if ($zend_page = $zend_cache->load($zend_id_pagina) ) { header('Content-Type: text/html; charset=utf-8'); echo $zend_page; echo "\n"; echo "\n"; exit; } @ob_start(); } include($root."src/project/qnm/bv/VipWWW.php"); include($root."src/project/qnm/bv/CLASS/template.inc"); include($root."src/project/qnm/bv/CLASS/newalbum.inc"); //File con meta description o latre variabili settabili @include("./meta-tag.php"); /*** OVERTURE ***/ if(preg_match('/pornostar/', $_SERVER['SCRIPT_FILENAME'])) $overstring = 'sexy+shop'; else $overstring = 'incontri,annunci+personali'; //include "../../../../project/qnm/bv/ovtlib.php"; /*** OVERTURE ***/ //Verifico categoria e bellezza if(!file_exists($root."src/web/qnm/bellezze/".$b."/")){ include($root.'src/web/qnm/bellezze/notfound404.htm'); exit; } $array_bnome = explode("_", $b); $bcicli = sizeof($array_bnome)-1; for($bn=0; $bn<=$bcicli; $bn++){ $bnome .= ucfirst(strtolower($array_bnome[$bn])) . " "; } //Aggiunta testo in fondo alla pagina sotto l'elenco... [tolta..mail massj 02/03/2010] $testo_bottom = ""; /* switch($b){ case 'attrici_italiane': $testo_bottom = "Alcune delle gallerie nelle pagine successive presentano immagini e foto di attrici nude."; break; case 'attrici_straniere': $testo_bottom = "Nelle fotogallery collegate vi possono essere delle foto e immagini di attrici nude."; break; case 'modelle': $testo_bottom = "Alcune delle gallerie nelle pagine successive presentano immagini e foto di modelle nude."; break; case 'showgirls_italiane': $testo_bottom = "Alcune delle gallerie nelle pagine successive presentano immagini e foto di showgirl e veline nude."; break; default: $testo_bottom = ""; break; } */ function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } //Recupero dati bellezze + cliccate function getCusDbConnection(){ $hostname="192.168.0.102"; $user='tgdbroot'; $password='TGr00tDBS'; return @mysql_connect($hostname, $user, $password); } $dbh = getCusDbConnection(); @mysql_select_db('qnm'); $query_cliccati = "SELECT B.id,B.url_id,B.nome,Cat.url_id as url_id_categoria,Cat.nome as nome_categoria,sum(C.click) as click FROM BV_bellezze as B,BV_categorie as Cat,BV_click_storico as C where B.categoria_id=Cat.id and B.id=C.id_bellezza and B.stato='on' group by B.id order by click desc"; $res_cliccati = @mysql_query($query_cliccati,$dbh); $query_ultimi = "SELECT B.id, B.url_id, B.nome, C.url_id AS url_id_categoria FROM `BV_bellezze` AS B, BV_categorie AS C WHERE B.categoria_id = C.id and B.stato='on' and C.url_id='$b' ORDER BY B.`data_ins` DESC limit 20"; $res_ultimi = @mysql_query($query_ultimi,$dbh); $tipo_primipiani = $b; include($root.'bellezze_vip/bv/parts/HTML/primipianiBellezze.php'); //echo $html; $html_primipiani = $html; if($b!='pornostar'){ include($root.'/src/project/qnm/bv/parts/HTML/tagcloudBellezze.php'); $html_tagcloud = $html; }else{ $html_tagcloud = ""; } //include('/clusterfs/fs01/prod/src/project/qnm/bv/parts/HTML/ultimeBellezze.php'); //$html_ultime = $html; mysql_close($dbh); srand(make_seed()); $randval = rand(1, 4); if ($randval == 2) $randval = 1; if ($randval == 3) $randval = 4; // 1.1 ISTANZA DI TEMPLATE $t = new Template(".", "remove"); // 1.2 LEGAME TRA VARIABILI E PAGINE HTML $pagina_summary = INC_ALBUM_HTML_DIR."/summary.html"; if($b=='calendari') $pagina_summary = INC_ALBUM_HTML_DIR."/summary_calendari.html"; if($b!='pornostar'){ $tag_banner = "qnm.it/qnm_it_gr"; $_adv = TDev_Adv::getFactory(array('project_name'=>'qnm','dir_name'=>'qnmit','section' => 'altrepagine')); $dati_brand = $_adv->getBrandInfo(true); $style_brand = $_adv->getBrandStyle(); $divtop = $_adv->getBrandTop(); $fullbanner = $_adv->getBrandExpanding(); $repositioning = $_adv->getRepositioningCenterBanner('728x90',-95); }else{ $tag_banner = "Bellezzevip.com/bv_it_pornostar"; $_adv = TDev_Adv::getFactory(array('project_name'=>'qnm','dir_name'=>'qnmit','section' => 'pornostar')); $dati_brand = $_adv->getBrandInfo(true); $style_brand = $_adv->getBrandStyle(); $divtop = $_adv->getBrandTop(); $fullbanner = $_adv->getBrandExpanding(); $repositioning = $_adv->getRepositioningCenterBanner('728x90',-95); } if($b!='pornostar'){ $title_suffix = "QNM"; }else{ $title_suffix = "BellezzeVip"; } if($b!='pornostar'){ $logo = "logo.png"; $label_logo = "
Il magazine online di lifestyle maschile
"; }else{ $logo = "logoBV.png"; $label_logo = ""; } if($b!='pornostar'){ $link_rss = "

\"ico-rss.png,

"; }else{ $link_rss = ""; } if($b!='pornostar'){ $footer = "

© 2008-2009 QNM, tutti i diritti riservati - Trilud S.p.A. - P.iva: 13059540156. Privacy

  |  Redazione

  |  Contattaci

  |  Pubblicità su QNM

\"rss\"

QNM, supplemento alla testata giornalistica NanoPress registrata presso il Tribunale di Milano n° 314/08

"; }else{ $footer = "

© 2008-2009 BellezzeVip, tutti i diritti riservati - Trilud S.p.A. - P.iva: 13059540156.

  |  Pubblicità su BellezzeVip

"; } if($b=='pornostar'){ $analytics = ""; }else{ $analytics = ""; } if($b!='pornostar'){ /*$style_brand = "";*/ } //Disclaimer $disclaimer = ""; $referer = $_SERVER['HTTP_REFERER']; if($b=='pornostar' && !preg_match("/^http:\/\/www.bellezzevip.com\/pornostar\//i",$referer) ){ $disclaimer = ""; } $fb = TDev_Facebook::getFactory(array('project_name'=>'community','dir_name'=>'qnmit')); $script_fb = str_replace('{','{ ',$fb->getConnectCode(false)); $script_fb.= $fb->getCookieCode(); $socialbox = ''; if($b!='pornostar'){ $socialbox = '
Segui QNM

'; } if($b!='pornostar'){ $circuito_ie9 = 'qnm'; $nomeblog_ie9 = 'bellezze'; $IE9_Pin = TDev_Pin::getInstance($circuito_ie9,$nomeblog_ie9); $meta_ie9 = $IE9_Pin->getMetadata(false); }else{ $circuito_ie9 = 'qnm'; $nomeblog_ie9 = 'pornostar'; $IE9_Pin = TDev_Pin::getInstance($circuito_ie9,$nomeblog_ie9); $meta_ie9 = $IE9_Pin->getMetadata(false); } if($b!='pornostar'){ $bannerSection = 'altrepagine'; }else{ $bannerSection = 'pornostar'; } $t->set_file(array("page" => $pagina_summary, "topbanner" => INC_ALBUM_HTML_DIR."/summary_topbanner.html", "piuclick" => INC_ALBUM_HTML_DIR."/PLUS/piucliccate.html", "bottombanner" => INC_ALBUM_HTML_DIR."/summary_bottombanner_$randval.html", "high" => INC_ALBUM_HTML_DIR."/$b"."/summary_high.html", //"aggiornamenti" => INC_ALBUM_HTML_DIR."/summary_aggiornamenti.html", "dx" => INC_ALBUM_HTML_DIR."/summary_dx.html", "dxtopbanner" => INC_ALBUM_HTML_DIR."/summary_dxtopbanner.html", "dxbottombanner" => INC_ALBUM_HTML_DIR."/summary_dxbottombanner.html", "LASTTAG" => INC_ALBUM_HTML_DIR."/codice.html" )); // 1.3 LEGAME TRA PAGINA, BLOCCO E VARIABILE $path_dir = $b; $prova = new Album($root."src/web/qnm/bellezze/$b/"); $listdir = $prova->dirlist(); $numdir = $prova->dirnum(); //$listfile = $prova->filelist(); $numfile = $prova->filenum(); $t->set_var(array("Titolo" => $bnome, "NDIR" => $numdir, //"LFILE" => $listfile, "PATHDIR" => $path_dir, "NFILE" => $numfile, "ovt" => $ovtcol, "DESCRIPTION" => $meta_description, "BOTTOM_TEXT"=>$testo_bottom, "HTMLPRIMIPIANI"=>$html_primipiani, "HTMLTAGCLOUD"=>$html_tagcloud, //"HTMLULTIME"=>$html_ultime, "DIVLOGGATO"=>$div_loggati, "TAGBANNER"=>$tag_banner, "TITLESUFFIX"=>$title_suffix, "LABELLOGO"=>$label_logo, "LOGO"=>$logo, "LINKRSS"=>$link_rss, "HTMLFOOTER"=>$footer, "ANALYTICS"=>$analytics, "BANNERSECTION"=>$bannerSection, //"BRAND"=>$style_brand, //"DIVTOP"=>$divtop, //"FULLBANNER"=>$fullbanner, //"REPOSITIONING"=>$repositioning, "DISCLAIMER"=>$disclaimer, "SCRIPTFB"=>$script_fb, "SOCIALBOX"=>$socialbox, "METAIE9"=>$meta_ie9, )); // 1.3 LEGAME TRA PAGINA, BLOCCO E VARIABILE $t->set_block("page", "row", "rows"); $array_dir = explode("#", $prova->dirlist()); $cicli = sizeof($array_dir); /////////////////////////////////////////// $ciclone1 = ceil($cicli/3); $ciclone2 = $ciclone1*2; $ciclone3 = $cicli; for($k=0; $k<=$ciclone1-1; $k++){ $array_dir1[] = $array_dir[$k]; } for($k=$ciclone1; $k<=$ciclone2-1; $k++){ $array_dir2[] = $array_dir[$k]; } for($k=$ciclone2; $k<=$ciclone3; $k++){ $array_dir3[] = $array_dir[$k]; } //////////////////////////////////////////// for($k=0; $k<$ciclone1; $k++){ $ad1 = $array_dir[$k+1]; $ad2 = $array_dir[$k+2]; $path1 = "$array_dir1[$k]/"; $path2 = "$array_dir2[$k]/"; $path3 = "$array_dir3[$k]/"; if($b=='calendari'){ $numf1 = $prova->dirnum2($root."src/web/qnm/bellezze/$b/$array_dir1[$k]"); $numf2 = $prova->dirnum2($root."src/web/qnm/bellezze/$b/$array_dir2[$k]"); $numf3 = $prova->dirnum2($root."src/web/qnm/bellezze/$b/$array_dir3[$k]"); }else{ $numf1 = $prova->filenum2($root."src/web/qnm/bellezze/$b/$array_dir1[$k]"); $numf2 = $prova->filenum2($root."src/web/qnm/bellezze/$b/$array_dir2[$k]"); $numf3 = $prova->filenum2($root."src/web/qnm/bellezze/$b/$array_dir3[$k]"); } $d1 = ""; $array_bnome = explode("_", $array_dir1[$k]); $bcicli = sizeof($array_bnome)-1; for($bn=0; $bn<=$bcicli; $bn++){ $array_bnome[$bn] = preg_replace ("/123/", "'", $array_bnome[$bn]); $d1 .= ucfirst(strtolower($array_bnome[$bn]))." "; } $d2 = ""; $array_bnome = explode("_", $array_dir2[$k]); $bcicli = sizeof($array_bnome)-1; for($bn=0; $bn<=$bcicli; $bn++){ $array_bnome[$bn] = preg_replace ("/123/", "'", $array_bnome[$bn]); $d2 .= ucfirst(strtolower($array_bnome[$bn]))." "; } $d3 = ""; $array_bnome = explode("_", $array_dir3[$k]); $bcicli = sizeof($array_bnome)-1; for($bn=0; $bn<=$bcicli; $bn++){ $array_bnome[$bn] = preg_replace ("/123/", "'", $array_bnome[$bn]); $d3 .= ucfirst(strtolower($array_bnome[$bn]))." "; } if($b!='pornostar'){ $cat1 = "$d1 ($numf1)"; $cat2 = "$d2 ($numf2)"; if($array_dir2[$k] == "") $cat2 = "  "; $cat3 = "$d3 ($numf3)"; if($array_dir3[$k] == "") $cat3 = "  "; }else{ $cat1 = "$d1 ($numf1)"; $cat2 = "$d2 ($numf2)"; if($array_dir2[$k] == "") $cat2 = "  "; $cat3 = "$d3 ($numf3)"; if($array_dir3[$k] == "") $cat3 = "  "; } $t->set_var(array("CAT1" => $cat1, "CAT2" => $cat2, "CAT3" => $cat3)); $t->parse("rows", "row", true); } $t->pparse("STAMPA", array("high","topbanner","bottombanner","dx","dxtopbanner","dxbottombanner","LASTTAG","piuclick","page")); if (_ZEND_FORUM_CACHE_) { header('Content-Type: text/html; charset=utf-8'); $zend_page = @ob_get_contents(); if ($zend_page != '') { //$zend_cache->save($zend_page."", $zend_id_pagina); $zend_cache->save($zend_page, $zend_id_pagina); } @ob_end_flush(); } function set_timeout() { return 1800; //1/2 h } ?>