getTypeSelector('1','req_typeChg();'), $req_add_form); $req_add_form = str_replace('!!req_univ!!',$rqt->getUnivSelector('1','req_univChg();'), $req_add_form); $req_add_form = str_replace('!!req_comm!!','', $req_add_form); $req_add_form = str_replace('!!req_code!!','', $req_add_form); $req_add_form = str_replace('!!req_auth!!', request::getAutorisationsForm(), $req_add_form); break; } print $req_add_form; } //traitement des actions switch($action) { case 'add': show_req_add_form(); break; case 'modif': break; case 'update': if($req_name && $req_code) { $requete = "SELECT count(1) FROM procs WHERE name='".$req_name."' "; $res = pmb_mysql_query($requete, $dbh); $nbr_lignes = pmb_mysql_result($res, 0, 0); if(!$nbr_lignes) { if (is_array($user_aut)) { $autorisations=implode(" ",$user_aut); } else { $autorisations=''; } $param_name=parameters::check_param($req_code); if ($param_name!==true) { error_message_history($param_name, sprintf($msg['proc_param_check_field_name'],$param_name), 1); exit(); } $requete = "INSERT INTO procs (idproc,name,requete,comment,autorisations,num_classement) VALUES ('', '$req_name', '$req_code', '$req_comm', '$autorisations', '$form_classement' ) "; $res = pmb_mysql_query($requete, $dbh); } else { print ""; } print ""; } break; case 'del': break; case 'list': default: break; } ?>