//################## CONFIGURAZIONE AMMINISTAZIONE ################################
//controllo se ho un link di cambio sito e lo eseguo
include("_include/functions.inc.php");
//locale
setlocale(LC_ALL, '');
//UTENTI DI DEFAULT
$ADMIN_UTENTE[admin][utente_nome] = "Amministratore";
$ADMIN_UTENTE[admin][utente_pass] = "osmmc1003";
$ADMIN_UTENTE[admin][utente_gruppo] = "admin";
//utente locale di admin
if($DATI[dove_sono] == "loc") {
$ADMIN_UTENTE[tnx][utente_nome] = "TNX";
$ADMIN_UTENTE[tnx][utente_pass] = "tnx";
$ADMIN_UTENTE[tnx][utente_gruppo] = "admin";
$ADMIN_UTENTE[tnx][pagina_def] = "debug";
}
$ADMIN_UTENTE[html][utente_nome] = "Genera HTML di qualsiasi sito :-)";
$ADMIN_UTENTE[html][utente_pass] = "html07013010";
$ADMIN_UTENTE[html][utente_gruppo] = "admin";
$ADMIN_UTENTE[html][template] = "tpl_vuoto";
$ADMIN_UTENTE[html][template_login] = "tpl_vuoto";
$ADMIN_UTENTE[html2][utente_nome] = "Genera HTML di qualsiasi sito :-)";
$ADMIN_UTENTE[html2][utente_pass] = "html07013010";
$ADMIN_UTENTE[html2][utente_gruppo] = "admin";
$ADMIN_UTENTE[html2][template] = "tpl_vuoto";
$ADMIN_UTENTE[html2][template_login] = "tpl_vuoto";
$ADMIN_UTENTE[html2][pagina_def] = "home";
//GRUPPI DI DEFAULT
//guppo amministatoi
$ADMIN_GRUPPO[admin][gruppo_nome] = "Admin";
$ADMIN_GRUPPO[admin][menu_pagine] = "ALL";
$ADMIN_GRUPPO[admin][menu_pagine2] = "ALL";
//guppo pe amministae il sito
$ADMIN_GRUPPO[admin_sito][gruppo_nome] = "Admin Sito";
//guppo pe vedee le statistiche
$ADMIN_GRUPPO[sito][gruppo_nome] = "Utente Sito";
$ADMIN_GRUPPO[sito][gruppo_nome] = "Utente Sito";
$ADMIN_GRUPPO[sito][gruppo_nome] = "Utente Sito";
//CONFIGURAZIONE DI BASE
$ADMIN_CONF[ADMIN_OUT] = "SI";
$ADMIN_CONF[SITO_OUT] = "NO";
$ADMIN_CONF[debug] = "SI";
$ADMIN_CONF[sito_vis] = "SI"; //visualizza o no il sito di seguito all' amministrazione
$ADMIN_CONF[AUTH] = "NO"; //visualizza o no il sito di seguito all' amministrazione
$ADMIN_CONF[admin_vis] = "SI";
$ADMIN_CONF[dir_tmp] = INDI_PATH."admin/tmp"; //per include
$ADMIN_CONF[dir_base] = INDI_PATH."admin/"; //per include
$ADMIN_CONF[dir_pagine] = "_pagine/";
$ADMIN_CONF[dir_template] = "_template/";
$ADMIN_CONF[pagina_def] = "doc_index";
$ADMIN_CONF[template] = "tpl_default";
$ADMIN_CONF[template_login] = "tpl_login";
$ADMIN_CONF[pagina] = "debug"; //visualizza o no il sito di seguito all' amministrazione
//GRUPPI PRINCIPALI
$ADMIN[doc][nome] = "DOC";
$ADMIN[debug][nome] = "DEBUG";
$ADMIN[debug][pagina2] = "sito";
$ADMIN[debug][sito_vis] = "SI";
$ADMIN[debug][admin_debug] = "SI";
$ADMIN[utili][nome] = "SVILUPPO";
$ADMIN[utili][pagina2] = "encode";
$ADMIN[phpinfo][nome] = "PHP";
$ADMIN[indi][nome] = "INDI";
$ADMIN[indi][pagina2] = "indi_databse";
$ADMIN[statistiche][nome] = "STATISTICHE";
$ADMIN[MTP][nome] = "MTP";
$ADMIN[test][nome] = "TEST";
$ADMIN[admin][nome] = "ADMIN";
$ADMIN[admin][pagina2] = "pdf_account";
//Servizi in tutti i siti internet
$ADMIN[servizi][nome] = "SERVIZI";
//doc
$ADMIN_MENU2[doc][doc_index][nome] = "Home";
$ADMIN_MENU2[doc][doc_funzioni][nome] = "Funzioni";
$ADMIN_MENU2[statistiche][statistiche_admin_tnx][nome] = "Statistiche admin_tnx";
$ADMIN_MENU2[statistiche][newsletter][nome] = "Invii newsletter admin_tnx";
$ADMIN_MENU2[utili][encode][nome] = "Encode";
$ADMIN_MENU2[utili][filter][nome] = "Filter";
$ADMIN_MENU2[utili][langcheck][nome] = "Controllo langs files";
$ADMIN_MENU2[utili][sql][nome] = "Database SQL";
$ADMIN_MENU2[utili][dtxt][nome] = "DTXT";
$ADMIN_MENU2[utili][lib][nome] = "Librerie";
//$ADMIN_MENU2[utili][testi1][nome] = "Testi1";
//$ADMIN_MENU2[utili][testi2][nome] = "Testi tutti 1";
$ADMIN_MENU2[utili][testi_tutti][nome] = "Testi tutti 2";
$ADMIN_MENU2[utili][testi_sql][nome] = "Testi da Database";
$ADMIN_MENU2[utili][testi_puliti][nome] = "Testi puliti";
$ADMIN_MENU2[utili][flash][nome] = "Flash";
$ADMIN_MENU2[utili][cdrom][nome] = "cd-rom";
$ADMIN_MENU2[utili][HTML][nome] = "Salvataggio in HTML";
$ADMIN_MENU2[utili][buttonizer][nome] = "Buttonizer";
//MENU DEBUG
$ADMIN_MENU2[debug][sito][nome] = "Debug";
$ADMIN_MENU2[debug][log][nome] = "log";
$ADMIN_MENU2[debug][log][sito_vis] = "SI";
$ADMIN_MENU2[debug][3][nome] = "|";
$ADMIN_MENU2[debug][3][menu_link] = "NO";
$ADMIN_MENU2[debug][DATI][nome] = "DATI";
$ADMIN_MENU2[debug][TEMPLATE][nome] = "TEMPLATE";
$ADMIN_MENU2[debug][MENU][nome] = "MENU";
$ADMIN_MENU2[debug][REW_ALIAS][nome] = "REW_ALIAS";
$ADMIN_MENU2[debug][ACTIONS][nome] = "ACTIONS";
$ADMIN_MENU2[debug][BLOCK][nome] = "BLOCK";
$ADMIN_MENU2[debug][DB][nome] = "DB";
$ADMIN_MENU2[debug][STAT][nome] = "STAT";
$ADMIN_MENU2[debug][INDI][nome] = "INDI";
$ADMIN_MENU2[debug][4][nome] = "|";
$ADMIN_MENU2[debug][4][menu_link] = "NO";
$ADMIN_MENU2[debug][_GET][nome] = "_GET";
$ADMIN_MENU2[debug][_POST][nome] = "_POST";
$ADMIN_MENU2[debug][_SESSION][nome] = "_SESSION";
$ADMIN_MENU2[debug][_REQUEST][nome] = "_REQUEST";
$ADMIN_MENU2[debug][_COOKIE][nome] = "_COOKIE";
//$ADMIN_MENU2[debug][log_raw][nome] = "log_raw";
//$ADMIN_MENU2[debug][log_raw][template] = "tpl_vuoto";
//$ADMIN_MENU2[debug][log_raw][menu_nascosto] = "SI";
//$ADMIN_MENU2[debug][log_raw][sito_vis] = "NO";
//ADMIN
$ADMIN_MENU2[admin][statistiche][nome] = "Statistiche";
$ADMIN_MENU2[admin][pdf_account][nome] = "Account PDF";
$ADMIN_MENU2[admin][pdf_email][nome] = "E-mail Allegato";
$ADMIN_MENU2[admin][estrai_email][nome] = "Estrai E-mail";
$ADMIN_MENU2[admin][domini][nome] = "Domini";
$ADMIN_MENU2[admin][hosting][nome] = "Hosting traffico";
$ADMIN_MENU2[admin][apc][nome] = "APC";
//INDI
$ADMIN_MENU2[indi][indi_database][nome] = "Indi Database";
$ADMIN_MENU2[indi][indi_query][nome] = "Query";
$ADMIN_MENU2[indi][indi][nome] = "Prese";
//MTP
$ADMIN_MENU2[MTP][grabbone][nome] = "Grabbone";
$ADMIN_MENU2[MTP][1][nome] = "1";
$ADMIN_MENU2[MTP][2][nome] = "2";
//SERVIZI
//cd-rom
$ADMIN_MENU2[servizi][cd_rom][nome] = "Genera CD-ROM del Sito";
//cd-rom grabber
$ADMIN_MENU2[servizi][cd_rom_grab][nome] = "CD-ROM NON USARE";
$ADMIN_MENU2[servizi][grab_interno][nome] = "GRAB INTERNO";
$ADMIN_MENU2[servizi][statistiche][nome] = "Statistiche";
$ADMIN_MENU2[servizi][statistiche_grab][nome] = "Statistiche Grab";
$ADMIN_MENU2[servizi][statistiche_grab][template] = "tpl_statistiche";
//$ADMIN_MENU2[servizi][cd_rom_grab][sito_vis] = "NO";
//$ADMIN_MENU2[servizi][cd_rom_grab][SITO_OUT] = "NO";
//preimpostato
//personalizzate
//i primi valori di conf vengono dall' autenticazione
$LOGIN = admin_login();
//logout
if(($_REQUEST[aa] == "logout" or $_REQUEST["amministrazioneIndi"] == "0") and $LOGIN["AUTH"] == "SI") {
unset($_SESSION["admin_user"]);
unset($_SESSION["admin_pass"]);
unset($_SESSION["amministrazioneIndi"]);
unset($_SESSION["ap"]);
unset($_SESSION["ap2"]);
unset($_SESSION["debugIndi"]);
unset($_SESSION["dbg_db"]);
unset($_SESSION["dbg_dbg"]);
unset($_SESSION["dbg_err"]);
unset($_SESSION["dbg_inf"]);
unset($_SESSION["sito_vis"]);
unset($_SESSION["admin_vis"]);
$LOGIN["AUTH"] = "NO";
//gestisco template di login
//if($_REQUEST[at] == "null") $ADMIN_CONF[template_login] = "tpl_null";
$LOGIN["template"] = $ADMIN_CONF[template_login];
$LOGIN["ADMIN_OUT"] = "NO";
$LOGIN["SITO_OUT"] = "SI";
//redirect x sicurezza
header("Location: $_SERVER[REQUEST_URI]");
}
admin_ssv("sito_vis");
if($_SESSION[sito_vis] == "SI" and $LOGIN["AUTH"] == "SI") $ACTION["sito_vis"] = "SI";
if($_SESSION[sito_vis] == "NO" and $LOGIN["AUTH"] == "SI") $ACTION["sito_vis"] = "NO";
admin_ssv("admin_vis");
if($_SESSION[admin_vis] == "SI" and $LOGIN["AUTH"] == "SI") $ACTION["admin_vis"] = "SI";
if($_SESSION[admin_vis] == "NO" and $LOGIN["AUTH"] == "SI") $ACTION["admin_vis"] = "NO";
admin_ssv("admin_debug");
if($_SESSION[admin_debug] == "SI" and $LOGIN["AUTH"] == "SI") $ACTION["admin_debug"] = "SI";
if($_SESSION[admin_debug] == "NO" and $LOGIN["AUTH"] == "SI") $ACTION["admin_debug"] = "NO";
$a_pagina = admin_ssv("ap");
//controllo default
if($a_pagina != "") $LOGIN["pagina"] = $a_pagina;
else $LOGIN["pagina"] = $ADMIN_CONF["pagina_def"];
$a_pagina2 = admin_ssv("ap2");
if(is_array($ADMIN_MENU2[$a_pagina][$a_pagina2])) $LOGIN["pagina2"] = $a_pagina2;
else $LOGIN["pagina2"] = $ADMIN[$a_pagina]["pagina2"];
$a_utente = $LOGIN["utente"];
if($ADMIN_UTENTE[$a_utente][utente_gruppo] != "") $a_gruppo = $ADMIN_UTENTE[$a_utente][utente_gruppo];
$LOGIN["gruppo"] = $a_gruppo;
//FACCIO IL primo MERGE
$A_DATI = array_merge((array)$ADMIN_CONF, (array)$ADMIN["$a_pagina"],(array)$ADMIN_MENU2[$a_pagina][$a_pagina2],(array)$ADMIN_GRUPPO["$a_gruppo"],(array)$ADMIN_UTENTE["$a_utente"],(array)$ACTION,(array)$LOGIN);
if ($A_DATI["pagina"] == "home") {
$A_DATI["pagina"] = "debug";
$A_DATI["pagina2"] = "sito";
$_GET["ap"] = "debug";
$_SESSION["ap"] = "debug";
$A_DATI["nome"] = "debug";
}
//controlli iniziali dopo login
function admin_setup() {
global $A_DATI;
//controllo se ho gia' fatto l' inizializzazione e meto in sessione
if($_SESSION["admin_setup"] != "SI") {
//print "Benvenuto ".$A_DATI["utente_nome"]."
";
if(!file_exists($A_DATI["dir_tmp"])) {
mkdir($A_DATI["dir_tmp"]);
print "Creata TMP
";
} else {
//cancello i file temporanei
admin_delfile($A_DATI["dir_tmp"]);
}
}
$_SESSION["admin_setup"] = "SI";
}
admin_setup();
//template
include($ADMIN_CONF['dir_base'].$A_DATI['template'].".inc.php");
?>