Modification

Vous n avez pas la permission

"; } else { $action=$chemin[4]; $test = explode("-",$chemin[2]); $chemin[2] = preg_replace("[^0-9]","",$test[0]); $test = explode("-",$chemin[3]); $chemin[3] = $test[0]; if (strcmp($action,"supp")==0) { $query = "DELETE FROM ".$chemin[2]." WHERE id=".$chemin[3]." LIMIT 1"; mysql_query($query) or die("FATAL".mysql_error()."
".$query); $chemin[2] = substr($chemin[2],0,3); echo "

Suppresion d'un element

Supprime avec succes

Code de l' article supprimé : $chemin[3]

Retour

"; } elseif (strcmp($action,"supprimer")==0) { echo "

Etes-vous sur de vouloir supprimer cet element?

Supprimer l' element !!

Retour

"; } elseif(strcmp($action,"rmodif")==0) { $art = $chemin[2]; $type=$_POST['type']; $titre=text2html($_POST['titre']); $contenu =$_POST['contenu']; $query = "UPDATE $art SET arttyp='$type',titre='$titre',article='".text2html($contenu)."', modif=CONCAT(modif,' $nick') WHERE id='".$chemin[3]."'"; mysql_query($query) or die("FATAL: ".mysql_error()."
$query"); echo "

Modification

Modification effectuee

article: $art

Titre: $titre

"; } elseif(strcmp($action,"modifier")==0) { $query = "SELECT * from ".$chemin[2]." WHERE id='".$chemin[3]."'"; $result = mysql_query($query) or die("FATAL".mysql_error()); while($row = mysql_fetch_array($result)) { $row[5] = preg_replace("/(.+?)<\/a>/","[$1|$2]",$row[5]); $row[5] = preg_replace("/\"Image/","[img=$1]",$row[5]); echo "

modification de la table ".$chemin[2]."

Element poste par $row[2]

modification successives par: $row[6]

"; } } else { echo "

choix inconnu:$action

"; } echo ""; } ?>