示例#1
0
	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;
	}
示例#2
0
		$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&eacute;e";
	$a = 0;
	break;
	
case 7 : // Emplacement
	break;
}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/
$r_question = CTableQuestion::select("*", 1, $order);
?>
<!-- InstanceEndEditable -->