session_start(); $userid = $_SESSION[userid]; // $userid=2; if (!$userid) header("Location: index.php"); $id = $userid; require_once ("../class/mysql.class.php"); require_once ("../config/config.php"); require_once ("../function/routine.php"); require_once("../function/variabili.php"); // $logo = "images/logo_mod.gif"; // Inizio sessione per pagamento POS /* if ($_GET[section]=="abbonamento_richiesta") { $_abb= (isset($_POST[c_abb])) ? floor($_POST[c_abb]): 0; $_tpag= (isset($_POST[tpag])) ? floor($_POST[tpag]): 0; if (!$_abb or !$_tpag) die("errore elaborazione .. procedura bloccata"); $_SESSION[idabbonamento]=$_abb; $_SESSION[idutente]=$userid; $_SESSION[tipopagamento]=$_tpag; header("Location: pos_buy.php"); die(); } */ // Fine procedura per pagamento /* creazione delle variabili da utilizzare nelle form $db_utente contiene il db utente $db_abbonamento true e false se l'utente ha un abbonamento $db_promozione true o false se abbonamento in promozione $db_utente_abbonamento dati dell'abbonamento se presente $db_num_annunci numero di annunci RI (foto) presenti $db_num_annunci_g numero di annunci RI gratuiti presenti $db_num_annunci_a numero di annunci RI con abbonamento presenti $db_num_annunci_p numero di annunci RI con promozione presenti * non attivo $db_num_annunci_m numero di annunci RR (testo) presenti $db_tot_annunci numero totale di annunci RI (anche disattivi) $max_annunci massimo numero di annunci pubblicabili con foto gratuite $max_annunci_m massimo numero di annunci testo gratuite $max_annunci_foto totale di annunci con foto permesse $max_annunci_testo totale di annunci con testo permesse */ $statosito=get_var("statosito"); $max_annunci_m=get_var("max_brevi"); $max_annunci_testo=$max_annunci_m; $storicizzabili = get_var('storicizzabili'); $db->data = db_data; $db->sql = "select * from tbl_utenti where id=" . $id . " limit 1"; $db->connect(); $qdb = $db->query(); $record = mysql_fetch_array($qdb); $db_utente=$record; $max_annunci=$record[annunci_max]; $qdb=mysql_query("select * from tbl_utenti_abbonamenti where idutente=".$db_utente[id]." and datediff(now(),inizio)>=0 and datediff(fine,now())>=0 order by id desc limit 1"); $db_abbonamento = false; $db_promozione = false; if (mysql_num_rows($qdb)) { $db_utente_abbonamento = mysql_fetch_array($qdb); $db_abbonamento = true; if ($db_utente_abbonamento[costo] == 0) $db_promozione = true; } else $db_utente_abbonamento = array(); $qdb = mysql_query("select count(*) from tbl_annunci where idUser=$userid and rif like 'RI%'"); $temp = mysql_fetch_row($qdb); $db_tot_annunci = $temp[0]; $qdb = mysql_query("select count(*) from tbl_annunci where idUser=$userid and rif like 'RI%' and stato"); $temp = mysql_fetch_row($qdb); $db_num_annunci = $temp[0]; $qdb = mysql_query("select count(*) from tbl_annunci where idUser=$userid and rif like 'RI%' and tipo_ann='G' and stato"); $temp = mysql_fetch_row($qdb); $db_num_annunci_g = $temp[0]; $qdb = mysql_query("select count(*) from tbl_annunci where idUser=$userid and rif like 'RI%' and (tipo_ann='A' or tipo_ann='P')"); $temp = mysql_fetch_row($qdb); $db_num_annunci_a = $temp[0]; $qdb = mysql_query("select count(*) from tbl_annunci where idUser=$userid and rif like 'RR%'"); $temp = mysql_fetch_row($qdb); $db_num_annunci_m = $temp[0]; if ($db_abbonamento) { $max_annunci_foto = $max_annunci + $db_utente_abbonamento[max_annunci]; $max_annunci_testo = $max_annunci_m + $db_utente_abbonamento[max_annunci_m]; } else { $max_annunci_foto = $max_annunci; $max_annunci_testo = $max_annunci_m; } //die($db_num_annunci." ".$max_annunci_foto); if ($db_num_annunci>$max_annunci_foto) $db_num_annunci=$max_annunci_foto; // die("max annunci foto".$max_annunci." ".$db_utente_abbonamento[max_annunci]); $max_creazione = $storicizzabili; // Fine caricamento delle variabili $utente = $record[user]; $tipo = $record[tipo]; $diritti = $record[diritto]; switch ($tipo) { case 1: $stipo = "Amministratore"; break; case 2: $stipo = "Agenzia"; break; case 3: $stipo = "Privato"; break; case 4: $stipo = "Professionista"; break; case 5: $stipo = "Ditta/Artigiano"; break; case 6: $stipo = "Servizi"; break; case 7: $stipo = "Costruttore Edile"; break; } ?>
Utente : = $_SESSION[utente] ?> |
$sezione = @$_GET[section];
if (!isset($sezione))
$sezione = "info";
if ($statosito=="2")
$sezione="offline";
switch ($sezione) {
case "annunci_m":
include ("section/annunci_utente_m.php");
break;
case "annunci":
include ("section/annunci_utente.php");
break;
case "annunci_edit_m":
include ("section/annunci_utente_m_edit.php");
break;
case "annunci_edit":
include ("section/annunci_utente_edit.php");
break;
case "password":
include ("section/password_utente.php");
break;
case "accessi":
require ("section/accessi.php");
break;
case "profilo":
require ("section/profilo_utente.php");
break;
case "utenze":
require ("section/utenza_admin.php");
break;
case "abbonamenti":
require ("section/abbonamenti_utente.php");
break;
case "offerte_edit":
require ("section/offerte_edit.php");
break;
case "richieste":
require ("section/richieste_admin.php");
break;
case "info":
require ("section/info_utente.php");
break;
case "debug":
require ("section/debug_utente.php");
break;
case "offline":
require ("section/offline_utente.php");
break;
case "paypal":
require ("section/paypal.php");
break;
case "pubblicita":
require ("section/pubblicita_utente.php");
break;
case "debug2": {
var_dump($_SESSION);
echo ' '; var_dump($_POST); echo ' '; var_dump($_GET); echo ' '; var_dump($_SERVER); } } ?> |
© 2003-= date('Y')?> TECODA S.r.l. |