user; if(!empty($theLevel) && strstr($theLevel,$u['statuts'])) { if(is_array($repeat_vars)) //les variables que l'on souhaite faire passer dans la page suivante, spécial formulaire { foreach($repeat_vars as $rv) { $TheRepeatedParam= $rv."=".$$rv."&"; } } if ($_REQUEST['theAction']=="add" && !empty($_REQUEST['submit']) && !empty($theTable) && !$noadd) //Test si le formulaire a été envoyé { $m=new mysql(); $m->insert($theTable, $_REQUEST); } if ($_REQUEST['theAction']=="drop" && !empty($theTable) && !empty($_REQUEST['id']) && !$nodrop) //Suppression d'un champ { $m=new mysql(); $m->dropit($theTable, $_REQUEST['id']); } if ($_REQUEST['theAction']=="update" && !empty($theTable) && !empty($_REQUEST['id']) && !empty($_REQUEST['field']) && !empty($_REQUEST['v'])) //Mise à jour d'un champ { $m=new mysql(); $v=$_REQUEST['v']; $v=urldecode($v); /* $v=htmlentities($v); */ $v=str_replace("%u2019", "\'", $v);//workaround de l'apostrophe $v=str_replace("%u201C", "\"", $v);//workaround du guillemet $v=str_replace("%u2026", "...", $v);//workaround de la suspension $m->updateit($theTable, $_REQUEST['id'], $_REQUEST['field'], $v); } if (!$noadd){ $add_row.=" Ajouter un élément
"; } }else if($noadd) $add_row.=""; else $add_row.="Vous n'avez pas les droits pour ajouter ces données"; ?>