CMS ultra léger au style oldschool, projet de la communauté Kalaïn Hundin.

submit_blog_config.php 2.1KB

1
  1. <?php $FilesDir = str_replace("files", "",dirname(__FILE__)); require_once(''.$FilesDir.'user/config.php'); $page_name='Modifications Blog'; include_once(''.$MainDir.'user/top.php'); session_start(); if(!@$_SESSION['session']) { echo"<br><br>Vous ne pouvez pas effectuer cette opération si vous n'êtes pas connecté(e)."; } if(@$_SESSION['session']) { require_once(''.$MainDir.'user/verifications.php'); include("".$MainDir."files/check_admin.php"); $bdd = new PDO("mysql:dbname=$base;host=$server", "$user", "$passwd"); $sql="SELECT * FROM page"; $req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error()); $data_pages=mysql_fetch_assoc($req); if($admin_mode == "1"){ //////// TO SET if(isset($_POST['static_homepage_status'])){ $site_name=htmlspecialchars(formulaires($_POST['titre'])); $description=htmlspecialchars(formulaires($_POST['description'])); $bandeau=htmlspecialchars(formulaires($_POST['bandeau'])); $static_homepage_status=htmlspecialchars(formulaires($_POST['static_homepage_status'])); //////// //$passwd=htmlspecialchars(formulaires($_POST['passwd'])); //$passwd2=htmlspecialchars(formulaires($_POST['passwd2'])); //////// TO SET mysql_query("UPDATE blog_config SET site_name='$site_name'") or die ('error : '.mysql_error()); mysql_query("UPDATE blog_config SET description='$description'") or die ('error : '.mysql_error()); mysql_query("UPDATE blog_config SET bandeau='$bandeau'") or die ('error : '.mysql_error()); mysql_query("UPDATE blog_config SET static_homepage_status='$static_homepage_status'") or die ('error : '.mysql_error()); //////// echo'Vous venez de modifier les paramètres de '.$website_name.'<br /><a href="'.$root_path.'">Retour à l\'accueil du site !</a>'; include_once('../user/bottom.php'); } if(isset($_GET['static_homepage_id'])){ $get_static_homepage_id = $_GET['static_homepage_id']; mysql_query("UPDATE blog_config SET static_homepage_id='$get_static_homepage_id'") or die ('error : '.mysql_error()); echo'Vous venez de modifier les paramètres de '.$website_name.'<br /><a href="/../">Retour à l\'accueil du site !</a>'; } } } ?>