0byt3m1n1-V2
Path:
/
home
/
nlpacade
/
www
/
classes
/
ajax
/
[
Home
]
File: actualite.php
<?php include_once(realpath(dirname(__FILE__)) . "/../../classes/Administrateur.class.php"); include_once(realpath(dirname(__FILE__)) . "/../../classes/Navigation.class.php"); session_start(); if( ! isset($_SESSION["util"]->id) ) {header("Location: ../index.php");exit;} include_once(realpath(dirname(__FILE__)) . "/../../fonctions/divers.php"); ?> <?php if(! est_autorise("acces_catalogue")) exit; ?> <?php include_once("../../classes/Actualite.class.php"); include_once("../../classes/Actualitedesc.class.php"); include_once("../../classes/Theme.class.php"); include_once("../../classes/Themedesc.class.php"); $sep = explode( "_", $_POST['id']); $pos = strpos($_POST['id'], "_"); $modif = substr($_POST['id'], 0, $pos); if($modif == "titredos"){ $obj = new Theme(); $obj->charger(substr($_POST['id'], $pos+1)); $objdesc = new Themedesc(); $objdesc->charger($obj->id); } else { $obj = new Actualite(); $obj->charger(substr($_POST['id'], $pos+1)); $objdesc = new Actualitedesc(); $objdesc->charger($obj->id); } switch($modif){ case 'titrecont' : $objdesc->titre = utf8_decode($_POST['value']); echo $objdesc->titre; break; case 'titredos' : $objdesc->titre = utf8_decode($_POST['value']); echo $objdesc->titre; break; case 'ligne' : if($obj->ligne) $obj->ligne = 0; else $obj->ligne= 1; break; } $obj->maj(); $objdesc->maj(); ?>
©
2018.