// aggiunto da Luca /* include("nt/dbconfig.php"); $db = mysql_connect($db_host, $db_user, $db_password); if ($db == FALSE) die ("Errore nella connessione. Verificare i parametri nel file dbconfig.php"); mysql_select_db($db_name, $db) or die ("Errore nella selezione del database. Verificare i parametri nel file dbconfig.php"); include("nt/counter.php"); contatore("old_navcat",$db); mysql_close($db); */ // inizio vecchio codice include('libraries/dyn/connection.php'); include('libraries/dyn/utilities.php'); include('include/navcat_header.php'); include('include/banners_rand.php'); $idcat = (int)$_GET['idcat']; $father = $_GET['father']; $la = true; $std_view_days = 300; if ( $_GET['la'] === 'y' ) { $la = true; } if (isset($father) && is_numeric($father)) { $SQL_MENU = "SELECT id, name, father, header_image, style FROM CAT WHERE id=".(int)$father; } else { $SQL_MENU = "SELECT id, name, father, header_image, style FROM CAT WHERE id=".(int)$idcat; } $QUERY = mysql_query($SQL_MENU) or die (); $ROW = mysql_fetch_array($QUERY); $curr_cat = $ROW['header_image']; $SQL_MENU = "SELECT * FROM CAT WHERE father=".(int)$ROW['id']." ORDER BY vr_sx_menu_order asc, name asc"; $QUERY = mysql_query($SQL_MENU) or die (); $TOT_MENU = @mysql_num_rows($QUERY); if ($TOT_MENU>0) { while ( $row = mysql_fetch_array($QUERY) ) { $id_list_sub_cat[] = $row['id']; } } $QUERY = mysql_query($SQL_MENU) or die (); $rec_for_page = 10; $SQL_TOT_ARTICLES = " SELECT count(*) tot FROM ARTICLES WHERE visible=1 AND status='on' AND date<=now() AND"; if (!$la) { $SQL_TOT_ARTICLES .= " DATE_SUB(CURDATE(),INTERVAL ".$std_view_days." DAY) <= date AND "; } $SQL_TOT_ARTICLES .= " id_cat=".(int)$idcat; $QUERY = mysql_query($SQL_TOT_ARTICLES) or die (); $row = mysql_fetch_array($QUERY); $tot_articles = $row['tot']; $s = (int)$_GET['s']; $scat = $_GET['scat']; $f = (int)$_GET['f']; function getCatInfo($id) { $SQL_CAT1 = "SELECT id id_cat, name name_cat, header_image , father,bgcolor1, bgcolor2, style style_cat, description description_cat from CAT where id=".(int)$id; $QUERY_CAT1 = mysql_query($SQL_CAT1); $CAT1 = mysql_fetch_array($QUERY_CAT1); return $CAT1; } if ($tot_articles==0 && $TOT_MENU>0 && $scat!="n") { $INFOCAT = getCatInfo($id_list_sub_cat[0]); } else { $INFOCAT = getCatInfo($idcat); } $banner_cur_cat = $INFOCAT['id_cat']; $bn_728x90 = bannerRand("728x90",$banner_cur_cat,'archive'); $pippo = $bn_728x90['obj']; ?>
=$INFOCAT['name_cat']?> |
| include('include/navcat_menu_sx.php'); ?> | include('include/navcat_menu_cx.php'); ?> | //include('include/navcat_menu_dx.php'); ?> |
| mysql_close(); ?> include('include/home_footer.php'); ?> | ||