";
$sql="select candidature,periode,debut,fin,nom,prenom from ".DB_PREFIXE."candidature inner join ".DB_PREFIXE."agent on agent.agent=candidature.agent where scrutin='".
$scrutin."' and decision is true order by nom";
$res = $f -> db -> query($sql);
echo "
"._("candidature")." "._("concernees")." ";
echo "";
echo "";
echo ""._("affectation des heures")." ";
echo "";
echo " ";
$f->isDatabaseError($res);
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){
$sql = "select debut from ".DB_PREFIXE."periode where periode ='".$row['periode']."'";
$debut = $f -> db -> getOne($sql);
//if(is_object($debut)) $debut='00:00';
$sql = "select fin from ".DB_PREFIXE."periode where periode ='".$row['periode']."'";
$fin = $f -> db -> getOne($sql);
echo "";
echo $row['candidature']." ".$row['nom']." ".$row['prenom']." ".$row['periode']." "._("debut")." : ".$debut." "._("fin")." : ".$fin." ";
echo " ";
$sql="update ".DB_PREFIXE."candidature set debut='".$debut."', fin = '".$fin.
"' where candidature=".$row['candidature'];
$res1 = $f -> db -> query($sql);
$f->isDatabaseError($res1);
}
echo "";
echo " ";
echo "
";
echo " ";
echo "";
echo "";
echo "
";
}
echo "";
?>