*****************************


*** START PAGEDIN ***

*****************************

'; // ^^^^^^^^^^^^^^^^^^^^^^^^ $page_cod = ''; $page_mod = 'open'; $ar_var = array(); // per prima cosa tento metodo POST su COD $tipin = 'nn'; if (isset($_POST['page_cod'])) { $tipin = 'POST'; $page_cod = $_POST['page_cod']; } else if (isset($_GET['page_cod'])){ $tipin = 'GET'; $page_cod = $_GET['page_cod']; } // ^^^^^^^^^^^^^^^^^^^^^^^^^ // gestione eventuaale cambio di sito if ($fl_init === true) { // cambiamento di sito => necessario eseguire nuovo init $web = $_SESSION['web']; //$init_url = $_SESSION[$web]['init_url']; $init_url = '../init.php'; $html_body = ''; $html_favicon = ''; $html_head = ''; $html_gdpr = ''; } else { // ************************* // NO cambiamento => procedi // ************************* if ($fl_debug) echo '
NO cambiamento => procedi'; // carico $ar_var switch ($tipin) { case 'POST': $ar_var = $_POST; break; case 'GET': $ar_var = $_GET; break; } include ('../struttura/sp.php'); include ('../struttura/misw_css.php'); include ('../struttura/chkmobile.php'); include ('../struttura/caani.php'); include ('../struttura/finplug.php'); include ($spX); if ($fl_debug) echo '

terminato core include

'; // detrmino useragent $fl_caani = caani(); // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if ($fl_debug) echo '

*****************************
init gestione multiweb
'; // modifica 2020-08-06 per uso di miSW6 con più web contemporaneamente // leggo il nome del web dalla chiamata ricevuta e forzo la variabile di sistema // che potrebbe essere stata alterata da un altro sito poi eseguo regolarmente // il codice fino alla costruzione della chiamata alla pagina seguente, // dove devo indicare il nome del web in modo da permettere allo script // di rimandare a pagedin con un urlo che possa preparare la successiva chiamata confermando il web // // se non trovo il nome del web in $ar_var continuo ad usare il default già caricato // all'inizio di pagedin.php // // non mi limito a operare su $web perché $_SESSION['web'] viene chiamata da molti script // per caricare variabili quali la lingua, il livello di debug, ecc. if (isset($ar_var['web'])) { $web = filter_var($ar_var['web']); if (($web !== false) && ($web != '')) { $_SESSION['web'] = $web; } } $web = $_SESSION['web']; if ($fl_debug) echo '
init gestione multiweb completato
*****************************

'; // filtro codice pagina $page_cod = filter_var($page_cod); if ($fl_debug) echo '
sottopongo a filtro per sicurezza page_cod:
page_cod = '.$page_cod.'
con tipin = '.$tipin; if (('' == $page_cod) || ($page_cod === false)) { // mando a home page $tipin = 'nn'; $page_cod = 'home'; if ($fl_debug) echo '
$page_cod non ha superato il filtro: vai a home
durante debug il programma viene arrestato qui'; if ($fl_debug) exit; $html_favicon = ''; $html_head = ''; $html_body = ''; } else { // filtro superato => procedo if ($fl_debug) echo '
script_inc e page_cod hanno superato il filtro
'; $ar_utente = array(); if (isset($_SESSION[$web]['ar_ra'])) { $ar_ra = $_SESSION[$web]['ar_ra']; if (isset($ar_ra['ar_utente'])) $ar_utente = $ar_ra['ar_utente']; } else { $ar_utente['lin'] = false; $ar_utente['level'] = 0; $ar_utente['super'] = 'nn'; $ar_ra['ar_utente'] = $ar_utente; $_SESSION[$web]['ar_ra'] = $ar_ra; } if ($fl_debug) { echo '
$ar_utente: '; print_r($ar_utente); echo '
';} // ***************************************************** if (isset($ar_var['page_cod'])) $ar_var['page_cod'] = filter_var($ar_var['page_cod']); if (isset($ar_var['page_mod'])) $ar_var['page_mod'] = filter_var($ar_var['page_mod']); // ***************************************************** if ($fl_debug) { echo '
ar_var:'; print_r($ar_var); echo '
'; } // ***************************************************** // individuo core oppure plugin: // $ar_grp[0] è il gruppo di apartenenza, // $ar_grp[1] è il nome della tabella page del gruppo, // ***************************************************** if ($fl_debug) echo '

*****************************
chiamo finplug'; $ar_grp = finplug($page_cod); $tab_page = $ar_grp[1]; if ($fl_debug) echo '
i parametri della pagina '.$page_cod.' si trovano nella tabella '.$tab_page.'
*****************************
'; // ***************************************************** // individuo script_inc, codice pagina e modalità: // script_inc: script // page_cod: cod / ad_cod // page_mod: apri la pagina / amministra la pagina // ***************************************************** // aggiorno parametri if (isset($ar_var['page_mod'])) $page_mod = $ar_var['page_mod']; if ($fl_debug) echo '
tipo input dati ($tipin) ='.$tipin.'
plugin ($ar_grp[0]) ='.$ar_grp[0].'
codice pagina ($page_cod) ='.$page_cod.'
modalità ($page_mod) ='.$page_mod.'
*****************************

'; // aggiorno "caption" e "raw_code" con codici pagina // (questo servirà a gestire i menu smart e principale $_SESSION[$web]['cap'] = $page_cod; $_SESSION[$web]['raw_code'] = $page_cod; // ***************************************************** // connessione a database $cn_nme = mysqli_connect($db_hst,$usn,$pwd,$db_nme) or die ("Errore PAGEDIN.01".$usn.$pwd.$db_nme); // ******************************************* if ($fl_debug) echo '


aperto connessione a dB '.$db_nme.' con usn='.$usn; // ******************************************* // aggiorno numero pagine del sito visitate if ($fl_debug) echo '

*****************************

aggiorno numero pagine del sito visitate
'; $chiave = 0; $oggi = date('Y-m-d'); $anonimi = 0; $utenti = 0; $qr_sel = 'SELECT * FROM visite WHERE data = "'.$oggi.'" LIMIT 1'; if ($fl_debug) echo '
'.$qr_sel; $qr_ars = mysqli_query($cn_nme,$qr_sel) or die ('Errore PAGEDIN.01bis'); $qr_vtr = mysqli_fetch_array($qr_ars); if (isset($qr_vtr['chiave'])) $chiave = $qr_vtr['chiave']; if (isset($qr_vtr['anonimi'])) $anonimi = $qr_vtr['anonimi']; if (isset($qr_vtr['utenti'])) $utenti = $qr_vtr['utenti']; if ($ar_utente['lin'] !== false) { $utenti++; } else { $anonimi++; } if ($chiave > 0) { $qr_rep = 'UPDATE visite SET anonimi = '.$anonimi.', utenti = '.$utenti.' WHERE chiave = '.$chiave.' LIMIT 1'; } else { $qr_rep = 'INSERT INTO visite SET data = "'.$oggi.'", anonimi = '.$anonimi.', utenti = '.$utenti; } if ($fl_debug) echo '
'.$qr_rep; $qr_rsl = mysqli_query($cn_nme,$qr_rep) or die ('Errore PAGEDIN.01ter'.$qr_rep); if ($fl_debug) echo '
completato aggiornamento visite

*****************************

'; // ricavo elementi per costruzione contenitore $ar_layout = array(); // core layout $qr_sel = 'SELECT codice, valore FROM layoutcore'; if ($fl_debug) echo '
'.$qr_sel; $qr_ars = mysqli_query($cn_nme,$qr_sel) or die ('Errore PAGEDIN.02'); while ($qr_vtr = mysqli_fetch_array($qr_ars)) { $lay_cod = $qr_vtr['codice']; $ar_layout[$lay_cod] = ''; if($qr_vtr['valore'] != '') $ar_layout[$lay_cod] = $qr_vtr['valore']; } // user layout $qr_sel = 'SELECT codice, valore FROM '.$tab_layo; if ($fl_debug) echo '
'.$qr_sel; $qr_ars = mysqli_query($cn_nme,$qr_sel) or die ('Errore PAGEDIN.02bis'); while ($qr_vtr = mysqli_fetch_array($qr_ars)) { $lay_cod = $qr_vtr['codice']; $ar_layout[$lay_cod] = ''; if($qr_vtr['valore'] != '') $ar_layout[$lay_cod] = $qr_vtr['valore']; } // ******************************************* // ricavo plugin attivi $ar_plugin = array(); if ($ar_layout['plugin'] != '') { $ar_plugin = explode('|',$ar_layout['plugin']); } $_SESSION[$web]['ar_plugin'] = $ar_plugin; // ******************************************* // ricavo init url per eventuale cambio di sito $init_url = $ar_layout['init_url']; $_SESSION[$web]['init_url'] = $init_url; // ******************************************* // ricavo elementi per definire sensibilità a dispositivo $_SESSION[$web]['mob'] = '0'; // modalità convenzionale if ('1' == $ar_layout['mobile']) { // il cambio modalità è permesso if ($fl_debug) echo '
verifico se attivare mobile'; // verifico se devo attivare mobile (per attivare uso $_SESSION[$web][mob]) $_SESSION[$web]['mob'] = chkmobile(); if ($fl_debug) echo ': mobile ='.$_SESSION[$web]['mob']; } //$_SESSION[$web]['mob'] = '1'; // ******************************************* // ricavo elementi per gestione credenziali e privilegi VFM $fl_spotrecov = $ar_layout['spot_recovery']; // se 1 permette il recupero delle credenziali via email $_SESSION[$web]['fl_spotrecov'] = $fl_spotrecov; $VFM_fl_ad = $ar_layout['VFM_fl_ad']; $_SESSION[$web]['VFM_fl_ad'] = $VFM_fl_ad; // se true permette a superutenti la gestione VFM anche in modo navigazione // ******************************************* // ricavo elementi per definizione contenitore $box_width = $ar_layout['box_width']; $_SESSION[$web]['box'] = $box_width; // serve per dimensionare immagini da inserire nelle colonne //$box_color = $ar_layout['boxgnd_color']; $frame_sx_width = $ar_layout['frame_sx_width']; $frame_dx_width = $ar_layout['frame_dx_width']; $frame_width = $box_width + $frame_sx_width + $frame_dx_width; if ($fl_debug) echo '
caricato layout contenitore:
box='.$box_width.'
frame_sx='.$frame_sx_width.'
frame_dx='.$frame_dx_width; // ******************************************* // ricavo elementi per decor login $fl_decor = false; if ($ar_layout['log_decor'] >= 1) $fl_decor = true; $_SESSION[$web]['decor'] = $fl_decor; // ******************************************* // ricavo elementi per slider (pausa in secondi) $pause = 2; if (isset($ar_layout['slider_pause'])) $pause = $ar_layout['slider_pause']; if ($pause < 1) $pause = 1; $_SESSION[$web]['slider_pause'] = $pause; // ******************************************* // ricavo elementi per definizione carattere base testo $ar_txt = array(); $ar_txt['font'] = $ar_layout['txt_font']; $ar_txt['size'] = $ar_layout['txt_size']; $ar_txt['color'] = $ar_layout['txt_color']; // ricavo elementi per definizione colore custom carattere del testo $ar_txt['customcolor'] = $ar_layout['txt_customcolor']; if ($fl_debug) { echo '

ar_txt='; print_r($ar_txt); } // ******************************************* // ricavo elementi per costruzione header, menu, barra colorata e footer // NOTA: language contiene i codice DI TUTTE le lingue opzionabili // NOTA: page_mod serve durante il cambio di lingua per non perdere modalità admin $ar_head = array(); $ar_head['icon_img'] = $ar_layout['favicon_img']; $ar_head['bgnd_img'] = $ar_layout['header_img']; $ar_head['bgnd_col'] = $ar_layout['header_col']; $ar_head['logo_mode'] = $ar_layout['logo_mode']; $ar_head['logo_img'] = $ar_layout['logo_img']; //$ar_head['logo_height'] = $qr_vtr['logo_height']; $ar_head['logo_url'] = $ar_layout['logo_link']; $ar_head['language'] = $ar_layout['language']; $ar_head['mnu_smt'] = $ar_layout['menu_smart']; $ar_head['mnu_opt'] = $ar_layout['release']; $ar_head['tab_title'] = $ar_layout['tab_title']; $ar_head['page_mod'] = $page_mod; if ($fl_debug) { echo '

ar_head='; print_r($ar_head); } $ar_menu = array(); $ar_menu['row_px'] = $box_width; $ar_menu['bgnd_col'] = $ar_layout['header_col']; $ar_menu['position'] = $ar_layout['menu_pos']; $ar_menu['knapp_width'] = $ar_layout['knapp_width']; $ar_menu['knapp_height'] = $ar_layout['knapp_height']; $ar_menu['knapp_clear'] = $ar_layout['knapp_clear']; $ar_menu['knapp_off'] = $ar_layout['knapp_off']; $ar_menu['knapp_over'] = ''; // $ar_layout['knapp_over']; $ar_menu['knapp_on'] = $ar_layout['knapp_on']; $ar_menu['txt_size'] = $ar_layout['knapp_text_size']; $ar_menu['txt_off'] = $ar_layout['knapp_text_off']; $ar_menu['txt_over'] = $ar_layout['knapp_text_over']; $ar_menu['txt_on'] = $ar_layout['knapp_text_on']; $ar_menu['txt_align'] = $ar_layout['knapp_text_align']; $ar_menu['ar_plugin'] = $ar_plugin; if ($fl_debug) { echo '

ar_menu='; print_r($ar_menu); } $ar_bar = array(); $ar_bar['color'] = $ar_layout['bar_color']; $ar_bar['text'] = $ar_layout['bar_text']; $ar_bar['date_format'] = $ar_layout['date_format']; $ar_bar['spot_color'] = $ar_layout['spot_color']; if ($fl_debug) { echo '

ar_bar='; print_r($ar_bar); } $ar_foot = array(); $ar_foot['misw_home'] = $ar_layout['misw_home']; $ar_foot['copy_owner'] = $ar_layout['copyright_owner']; $ar_foot['copy_init'] = $ar_layout['copyright_init']; $ar_foot['webmaster'] = $ar_layout['webmaster']; $ar_foot['webmaster_email'] = $ar_layout['webmaster_email']; if ($fl_debug) { echo '

ar_foot='; print_r($ar_foot); } if ($fl_debug) echo '

caricato elementi contenitore

*****************************


'; // ******************************************* // carico elementi background da tabella background $ar_back = array(); $backstyle = $ar_layout['background']; $qr_sel = 'SELECT * FROM '.$tab_bgnd.' WHERE chiave > 10 AND style LIKE "'.$backstyle.'" LIMIT 1'; if ($fl_debug) echo '
'.$qr_sel; $qr_ars = mysqli_query($cn_nme,$qr_sel) or die ('Errore PAGEDIN.03'); $qr_vtr = mysqli_fetch_array($qr_ars); // NOTA: NON modificare gli indici di $ar_bak che è input per misw_css() $ar_back['fl_back'] = '0'; $ar_back['back_serif'] = '0'; $ar_back['back_color'] = '#ffffff'; $ar_back['back_image'] = ''; $ar_back['padding'] = 0; $fl_back = '0'; $fl_serif = '0'; $fore_col = ''; if (isset($qr_vtr['chiave'])) { // trovato backstyle => aggiorno $ar_back $fl_back = $qr_vtr['fl_back']; $fl_serif = $qr_vtr['fl_serif']; if (isset($qr_vtr['back_color'])) { if($qr_vtr['back_color'] != '') { $fore_col = strtolower($qr_vtr['back_color']); } } } if ($fl_debug) echo '

$fl_back='.$fl_back.'
$fl_serif='.$fl_serif; // cornice pagina - nell'ordine: // dominante immagine ($fl_back = 1) // poi colore da backstyle ($fore_col) // poi colore pastello da layout ($ar_layout[backgnd_col]) // default colore pastello bianco if ('1' == $fl_back) { // immagine $ar_back['fl_back'] = '1'; $ar_back['back_image'] = '../struttura/image/background/'.$qr_vtr['back_image'].'.png'; $ar_back['padding'] = $qr_vtr['padding']; } else if ($fore_col != '') { // colore pastello da backstyle $ar_back['back_color'] = $fore_col; $ar_back['padding'] = $qr_vtr['padding']; } else if ($ar_layout['backgnd_col'] != '') { // colore pastello da layout $ar_back['back_color'] = strtolower($ar_layout['backgnd_col']); if ($ar_back['back_color'] != '#ffffff') $ar_back['padding'] = 13; } else { // default: colore pastello bianco $ar_back['back_color'] = '#ffffff'; // dummy $ar_back['padding'] = 0; // dummy } // serif - sans serif $ar_frame = array(); $ar_campiframe = array('top_sx', 'top', 'top_dx', 'edge_sx', 'edge_dx', 'bot_sx', 'bottom', 'bot_dx'); if ('1' == $fl_serif) { // serif $ar_back['back_serif'] = '1'; // frame serif foreach($ar_campiframe as $campo) { $ar_frame[$campo] = ''; if (isset($qr_vtr[$campo])) $ar_frame[$campo] = '../struttura/image/frame/'.$qr_vtr[$campo].'.png'; } // NOTA: la immagine bottom per serif ha colore bianco interno => copyright viene forzato a uguale colore $copyright_col = '#ffffff'; } else { // sans serif $ar_back['back_serif'] = '0'; // dummy // frame sans serif foreach($ar_campiframe as $campo) { $ar_frame[$campo] = ''; } $copyright_col = '#ffffff'; if (isset($ar_layout['boxgnd_col'])) { if ($ar_layout['boxgnd_col'] != '') $copyright_col = $ar_layout['boxgnd_col']; } } if ($fl_debug) { echo '

ar_frame='; print_r($ar_frame); } if ($fl_debug) echo '

caricato elementi background

*****************************


'; // ******************************************* // leggo parametri pagina da tabella $page_cod $qr_sel = 'SELECT * FROM '.$tab_page.' WHERE chiave > 10 AND page_cod LIKE "'.$page_cod.'" LIMIT 1'; if ($fl_debug) echo '
'.$qr_sel; $qr_ars = mysqli_query($cn_nme,$qr_sel) or die ('Errore PAGEDIN.04'); $qr_vtr = mysqli_fetch_array($qr_ars); // SCRIPT CREATORE // ricavo nome script creatore da includere per preparazione body if ('admin' == $page_mod) { $script_inc = $qr_vtr['ad_script']; $ad_extra = $qr_vtr['ad_extra']; } else { $script_inc = $qr_vtr['script']; $ad_extra = ''; } if ($fl_debug) echo '
caricato nome script master da includere: '.$script_inc; // ******************************************* // SCRIPT OPERAIO, CSS CUSTOM, PLUGIN // ricavo nome script operaio da includere per preparazione body // ed eventuale CSS specifico della pagina (viene usato SOLO in modalità "open") // leggo anche Plugin per individuare quale rosetta.php caricare (vedi più avanti in questo script) if ('admin' == $page_mod) { $script_roby = $qr_vtr['ad_roby']; $page_css = ''; } else { $script_roby = $qr_vtr['roby']; $page_css = trim($qr_vtr['page_css']); } if (isset($qr_vtr['plugin'])) { $page_plugin = trim($qr_vtr['plugin']); } else { $page_plugin = ''; } if ($fl_debug) echo '
caricato nome script operaio da includere: '.$script_roby; if ($fl_debug) echo '
caricato eventuale nome css custom da includere: '.$page_css; if ($fl_debug) echo '
caricato eventuale nome plugin di appartenenza della pagina: '.$page_plugin.'

'; // ******************************************* mysqli_close($cn_nme); // preset lingua // NOTA: language contiene i codice DI TUTTE le lingue opzionabili $_SESSION[$web]['language'] = $ar_head['language']; $lan_def = substr($ar_head['language'],0,2); $_SESSION[$web]['lan_def'] = $lan_def; if ((!isset($_SESSION[$web]['lan'])) || ('' == $_SESSION[$web]['lan'])) { $_SESSION[$web]['lan'] = $lan_def; } if ((!isset($_SESSION[$web]['lan_adm'])) || ('' == $_SESSION[$web]['lan_adm'])) { $_SESSION[$web]['lan_adm'] = $lan_def; } if ($fl_debug) echo '
lingua selezionata '.$_SESSION[$web]['lan']. '
lingua default '.$_SESSION[$web]['lan_def']. '
lingua admin '.$_SESSION[$web]['lan_adm']; // formato data_en // mdy : nome_giorno - nome_mese, numero_giorno anno // dmy : nome_giorno - numero_giorno nome_mese anno) $_SESSION[$web]['date_format'] = $ar_bar['date_format']; // colore per barre colorate di separazione $ar_var['barcolor'] = $ar_bar['color']; // determino dove posizionare il menu principale if (isset($ar_menu['position'])) { $menupos = $ar_menu['position']; } else { $menupos = 'top'; } // aggiungo info su tabella // censuro menu durante amministrazione del sito if ('admin' == $page_mod) $menupos = 'admin'; // salvo posizione menu (serve per cambiare dimensione dei text box e text area in funzione del tipo di menu) $_SESSION[$web]['menupos'] = $menupos; // eventuali extra per editing ad uso admin if ($ad_extra != '') { $ar_extra = explode('|',$ad_extra); foreach ($ar_extra as $extra) { $ar_ex = explode('=',$extra); $ar_var[$ar_ex[0]] = $ar_ex[1]; } } // ****************** // inclusione rosetta // ****************** if ('admin' == $page_mod) { // in amministrazione: ad_roby_base richiede rosetta base pertanto includo indipendentemente da plug-in if ($fl_debug) echo '
include '.$sp1.'rosetta.php'; include ($sp1.'rosetta.php'); // la pagina è di un plugin allora AGGIUNGO rosetta specifico del plugin if ($page_plugin != '') { if ($fl_debug) echo '
include '.$sp0.$page_plugin.'/'.$page_plugin.'_rosetta.php'; include ($sp0.$page_plugin.'/'.$page_plugin.'_rosetta.php'); } } else { // in navigazione: if ($page_plugin != '') { // la pagina è di un plugin allora includo rosetta specifico del plugin if ($fl_debug) echo '
include '.$sp0.$page_plugin.'/'.$page_plugin.'_rosetta.php'; include ($sp0.$page_plugin.'/'.$page_plugin.'_rosetta.php'); // includo anche rosetta base //if ($fl_debug) echo '
include_once '.$sp1.'rosetta.php'; //include_once ($sp1.'rosetta.php'); } else { // includo rosetta base if ($fl_debug) echo '
include '.$sp1.'rosetta.php'; include ($sp1.'rosetta.php'); } } if ($fl_debug) echo '

caricato elementi statici pagina

*****************************


'; // *********************************** // preparo inclusione script operativi // *********************************** switch ($script_inc) { case 'papiro.php': case 'lapis.php': case 'velina.php': case 'pwd_lost.php': case 'pwd_find.php': $script_include = $sp1.$script_inc; break; case 'login.php': $script_include = $sp1.$script_inc; // nel caso di login aggiungo webmaster ad $ar_var $ar_var['webmaster'] = $ar_foot['webmaster']; break; default: $script_include = $script_inc; break; } if ($fl_debug) echo '
localizzato script master da includere '.$script_include; // ************************************** // preparo codice HTML per head e body if ($fl_debug) echo '


*** INCLUSIONE MASTER SCRIPT '.strtoupper($script_include).' ***'; include ($script_include); // ************************************* // modifica 2020-08-22 - versione mobile // roby_m richiede in input anche la array $ar_menu e le variabili $ar_head['mnu_smt'] e $ar_head['language'] // mentre papiro passa solamente $ar_var // risolvo aggiungendo $ar_menu e $ar_head['mnu_smt'] come ulteriori elemento di $ar_var //if ($fl_debug) echo '
script_roby='.$script_roby; if ('roby_m' == $script_roby) { $ar_var['ar_menu'] = $ar_menu; $ar_var['mnu_smt'] = $ar_head['mnu_smt']; $ar_var['language'] = $ar_head['language']; } // ************************************* // modifica 2022-09-17 - padding // se si usa una cornice della pagina con colore diverso da bianco // bisogna impostare padding per le due colonne esterne // papiro riceve questa info tramite $ar_var['pad'] // $ar_var[pad] = padding in px; 0 => no padding $ar_var['padding'] = 0; if (isset($ar_back['padding'])) $ar_var['padding'] = $ar_back['padding']; // ************************************* if ($fl_debug) echo '
LANCIO MASTER SCRIPT PER GENERARE HTML_CORE

*****************************



'; $html_core = master($ar_var); if ($fl_debug) echo '


*** COMPLETATA ESECUZIONE MASTER SCRIPT '.strtoupper($script_include).' ***

*****************************

è stato generato il core del codice html
comincia la costruzione della pagina html


*****************************

'; // ************************************** // preparo nome etichetta scheda del browser if ($fl_debug) echo '
ar_head[tab_title]='.$ar_head['tab_title']; if ('!' == substr($ar_head['tab_title'],0,1)) { // se primo carattere è ! il nome è bloccato $head_title = substr($ar_head['tab_title'],1); } else if ($html_core[0] != '') { // se core ha un nome proprio lo aggiungo a prefix $head_title = $ar_head['tab_title'].' - '.$html_core[0]; } else { // metto solo prefix $head_title = $ar_head['tab_title']; } // preparo chiamata per eventuale logout $url_logout = 'pagedin.php?page_cod=logout&web='.$web; // preparo favicon $html_favicon = ''; $favicon = '../struttura/image/logo/'.$ar_head['icon_img']; $fav_ext = substr($favicon,-3); switch ($fav_ext) { case 'ico': case 'ICO': $html_favicon = ''; break; case 'png': case 'PNG': $html_favicon = ''; break; } // cap è "caption", voce del menu principale attiva // evidenzia la linguetta del menu attiva) if (isset($_SESSION[$web]['cap'])) { $cap = $_SESSION[$web]['cap']; } else { $cap = ''; } if ($fl_debug) echo '
caption='.$cap; if ($fl_debug) echo '
include '.$sp1.' /head, /menutop, /menuside, /blubar, /nastro'; include ($sp1.'head.php'); include ($sp1.'menutop.php'); include ($sp1.'menuside.php'); include ($sp1.'blubar.php'); include ($sp1.'nastro.php'); if ($fl_debug) echo '
include copyright.php'; include ('copyright.php'); if ($fl_debug) echo '
include '.$sp5.' /atom_feedback'; include ($sp5.'atom_feedback.php'); // ************************ // Costruzione codice HTML5 // ************************ // *** CSS *** $html_css = misw_css($ar_txt, $ar_bar, $ar_back, $frame_width, $page_css); //$_SESSION[$web]['mob'] = '1'; if ($_SESSION[$web]['mob'] != '1') { // ***************************** // LAYOUT CONVENZIONALE // ***************************** if ($fl_debug) echo '

**************
layout desktop
**************

'; $viewport = ''; // nella versione mobile serve per costruire meta tag in html head // *** HEAD *** // sfondo $html_head = ''; $html_head .= $html_css; $html_head .= ''.$head_title.''.PHP_EOL; $html_head .= $html_core[1]; // *** BODY *** $html_body = ''; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; if ('1' == $ar_back['back_serif']) { $html_body .= ''; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; } $html_body .= ''.PHP_EOL; //if ('1' == $ar_back['fl_back']) { if (('0' == $ar_back['fl_back']) && ($ar_frame['edge_sx'] != '')) { $html_body .= ''.PHP_EOL; } else { $html_body .= ''.PHP_EOL; } $html_body .= ''.PHP_EOL; // if ('1' == $ar_back['fl_back']) { if (('0' == $ar_back['fl_back']) && ($ar_frame['edge_dx'] != '')) { $html_body .= ''.PHP_EOL; } else { $html_body .= ''.PHP_EOL; } $html_body .= ''.PHP_EOL; if ('1' == $ar_back['back_serif']) { if ($fl_debug) echo '

**************
background serif
**************

'; $html_body .= ''; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; } $html_body .= '
   
  '.PHP_EOL; // menu principale switch ($menupos) { case 'admin': if ($fl_debug) echo '

**************
menu admin
**************

'; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= '
'.PHP_EOL; // testa e menu rapido $html_body .= head($ar_head); // NO menu principale //$html_body .= topmenu($ar_menu,$cap); // barra colorata $blu = ''; if (isset($_SESSION[$web]['blu'])) $blu = $_SESSION[$web]['blu']; if ('1' == $_SESSION[$web]['super']) $blu .= ' (web-admin)'; $html_body .= blubar($ar_bar, $blu); // feedback ultima operazione $html_body .= feedback($web,$_SESSION[$web]['lan']); // NO nastro scorrevole //$html_body .= nastro($page_cod,$ar_bar['color']); $html_body .= '
'.PHP_EOL; // ************************* // CONTENITORE // (default 938px) $html_body .= $html_core[2]; // ******************** $html_body .= '
'.PHP_EOL; // copyright $html_body .= copyright($ar_foot,$copyright_col); $html_body .= '
'.PHP_EOL; break; // *************** // top menu // *************** case 'top': if ($fl_debug) echo '

**************
menu top
**************

'; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= '
'.PHP_EOL; // testa e menu rapido $html_body .= head($ar_head); // menu principale TOP $html_body .= menutop($ar_menu,$cap); // barra colorata $blu = ''; if (isset($_SESSION[$web]['blu'])) $blu = $_SESSION[$web]['blu']; if (isset($_SESSION[$web]['super'])) { if ('1' == $_SESSION[$web]['super']) $blu .= ' (web-admin)'; } $html_body .= blubar($ar_bar, $blu); // feedback ultima operazione $html_body .= feedback($web,$_SESSION[$web]['lan']); // nastro scorrevole $boxgnd_col = '#ffffff'; if (isset($ar_layout['boxgnd_col'])) { if ($ar_layout['boxgnd_col'] != '') $boxgnd_col = strtolower($ar_layout['boxgnd_col']); } $html_body .= nastro($page_cod,$ar_bar['color'],$boxgnd_col); $html_body .= '
'.PHP_EOL; // ************************* // CONTENITORE // (default 938px) //$html_body .= feedback($web, $_SESSION[$web]['lan']); $html_body .= $html_core[2]; // ******************** $html_body .= '
'.PHP_EOL; // copyright $html_body .= copyright($ar_foot,$copyright_col); $html_body .= '
'.PHP_EOL; break; case 'side': // *************** // side menu // *************** if ($fl_debug) echo '

**************
menu side
**************

'; // dimensione colonna menu $larghezza = $ar_menu['knapp_width'] + $ar_menu['knapp_clear']; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; // inserisco eventuale padding-left con valore da $ar_back['padding'] $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= '
'.PHP_EOL; // testa e menu rapido $html_body .= head($ar_head); // barra colorata $blu = ''; if (isset($_SESSION[$web]['blu'])) $blu = $_SESSION[$web]['blu']; if ('1' == $_SESSION[$web]['super']) $blu .= ' (web-admin)'; $html_body .= blubar($ar_bar, $blu); // feedback ultima operazione $html_body .= feedback($web,$_SESSION[$web]['lan']); // nastro scorrevole $boxgnd_col = '#ffffff'; if (isset($ar_layout['boxgnd_col'])) { if ($ar_layout['boxgnd_col'] != '') $boxgnd_col = strtolower($ar_layout['boxgnd_col']); } $html_body .= nastro($page_cod,$ar_bar['color'],$boxgnd_col); $html_body .= '
'.PHP_EOL; // menu principale SIDE $html_body .= menuside($ar_menu,$cap); $html_body .= ''.PHP_EOL; // ************************* // CONTENITORE // (default 938px - $larghezza) //$html_body .= feedback($web, $_SESSION[$web]['lan']); $html_body .= $html_core[2]; // ******************** $html_body .= '
'.PHP_EOL; // copyright $html_body .= copyright($ar_foot,$copyright_col); $html_body .= '
'.PHP_EOL; break; } $html_body .= '
G 
   
'.PHP_EOL; // clear array feedeback $_SESSION[$web]['ar_feedback'] = array(); // ***************************** // FINE LAYOUT CONVENZIONALE // ***************************** } else { // ***************************** // LAYOUT MOBILE // ***************************** // NOTA: in questo layout il menu si riduce ad una sola ancora ("menu") // che, generata dalla funzione "head()", viene mostrata in alto a destra. // Un clic su tale ancora chiama una pagina speciale (page_cod= menumob), // dedicata al menu, in cui vengono riportate: // * le bandierine per il cambio della lingua, // * i comandi A+, A= e A-, // * i link "login" e "logout" // * tutte le voci del menu tradizionale che aprono le pagine del sito. // ***************************** if ($fl_debug) echo '

**************
layout mobile
**************

'; $viewport = ''; // *** HEAD *** // sfondo $html_head = ''; $html_head .= $html_css; $html_head .= ''.$head_title.''.PHP_EOL; $html_head .= $html_core[1]; // *** BODY *** $html_body = ''; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; //$html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= ''.PHP_EOL; $html_body .= '
'.PHP_EOL; // testa con logo e comandi $html_body .= head($ar_head); // barra colorata $blu = ''; if (isset($_SESSION[$web]['blu'])) $blu = $_SESSION[$web]['blu']; if ('1' == $_SESSION[$web]['super']) $blu .= ' (web-admin)'; $html_body .= blubar($ar_bar, $blu); // feedback ultima operazione $html_body .= feedback($web,$_SESSION[$web]['lan']); // nastro scorrevole $boxgnd_col = '#ffffff'; if (isset($ar_layout['boxgnd_col'])) { if ($ar_layout['boxgnd_col'] != '') $boxgnd_col = strtolower($ar_layout['boxgnd_col']); } $html_body .= nastro($page_cod,$ar_bar['color'],$boxgnd_col); $html_body .= '
'.PHP_EOL; $html_body .= ''.PHP_EOL; // ************************* // CONTENITORE // (default 938px) //$html_body .= feedback($web, $_SESSION[$web]['lan']); $html_body .= $html_core[2]; // ******************** $html_body .= '
'.PHP_EOL; // copyright $html_body .= copyright($ar_foot,$copyright_col); $html_body .= '
'.PHP_EOL; // clear array feedeback $_SESSION[$web]['ar_feedback'] = array(); // ***************************** // FINE LAYOUT MOBILE // ***************************** } // fine if ($_SESSION[$web]['mob'] != '1') // ********************************* // *** censuro Internet Explorer *** // ********************************* if ('ie' == $_SESSION[$web]['browser']) { $html_body = '

'.PHP_EOL; if ('en' == $_SESSION[$web]['lan']) { $html_body .= 'YOUR BROWSER IS OUTDATED AND
NOT SUITABLE FOR THIS WEB SITE'.PHP_EOL; } else { $html_body .= 'QUESTO BROWSER E\' OBSOLETO
E NON ADATTO PER QUESTO SITO WEB'.PHP_EOL; } $html_body .= '

'.PHP_EOL; $html_body .= '
 
supported browsers'.PHP_EOL; $html_body .= '
'.PHP_EOL; } // ************ // GDPR bannner // ************ switch($_SESSION[$web]['lan']) { case 'en': $gdpr1 = 'AEIT websites place cookies on your device to give you the best user experience. By using AEIT websites, you agree to the placement of these cookies.'; $gdpr2 = 'Accept & Close'; $gdpr3 = 'To learn more, read AEIT Privacy Policy'; //$gdpr4 = 'https://www.aeit.it/aeit/documenti/struttura/Privacy_AEIT.pdf'; $gdpr4 = 'https://www.aeit.it/aeit/r02/struttura/pagedin.php?cod=privacy_01'; break; default: $gdpr1 = 'I siti AEIT salvano alcuni cookie nel tuo dispositivo per migliorare la navigazione. Usando un sito AEIT accetti il salvataggio di tali cookie.'; $gdpr2 = 'Accetta & Chiudi'; $gdpr3 = 'Per saperne di più: leggi la Privacy Policy AEIT'; //$gdpr4 = 'https://www.aeit.it/aeit/documenti/struttura/Privacy_AEIT.pdf'; $gdpr4 = 'https://www.aeit.it/aeit/r02/struttura/pagedin.php?cod=privacy_01'; break; } $html_gdpr = PHP_EOL; $html_gdpr .= ''.PHP_EOL; $html_gdpr .= ''.PHP_EOL; // ***************************************************************** if ($fl_debug) echo '

*****************************

TERMINATA LA COSTRUZIONE DELLA PAGINA HTML

*****************************
'; } // fine if ($page_cod === false) } // fine if ($fl_init === true) if ($fl_debug) echo '
*** COMPLETATO SCRIPT PHP DI PAGEDIN => INIZIA OUTPUT CODICE HTML ***

*****************************


'; //exit; ?>