$row["id_vue"], "date_consolidation" => $row["date_consolidation"], "nom_vue" => $row["nom_vue"], "comment" => $row["comment"], ); } return $result; } else { return array(); } } public function getView($id_view) { global $dbh; global $msg; $result = array(); $id_view += 0; if (!$id_view) throw new Exception("Missing parameter: id_view"); if (SESSrights & ADMINISTRATION_AUTH) { $requete = "SELECT id_vue, date_consolidation, nom_vue, comment FROM statopac_vues where id_vue=".$id_view; $res = pmb_mysql_query($requete, $dbh); while ($row = pmb_mysql_fetch_assoc($res)) { $result[] = array( "id_vue" => $row["id_vue"], "date_consolidation" => $row["date_consolidation"], "nom_vue" => $row["nom_vue"], "comment" => $row["comment"], ); } return $result; } else { return array(); } } public function getStatopacView($id_view) { global $dbh; if (SESSrights & ADMINISTRATION_AUTH) { $result = array(); $query = "select * from statopac_vue_".$id_view; $res = pmb_mysql_query($query, $dbh); if ($res) { while ($row = pmb_mysql_fetch_assoc($res)) { $result[] = $row; } } return $result; } else { return array(); } } public function makeConsolidation($conso,$date_deb,$date_fin,$date_ech, $list_ck) { $details = array(); if (SESSrights & ADMINISTRATION_AUTH) { $consolidation = new consolidation($conso,$date_deb,$date_fin,$date_ech, $list_ck); $details = $consolidation->make_consolidation(); } return $details; } } ?>