$SessionMaxTime) { session_unset();// On détruit les variables de notre session session_destroy();// On détruit notre session //nouvelle session session_start(); sessionvie(); } } /* -------------------------------------------- */ /* --- VARIABLES + PROTECTION DES VARIABLES --- */ /* -------------------------------------------- */ @include("cpcsofts_scripts/distribution.php"); @include("cpcsofts_scripts/site_fonctions.php"); @include("cpcsofts_scripts/site_configuration.inc.php"); $censure_mots = array ("phpinfo", "select", "c99script", "", "<", ">", "execute", "mkdir" ,"rmdir", "opendir", "passthru", "--"); function protection_variable($mavariable,$htmlchars=1) { global $censure_mots; $mavariable = str_ireplace($censure_mots,'',$mavariable); if ($htmlchars == 1) {$mavariable = htmlspecialchars($mavariable);} $mavariable = str_replace('&','&',$mavariable); return $mavariable; } if (isset($_POST["onglet"])) {$onglet = $_POST["onglet"];} else {if(isset($_GET["onglet"])) {$onglet = $_GET["onglet"];} else {$onglet = NULL;}} $onglet = protection_variable($onglet); $onglet = substr($onglet,0,20); $onglet = @mysqli_real_escape_string($link,$onglet); if (isset($_POST["page"])) {$page = $_POST["page"];} else {if(isset($_GET["page"])) {$page = $_GET["page"];} else {$page = NULL;}} $arraypages = array("accueil", "database", "detail", "staff", "protection", "dumpeur", "commentaires", "liens", "contact", "donations"); if (!in_array($page, $arraypages)) {$page = 'accueil';} if (isset($_POST["num"])) {$num = $_POST["num"];} else {if(isset($_GET["num"])) {$num = $_GET["num"];} else {$num = NULL;}} if (!is_numeric($num)) {$num = NULL;} if (isset($_POST["position"])) {$position = $_POST["position"];} else {if(isset($_GET["position"])) {$position = $_GET["position"];} else {$position = NULL;}} if (!is_numeric($position) || $position < 0) {$position = NULL;} if (isset($_POST["lenom"])) {$lenom = $_POST["lenom"];} else {if(isset($_GET["lenom"])) {$lenom = $_GET["lenom"];} else if (!isset($lenom)) {$lenom = NULL;}} $lenom = protection_variable($lenom); $lenom = substr($lenom,0,100); $lenom = @mysqli_real_escape_string($link,$lenom); /* -------------- */ /* --- LANGUE --- */ /* -------------- */ $lang = ''; if (isset($_GET["lang"])) {$lang = $_GET["lang"];} if (!isset($_SESSION['langue'])) { $detect_langue = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); //Bruno : fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4 //Rafa : es-ES,es;q=0.8 $ma_langue = strtolower(@substr($detect_langue[0],0,2)); if ($ma_langue == 'fr') {$langue = 'fr';} elseif ($ma_langue == 'de') {$langue = 'de';} elseif ($ma_langue == 'es') {$langue = 'es';} else {$langue = 'en';} $_SESSION['langue'] = $langue;//valeur par défaut unset($ma_langue); } else if ($lang == 'es') {$_SESSION['langue'] = 'es';} else if ($lang == 'de') {$_SESSION['langue'] = 'de';} else if ($lang == 'en') {$_SESSION['langue'] = 'en';} else if ($lang != '') {$_SESSION['langue'] = 'fr';} unset($lang); $langue = $_SESSION['langue'];//sinon ça plante avec les images /* ---------------- */ /* --- INCLUDE --- */ /* ---------------- */ @include("cpcsofts_scripts/langue_".$langue.".inc.php"); if ($distribution == "local" && $ADMINmasquer == 0) {@include("cpcsofts_admin_local_only/admin_fonctions.php");} /* -------------- */ /* --- TITRE --- */ /* -------------- */ $titre_page = "CPC-POWER, sauvegarde du patrimoine de l'Amstrad CPC"; if ($page == "detail") { $requete = "SELECT titre, annee, editeur FROM $TABLE_01 WHERE id='$num'"; $result = @mysqli_query($link,$requete,MYSQLI_STORE_RESULT); $resultat = @mysqli_fetch_array($result, MYSQLI_BOTH); @mysqli_free_result($result); $REFtitre = strtolower($resultat[0]); $REFannee = strtolower($resultat[1]); $REFediteur = strtolower($resultat[2]); $titre_page = $REFtitre." © ".$REFediteur." (".$REFannee.")"; } ?> <?PHP echo $titre_page; ?> '; echo ''; } echo ''; /* if ($page == 'accueil') { echo '';} else if ($page == 'database' || $page == 'staff') { echo '';} */ if ($page == 'accueil' || $page == 'database' || $page == 'staff') { echo '';} echo ''; //*** CORRECTIONS PHP7 et CARACTERES *** if ($distribution == 'local') {forcer_iso_8859();} echo ''; echo "";//option TOP echo "
"; //MENU SECTIONS echo "
CPC-POWER :"; echo "CPC-SOFTS ("; if ($langue == "de") {echo "Datenbank";} else if ($langue == "fr") {echo "Base de données";} else if ($langue =="es") {echo "Base de datos";} else {echo "Database";} echo ") - "; echo "CPCArchives ("; if ($langue == "de") {echo "Artikel";} else if ($langue == "fr") {echo "Articles";} else if ($langue =="es") {echo "Articulos";} else {echo "Articles";} echo ")"; /*echo "Gamebase CPC";*/ echo " 
"; //message spécial //lire les données $requete = "SELECT texte FROM ".$TABLE_02." WHERE id='3'"; $result = @mysqli_query($link,$requete,MYSQLI_STORE_RESULT); $resultat = @mysqli_fetch_array($result, MYSQLI_BOTH); $msg_defilant = stripslashes($resultat[0]); if (strlen($msg_defilant) > 0) { echo "
"; echo "".$msg_defilant.""; echo "
"; } $mois=date("n"); echo "
"; /* module de recherche */ echo "
"; echo "
"; echo "
"; echo ""; echo ""; echo "
"; echo "
"; echo "
"; /* IMAGE ALEA */ echo "
"; @include("cpcsofts_scripts/screenshot_aleatoire.php"); echo "
"; echo "
"; $result = @mysqli_query($link,"SELECT count(id) FROM ".$TABLE_01,MYSQLI_STORE_RESULT); $resultat = @mysqli_fetch_array($result, MYSQLI_BOTH); $TOTALFICHES = $resultat[0]; @mysqli_free_result($result); $result = @mysqli_query($link,"SELECT count(id) FROM ".$TABLE_03." WHERE traitement = '1'",MYSQLI_STORE_RESULT); $resultat = @mysqli_fetch_array($result, MYSQLI_BOTH); $TOTALCOM = $resultat[0]; @mysqli_free_result($result); $recherchedon = "SELECT sum(montant) FROM ".$TABLE_04." WHERE left(datedudon,4)=".date('Y'); $result = @mysqli_query($link,$recherchedon,MYSQLI_STORE_RESULT); $resultat = @mysqli_fetch_array($result, MYSQLI_BOTH); $TOTALDON = $resultat[0]; @mysqli_free_result($result); unset($recherchedon); //MENU HAUT echo ""; //MENU SESSION echo "
"; echo "'; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
   "; echo " "; echo " "; echo " "; echo "
"; echo "
"; //LOCAL ONLY - ADMIN echo "
"; if ($distribution == "local" && $ADMINmasquer == 0) { if (isset($_POST["admin"])) {$admin = $_POST["admin"];} else {if(isset($_GET["admin"])) {$admin = $_GET["admin"];} else {$admin = NULL;}} //admin local only echo "Ajouter une fiche "; echo "Les outils"; if ($admin == 'ajouter') {@include("cpcsofts_admin_local_only/admin_fiches_ajouter.php");$page='';} if ($admin == 'outils') {@include("cpcsofts_admin_local_only/admin_outils.php");$page='';} } //WEB if ($page =="donations") {@include("cpcsofts_scripts/softs_donations.php");} elseif ($page == "liens") {@include("cpcsofts_scripts/softs_liens.php");} elseif ($page == "contact") {@include("cpcsofts_scripts/softs_contact.php");} elseif ($page == "commentaires") {@include("cpcsofts_scripts/softs_commentaires.php");} elseif ($page == "accueil") {@include("cpcsofts_scripts/softs_accueil.php");} elseif ($page == "database") {@include("cpcsofts_scripts/softs_database_listing.php");} elseif ($page == "detail") {@include("cpcsofts_scripts/softs_database_detail.php");} elseif ($page == "staff") {@include("cpcsofts_scripts/softs_database_staff.php");} elseif ($page == "dumpeur") {@include("cpcsofts_scripts/softs_database_dumpeur.php");} elseif ($page == "protection") {@include("cpcsofts_scripts/softs_database_protection.php");} //elseif ($page == "lastupdate") {@include("cpcsofts_scripts/softs_lastupdate.php");} //TOP echo ""; echo "Goto Top"; echo ""; echo ""; echo "
"; //MENU BAS (sérparation) echo "
 
"; //PIED DE PAGE echo "
"; echo str_replace("#ANNEE#",date("Y"),$LG_MSG[1]);//annee courante echo "
Hébergement Web, Mail et serveurs de jeux haute performance"; echo "
"; echo "
"; ?>