public function modify($lang, $intitule, $titre, $chapo, $description, $descriptiontext) { $messagedesc = new Messagedesc($this->id, $lang); $messagedesc->intitule = $intitule; $messagedesc->titre = $titre; $messagedesc->chapo = $chapo; $messagedesc->description = $description; $messagedesc->descriptiontext = $descriptiontext; if ($messagedesc->id == "") { $messagedesc->message = $this->id; $messagedesc->lang = $lang; $messagedesc->add(); } else { $messagedesc->maj(); } redirige("message_modifier.php?id=" . $this->id . "&lang=" . $lang); }
$messagedesc = new Messagedesc(); $message->charger($nom); $messagedesc->charger_admin($message->id, $lang); $messagedesc->message = $message->id; $messagedesc->intitule = $_POST['intitule']; $messagedesc->titre = $_POST['titre']; $messagedesc->chapo = $_POST['chapo']; $messagedesc->description = $_POST['description']; // correction € pour le mail $messagedesc->description = str_replace("€", "€", $messagedesc->description); $messagedesc->descriptiontext = $_POST['descriptiontext']; $messagedesc->lang = $lang; if ($messagedesc->id) { $messagedesc->maj(); } else { $messagedesc->add(); } redirige("message_modifier.php?nom={$nom}&lang={$lang}"); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php require_once "title.php"; ?> </head> <body>