config::FACEBOOK_APP_ID, 'secret' => config::FACEBOOK_SECRET_KEY, 'cookie' => ($cookieOverride) ? false : true, 'domain' => config::FB_DOMAIN )); $session = $facebook->getSession(); } catch (FacebookApiException $e) { die($e); } */ // ---------------------------------- CARICA CONFIG ----------------------------------------------------------- if(!defined('HOSTNAME_SITE')){ include ("config.php"); } // -------------------------------- FUNZIONI GLOBALI ----------------------------------------------------------------- include("inc_funz.php"); // ---------------------------------- CARICA DATI UTENTE ----------------------------------------------------------- include ("dati_utente.php"); if(file_exists("phpthumb/phpThumb.config.php")){ include("phpthumb/phpThumb.config.php"); } else if(file_exists("../phpthumb/phpThumb.config.php")){ include("../phpthumb/phpThumb.config.php"); } else if(file_exists("../../phpthumb/phpThumb.config.php")){ include("../../phpthumb/phpThumb.config.php"); } else if(file_exists("../../../phpthumb/phpThumb.config.php")){ include("../../../phpthumb/phpThumb.config.php"); } // ---------------------------------- VARIABILI SI SOSTITUZIONE PER FORMATTAZIONE STRINGHE ----------------------------------------------------------- $formattaIn = array("\n","\r","" ,"#","'","’","“" ,"”" ,"°" ,"’","‘","“","”", "'", "'", "&", "‐", "–", "•", "&euro"); $formattaOut = array("\n","\n","'","#" ,"" ,"'" , "'","\"","\"","°", "'" ,"'" ,""" ,""", "'", "'", "&", "-", "-", "•","&euro"); $badWords=array(); // ---------------------------------- PARAMETRI PAGINA ----------------------------------------------------------- // ASSEGNA I PARAMETRI IN GET A arrGet $arrGet=(isset($arrGet) && is_array(@$arrGet))? $arrGet : array(); if(count(@$_GET)>0){ foreach($_GET as $key=>$param){ $arrGet[$key]=(is_string($param))? str_replace("\"","''",toTool(trim(urldecode($param)), 1, 0)) : $param; } } $richiesta=getSeoPag($_SERVER['REQUEST_URI']); if(is_array(@$richiesta['parametri']) && count(@$richiesta['parametri'])>0){ foreach($richiesta['parametri'] as $key=>$param){ $arrGet[$key]=str_replace("\"","''",toTool(trim(urldecode($param)), 1, 0)); } } // ASSEGNA I PARAMETRI IN POST A arrPost $arrPost=(isset($arrPost) && is_array(@$arrPost))? $arrPost : array(); if(count(@$_POST)>0){ foreach($_POST as $key=>$param){ // $arrPost[$key]=(!is_array($param))? str_replace("\"","''",toTool(trim($param), 1, -1)) : $param; // trim(stripslashes($param)); // $str, $stripsl=1, $encUtf=1, $deFormat = 0 $arrPost[$key]=(!is_array($param))? toTool(trim($param), 1, -1) : $param; // trim(stripslashes($param)); // $str, $stripsl=1, $encUtf=1, $deFormat = 0 } } // RIUNISCE I PARAMETRI GET E POST IN UN'UNICA VARIABILE arrPostGet $arrPostGet=(isset($arrPostGet) && is_array(@$arrPostGet))? $arrPostGet : array(); if(count(@$arrGet)>0){ foreach($arrGet as $key=>$param){ $arrPostGet[$key]=$param; } } if(count(@$arrPost)>0){ foreach($arrPost as $key=>$param){ $arrPostGet[$key]=$param; } } // ---------------------------------- FUNZIONALITA' INDIRIZZO E CARTELLA ----------------------------------------------------------- $dominio=@$_SERVER['HTTP_HOST']; $currentPage = @$_SERVER["PHP_SELF"]; $pagina=substr($currentPage, (1+strrpos($currentPage, "/"))); $_SESSION['cartella']=$cartella=substr(str_replace($pagina,"",$currentPage),1,(strlen(str_replace($pagina,"",$currentPage))-2)); $indirizzo="http://".$dominio."/".str_replace("&","&",gotoPage()); $indirizzo=str_replace("//","/",$indirizzo); $indirizzo=str_replace(":/","://",$indirizzo); if(@$_SERVER['DOCUMENT_ROOT']==""){ $documentRoot=str_replace(array("\\\\","//","/"),array("/","/","/"),$_SERVER['PATH_TRANSLATED']); $documentRoot=substr($documentRoot,0,strrpos($documentRoot,"/")); $_SERVER['DOCUMENT_ROOT']=str_replace("/","\\",str_replace($cartella,"",$documentRoot)); } // ---------------------------------- COLLEGA SERVICE ESTERNI ----------------------------------------------------------- if(file_exists(@CLIENTE.@MAINADMIN)){ // echo "
OK:".CLIENTE.MAINADMIN; include (@CLIENTE.@MAINADMIN); if(!isset($service)){ $service = new MainService(); } } else { // echo "
KO:".$_SERVER['DOCUMENT_ROOT']."/".CLIENTE.MAINADMIN; // echo "
SERVICE_BASE:".SERVICE_BASE; } if(USE_DB){ // -------------------------------- COLLEGA AL DB ----------------------------------------------------------------- $db = mysql_pconnect(HOSTNAME_SITE, USERNAME_SITE, PASSWORD_SITE) or trigger_error(mysql_error(),E_USER_ERROR); // $db = new mysqli(HOSTNAME_SITE, USERNAME_SITE, PASSWORD_SITE); $dbSel = mysql_select_db(DATABASE_SITE, $db); $tblprefix=TBLPREFIX_SITE; // -------------------------------- IMPOSTA IL CHARSET DEL DB A UTF8 ----------------------------------------------------------------- if (function_exists('mysql_set_charset') === false) { function mysql_set_charset($charset, $link_identifier = null){ if ($link_identifier == null) { return mysql_query('SET NAMES "'.$charset.'"'); } else { return mysql_query('SET NAMES "'.$charset.'"', $link_identifier); } } } mysql_set_charset('utf8',$db); // -------------------------------- CARICA VARIABILI DA DB ----------------------------------------------------------------- $config=exequery($db,"SELECT * FROM ".$tblprefix."config"); // echo "SELECT * FROM ".$tblprefix."config"; // die(); /* ?>
0){ foreach($config['arrayRes'] as $param){ $_SESSION['conf'][$param['nome']] = $param['valore']; } } // -------------------------------- RECUPERA TESTI ----------------------------------------------------------------- if(@$arrGet['lang']!=""){ caricaLingua($arrGet['lang']); } if(@$_SESSION['lang']=="" || !count(@$_SESSION['testi'])>0){ caricaLingua(DEFAULT_LANG, true); // CARICA TESTI FE + BE } // -------------------------------- SCHEDULA ----------------------------------------------------------------- $siti=getSito(0,$sito); $idSiti=(int)@$siti['id']; $_SESSION['idSiti']=$idSiti; } $messaggioSchedula=schedula(); ///// reindirizza da ".../?..." a "...?..." e, se non index dominio, da ".../" a "..." pulisciUrl(); ///// reindirizza da ".../?..." a "...?..." e, se non index dominio, da ".../" a "..." // pulisciUrl(); $is_I_Mobile=false; $is_I_Mobile=((bool)strpos($_SERVER['HTTP_USER_AGENT'],'iPad'))?true:$is_I_Mobile; $is_I_Mobile=((bool)strpos($_SERVER['HTTP_USER_AGENT'],'iPod'))?true:$is_I_Mobile; $is_I_Mobile=((bool)strpos($_SERVER['HTTP_USER_AGENT'],'iPhone'))?true:$is_I_Mobile; ob_start(); $action = @$_POST["action"]; $share_uid = @$_REQUEST["share_uid"]; $request_ids = @$_REQUEST['request_ids']; // explode(',', $_REQUEST['request_ids']); $signed_request = @$_REQUEST['signed_request']; $fb_params = json_decode(base64_decode(substr($signed_request, strpos($signed_request, ".")+1))); $liked = @$fb_params->page->liked; $user_id = @$fb_params->user_id; $custom_params = json_decode(@$fb_params->app_data); $prePathImgs="admin/contenuti/allegati"; $prePathUserImgs=$prePathImgs."/users/fotoflash"; /* ?>
0){ foreach($menuUp['childrens'] as $key=>$param){ switch($param['dxtype']){ case "news": $idPagNews=$param['id']; break; case "download": $idPagDownload=$param['id']; break; case "contact": $idPagContact=$param['id']; break; } } } ?> PataviumArt */ ?> 0){ // dx $arrMeta=getMetaTags(@$doc); } else if((int)@$categ['id']>0){ // categoria $arrMeta=getMetaTags(@$categ); } else { // home / non identificato $arrMeta=getMetaTags(); } ?>