get_datasources_list();
print "
".$msg['edition_state_label']."
";
switch($action){
case "edit" :
if($partial_submit){
$editions_state->get_from_form();
}
print $editions_state->get_form();
break;
case "save" :
$editions_state->get_from_form();
$editions_state->save();
show_state_list();
break;
case "show" :
print $editions_state->show($sub,$elem);
break;
case "delete" :
$editions_state->delete();
default:
show_state_list();
break;
}
function show_state_list(){
global $msg,$charset;
$query = "select id_editions_state, editions_state_name, editions_state_comment, libproc_classement, editions_state_num_classement from editions_states left join procs_classements on editions_state_num_classement = idproc_classement order by libproc_classement,editions_state_name asc";
$result = mysql_query($query);
print "
";
if(mysql_num_rows($result)){
$class_prec=$msg['proc_clas_aucun'];
$buf_tit="";
$buf_class=0;
$parity=1;
while ($row = mysql_fetch_object($result)){
if ($class_prec!=$row->libproc_classement) {
if (!$row->libproc_classement) $row->libproc_classement=$msg[proc_clas_aucun];
if ($buf_tit) {
$buf_contenu="".$buf_tit." |
".$buf_contenu."
";
print gen_plus("procclass".$buf_class,$buf_tit,$buf_contenu);
$buf_contenu="";
}
$buf_tit=$row->libproc_classement;
$buf_class=$row->editions_state_num_classement;
$class_prec=$classement;
}
if ($parity % 2) {
$pair_impair = "even";
} else {
$pair_impair = "odd";
}
$parity++;
$tr_javascript=" onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='$pair_impair'\" onmousedown=\"document.location='./edit.php?categ=state&action=edit&id=".$row->id_editions_state."';\" ";
$buf_contenu.="\n
id_editions_state."';\" value='".$msg['708']."'/> |
".htmlentities($row->editions_state_name,ENT_QUOTES,$charset)."
".htmlentities($row->editions_state_comment,ENT_QUOTES,$charset)." |
";
}
$buf_contenu="".$buf_tit." |
".$buf_contenu."
";
print gen_plus("procclass".$buf_class,$buf_tit,$buf_contenu);
}
print "
";
}