1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
function afficheLstCritere($num_audit, $num_crit)
{
if(isset($_GET['crit']))
$lst_crit = '<select name="lst_critere" size="10" onChange="window.location.href=\'index.php?page=notation_critere&audit='.$num_audit.'&crit=\'+document.form_notation_critere.lst_critere.value+\'&preccrit='.$_GET['crit'].'&val=\'+document.form_notation_critere.lst_valeur_crit.value+\'&com=\'+document.form_notation_critere.text_commentaire.value;">';
else
$lst_crit = '<select name="lst_critere" size="10" onChange="window.location.href=\'index.php?page=notation_critere&audit='.$num_audit.'&crit=\'+document.form_notation_critere.lst_critere.value;">';
$req_crit = "select * from critere order by (code_critere)";
$res_crit = mysql_query($req_crit);
while($ligne_crit = mysql_fetch_row($res_crit))
{
if($ligne_crit[0] === $num_crit)
$lst_crit .= '<option id="'.$ligne_crit[0].'" value="'.$ligne_crit[0].'" selected="selected">'.$ligne_crit[0].' | '.$ligne_crit[1].'</option>';
else
$lst_crit .= '<option id="'.$ligne_crit[0].'" value="'.$ligne_crit[0].'">'.$ligne_crit[0].' | '.$ligne_crit[1].'</option>';
}
$lst_crit .= '</select>';
return $lst_crit;
} |
Partager