static function get_option($selectedvalue, $idtype) { $option = ""; $type_possible = CTableQuestion::get_enum('type'); foreach($type_possible as $valeur) { $selected = CForm::get_selected($selectedvalue, $valeur); $option = $option . "<option value='" . $valeur . "'" . $selected . ">" . $valeur . "</option>\n"; } return $option; }
$error_type = 1; $error_signe['nom'] = "*"; } if ($type=="") { $error_type = 2; $error_signe['type'] = "*"; } if ($error_type > 0) { //erreur de type champ non valide $msginfo = "Champ non valide"; $a = 5; break; } $tconfig = new CTableQuestion(array('id'=>$id, 'nom'=>CFunction::addslashes($nom), 'type'=>CFunction::addslashes($type), 'choix'=>CFunction::addslashes($choix), 'etat'=>$etat, 'obligatoire'=>$obligatoire)); $tconfig ->update(); $msginfo = "question bien modifiée"; $a = 0; break; case 7 : // Emplacement break; } /*------------------------------------------------------ A FAIRE DANS TOUS LES CAS --------------------------------------------------------*/ $r_question = CTableQuestion::select("*", 1, $order); ?> <!-- InstanceEndEditable -->