Commit 5b1e4bae authored by Bate's avatar Bate

Test planning

parent 049e7d2a
......@@ -335,6 +335,12 @@ class planning2 extends stdentity
WHERE id_utilisateur = $user_id");
}
function get_gaps()
{
return new requete($this->db,
"SELECT id_gap FROM pl2_gap WHERE id_planning = $this->id");
}
function get_users_for_gap( $gap_id, $date )
{
......
......@@ -84,7 +84,12 @@ $planning->load_by_id(2);
if(is_null($planning->id))
echo "Erreur chargement planning";
$planning->add_gap(12*3600,13*3600,"Midi",2);
$gaps = $planning->get_gaps();
while( list($gap_id) = $gaps->get_row())
{
$planning->add_user_to_gap($gap_id,8276,strtotime('2013-06-12 00:00:00'), strtotime('2013-06-20 00:00:00'));
}
echo mysql_error ();
......
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