<?php ################################################################################## # PHP-RESIDENCE # Copyright (C) 2001-2009 by Marco Maria Francesco De Santis (marco@digitaldruid.net) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # any later version accepted by Marco Maria Francesco De Santis, which # shall act as a proxy as defined in Section 14 of version 3 of the # license. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. ################################################################################## # tables background color and dimensions $t1color = "#b9ccd4"; $t1border = "2"; $t1cellspacing = "0"; $t1cellpadding = "3"; $t2row1color = "#ffffff"; $t2row2color = "#f7f7f7"; # head $body_bgcolor = "#dddddd"; if ($senza_colori == "SI" or $pag == "visualizza_contratto.php") $body_bgcolor = "#ffffff"; echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" > <title> $titolo </title>"; if ($pag == "visualizza_contratto.php" and $extra_head) echo $extra_head; if (C_NASCONDI_MARCA != "SI") echo "<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"./img/favicon.ico\"> "; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"./base.css\"> <style type=\"text/css\"> html,body { margin: 0; padding: 0; height: 100%; border: none; } input.sbutton,button,.cpbutton { background:#ffffff url(./themes/snj/img/button.gif) repeat-x bottom; border-top-color: #555555; border-left-color: #555555; border-right-color: #333333; border-bottom-color: #333333; border-top-width: 1px; border-left-width: 1px; border-bottom-width: 1px; border-right-width: 1px } table.t1 tr:hover, table.t1wc tr:hover, table.m1 tr:hover, table.m2 tr:hover { background-color: #eeeeee; } table.t1 tr:first-child, table.m1 tr:first-child, table.m2 tr:first-child { background-color: transparent; } #mmenu { background: url(./img/logo.png) no-repeat right top; } </style> </head> <body style=\"background-color: $body_bgcolor;\">"; if ($pag != "visualizza_contratto.php") echo "<table style=\"height: 97%; width: 99%; background-color: #000000; margin-right: auto; margin-left: auto; margin-top: 5px; margin-bottom: 5px; border-width: 1px; border-color: black;\" cellpadding=\"0\" cellspacing=\"1\"> <tr><td style=\"background-color: #ffffff; vertical-align: top; margin:0; padding:0;\"> "; if ($show_bar != "NO") { if ($id_utente != 1) { $tableprivilegi = $PHPR_TAB_PRE."privilegi"; if (!$anno_utente_attivato) { if (!$privilegi_annuali_utente) $privilegi_annuali_utente = esegui_query("select * from $tableprivilegi where idutente = '$id_utente' and anno = '$anno'"); if (numlin_query($privilegi_annuali_utente) == 0) $anno_utente_attivato = "NO"; else $anno_utente_attivato = "SI"; } # fine if (!$anno_utente_attivato) if ($anno_utente_attivato == "SI") { if (!$privilegi_globali_utente) $privilegi_globali_utente = esegui_query("select * from $tableprivilegi where idutente = '$id_utente' and anno = '1'"); if (!$priv_mod_pers) $priv_mod_pers = risul_query($privilegi_globali_utente,0,'priv_mod_pers'); if (substr($priv_mod_pers,0,1) == "s" and !$modifica_pers) $modifica_pers = "SI"; if (!$priv_crea_backup) $priv_crea_backup = substr($priv_mod_pers,1,1); if (!$priv_ins_clienti) $priv_ins_clienti = risul_query($privilegi_globali_utente,0,'priv_ins_clienti'); if (substr($priv_ins_clienti,0,1) != "s" and !$inserimento_nuovi_clienti) $inserimento_nuovi_clienti = "NO"; if (substr($priv_ins_clienti,1,1) != "s" and substr($priv_ins_clienti,1,1) != "p" and !$modifica_clienti) $modifica_clienti = "NO"; if (substr($priv_ins_clienti,2,1) != "s" and substr($priv_ins_clienti,2,1) != "p" and !$vedi_clienti) $vedi_clienti = "NO"; if (!$priv_ins_prenota) $priv_ins_prenota = risul_query($privilegi_annuali_utente,0,'priv_ins_prenota'); if (!$priv_ins_nuove_prenota) $priv_ins_nuove_prenota = substr($priv_ins_prenota,0,1); if (!$priv_ins_costi) $priv_ins_costi = risul_query($privilegi_annuali_utente,0,'priv_ins_costi'); if (!$priv_ins_spese) $priv_ins_spese = substr($priv_ins_costi,0,1); if (!$priv_ins_entrate) $priv_ins_entrate = substr($priv_ins_costi,1,1); if (!$priv_vedi_tab) $priv_vedi_tab = risul_query($privilegi_annuali_utente,0,'priv_vedi_tab'); if (!$priv_vedi_tab_mesi) $priv_vedi_tab_mesi = substr($priv_vedi_tab,0,1); if (!$priv_vedi_tab_prenotazioni) $priv_vedi_tab_prenotazioni = substr($priv_vedi_tab,1,1); if (!$priv_vedi_tab_costi) $priv_vedi_tab_costi = substr($priv_vedi_tab,2,1); if (!$priv_vedi_tab_periodi) $priv_vedi_tab_periodi = substr($priv_vedi_tab,3,1); if (!$priv_vedi_tab_regole) $priv_vedi_tab_regole = substr($priv_vedi_tab,4,1); if (!$priv_vedi_tab_appartamenti) $priv_vedi_tab_appartamenti = substr($priv_vedi_tab,5,1); } # fine if ($anno_utente_attivato == "SI") } # fine if ($id_utente != 1) else { if (!$anno_utente_attivato) $anno_utente_attivato = "SI"; if (!$modifica_pers) $modifica_pers = "SI"; if (!$priv_crea_backup) $priv_crea_backup = "s"; if (!$inserimento_nuovi_clienti) $inserimento_nuovi_clienti = "SI"; if (!$modifica_clienti) $modifica_clienti = "SI"; if (!$vedi_clienti) $vedi_clienti = "SI"; if (!$priv_ins_nuove_prenota) $priv_ins_nuove_prenota = "s"; if (!$priv_ins_spese) $priv_ins_spese = "s"; if (!$priv_ins_entrate) $priv_ins_entrate = "s"; if (!$priv_vedi_tab_mesi) $priv_vedi_tab_mesi = "s"; if (!$priv_vedi_tab_prenotazioni) $priv_vedi_tab_prenotazioni = "s"; if (!$priv_vedi_tab_costi) $priv_vedi_tab_costi = "s"; if (!$priv_vedi_tab_periodi) $priv_vedi_tab_periodi = "s"; if (!$priv_vedi_tab_regole) $priv_vedi_tab_regole = "s"; if (!$priv_vedi_tab_appartamenti) $priv_vedi_tab_appartamenti = "s"; } # fine else if ($id_utente != 1) if ($anno_utente_attivato == "SI") { $mese_attuale = date("n",(time() + (C_DIFF_ORE * 3600))); if ($mese_attuale == 1) $MESE_ATT = "GENNAIO"; if ($mese_attuale == 2) $MESE_ATT = "FEBBRAIO"; if ($mese_attuale == 3) $MESE_ATT = "MARZO"; if ($mese_attuale == 4) $MESE_ATT = "APRILE"; if ($mese_attuale == 5) $MESE_ATT = "MAGGIO"; if ($mese_attuale == 6) $MESE_ATT = "GIUGNO"; if ($mese_attuale == 7) $MESE_ATT = "LUGLIO"; if ($mese_attuale == 8) $MESE_ATT = "AGOSTO"; if ($mese_attuale == 9) $MESE_ATT = "SETTEMBRE"; if ($mese_attuale == 10) $MESE_ATT = "OTTOBRE"; if ($mese_attuale == 11) $MESE_ATT = "NOVEMBRE"; if ($mese_attuale == 12) $MESE_ATT = "DICEMBRE"; if ($pag == "tabella.php" or $pag == "tabella2.php" or $pag == "tabella3.php" or $pag == "visualizza_tabelle.php" or $pag == "storia_soldi.php") $mostra_X = "SI"; echo "<table style=\"text-align: center; background: $t1color url(./themes/snj/img/bar_bg_top.png) repeat-x left top;\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr style=\"background: url(./themes/snj/img/bar_bg_bot.png) repeat-x left bottom;\">"; if ($mostra_X == "SI") echo "<td style=\"width: 10px;\"></td>"; if ($idprenota_origine) $anno = $anno + 1; echo "<td style=\"height: 18px; color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;\"> <a style=\"color: #666666;\" href=\"./inizio.php?id_sessione=$id_sessione&anno=$anno\"><b>".mex("MENU","head.php")."</b></a>"; if ($priv_ins_nuove_prenota == "s" or $priv_ins_spese == "s" or $priv_ins_entrate == "s" or $inserimento_nuovi_clienti != "NO" or ($modifica_clienti != "NO" and $vedi_clienti != "NO")) { echo " | <b>".mex("INSERIRE","head.php").":</b>"; if ($priv_ins_nuove_prenota == "s") echo " <a style=\"color: #666666;\" href=\"./prenota.php?id_sessione=$id_sessione&anno=$anno\"><b>".mex("PRENOTAZIONE","head.php")."</b></a>"; if ($inserimento_nuovi_clienti != "NO" or ($modifica_clienti != "NO" and $vedi_clienti != "NO")) echo " <a style=\"color: #666666;\" href=\"./clienti.php?id_sessione=$id_sessione&anno=$anno\"><b>".mex("CLIENTE","head.php")."</b></a>"; if ($priv_ins_spese == "s" or $priv_ins_entrate == "s") echo " <a style=\"color: #666666;\" href=\"./costi.php?id_sessione=$id_sessione&anno=$anno\"><b>".mex("SPESE","head.php")."</b></a>"; } # fine if ($priv_ins_nuove_prenota == "s" or... if ($priv_vedi_tab_mesi != "n" or $priv_vedi_tab_prenotazioni != "n" or $vedi_clienti != "NO" or $priv_vedi_tab_costi != "n" or $priv_vedi_tab_periodi != "n" or $priv_vedi_tab_appartamenti != "n") { echo " | <b>".mex("TABELLE","head.php").":</b>"; if ($priv_vedi_tab_mesi != "n") echo " <a style=\"color: #666666;\" href=\"./tabella.php?id_sessione=$id_sessione&anno=$anno&mese=$mese_attuale\"><b>".mex("$MESE_ATT","head.php")."</b></a>"; if ($priv_vedi_tab_prenotazioni != "n") echo " <a style=\"color: #666666;\" href=\"./visualizza_tabelle.php?id_sessione=$id_sessione&anno=$anno&tipo_tabella=prenotazioni\"><b>".mex("PRENOTAZIONI","head.php")."</b></a>"; if ($vedi_clienti != "NO") echo " <a style=\"color: #666666;\" href=\"./visualizza_tabelle.php?id_sessione=$id_sessione&anno=$anno&tipo_tabella=clienti\"><b>".mex("CLIENTI","head.php")."</b></a>"; if ($priv_vedi_tab_costi != "n") echo " <a style=\"color: #666666;\" href=\"./visualizza_tabelle.php?id_sessione=$id_sessione&anno=$anno&tipo_tabella=costi\"><b>".mex("SPESE","head.php")."</b></a>"; if ($priv_vedi_tab_periodi != "n") echo " <a style=\"color: #666666;\" href=\"./visualizza_tabelle.php?id_sessione=$id_sessione&anno=$anno&tipo_tabella=periodi\"><b>".mex("TARIFFE","head.php")."</b></a>"; if ($priv_vedi_tab_appartamenti != "n") echo " <a style=\"color: #666666;\" href=\"./visualizza_tabelle.php?id_sessione=$id_sessione&anno=$anno&tipo_tabella=appartamenti\"><b>".mex("APPART.","head.php")."</b></a>"; } # fine if ($priv_vedi_tab_mesi != "n" or $priv_vedi_tab_prenotazioni != "n" or... echo "</td>"; if ($idprenota_origine) $anno = $anno - 1; if ($mostra_X == "SI") { if (@is_array($_POST)) reset($_POST); for($num1 = 0 ; $num1 < count($_POST); $num1++) { $lista_var_X .= "&".key($_POST)."=".$_POST[key($_POST)]; next($_POST); } # fine for $num1 if (@is_array($_GET)) reset($_GET); for($num1 = 0 ; $num1 < count($_GET); $num1++) { $lista_var_X .= "&".key($_GET)."=".$_GET[key($_GET)]; next($_GET); } # fine for $num1 if ($lista_var_X) { $lista_var_X = "?show_bar=NO".$lista_var_X; echo "<td style=\"width: 10px; color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small;\"> <b><a style=\"color: #666666;\" href=\"$pag$lista_var_X\">X</a></b></td>"; } # fine if ($lista_var_X) else echo "<td style=\"width: 10px;\"></td>"; } # fine if ($mostra_X == "SI") echo "</tr> </table> "; if ($pag != "inizio.php") echo "<div style=\"height: 7px;\"></div> "; } # fine if ($anno_utente_attivato == "SI") } # fine if ($show_bar != "NO") if ($pag != "visualizza_contratto.php") echo "<table style=\"height: 100%;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"> <tr><td style=\"width: 5px;\"></td><td valign=\"top\"> "; ?> |