Commit 267dd2c4 authored by Bate's avatar Bate

#25 Affichage des UV orphelines

parent eb26e189
......@@ -658,6 +658,13 @@ class uv extends stdentity
WHERE `pedag_uv_dept`.`departement` = ".$dept;
$where = true;
}
if(is_null($dept))
{
$req .= " LEFT OUTER JOIN `pedag_uv_dept`
ON `pedag_uv`.`id_uv` = `pedag_uv_dept`.`id_uv`
WHERE `pedag_uv_dept`.`departement` IS NULL";
$where = true;
}
if(!is_null($type) && array_key_exists($type, $_TYPE)){
if($where)
$req .= " AND";
......
......@@ -661,7 +661,12 @@ foreach($_DPT as $dept=>$desc){
$uvlist = uv::get_list($site->db, null, $dept);
$cts->add(new uv_dept_table($uvlist));
}
$orphans = uv::get_list($site->db, null, null);
if(!empty($orphan))
{
$cts->add_title(2,"UV sans departements");
$cts->add(new uv_dept_table($orphan));
}
$site->add_contents($cts);
$site->end_page();
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment