Commit 084c49fd authored by slopez's avatar slopez

bleh

parent fffb5232
......@@ -680,11 +680,34 @@ else
{
$cts2 = new contents("Cotisation BDS");
$limit=$user->get_certificat();
$req = new requete($site->db, "SELECT `date_fin_cotis` FROM `cotisations`
WHERE `id_utilisateur`='".$user->id."'
AND `date_fin_cotis` >= '" . date("Y-m-d") . "'
ORDER BY `date_fin_cotis` DESC LIMIT 1");
if($site->user->is_in_group("gestion_bds")
&& file_exists("/var/www/bds/www/var/img/profil/" . $user->id .".jpg")
&& $limit
&& $req->lines == 1)
{
$req2 = new requete($site->db,
"SELECT `id_carte` ".
"FROM `cartes` ".
"INNER JOIN `cotisations` USING(`id_cotisation`) ".
"WHERE `cotisations`.`id_utilisateur`='".$user->id."' ".
"AND `cartes`.`etat_vie_carte`<".CETAT_IMPRIMEE."");
if($req2->lines==1)
{
list($id)=$req->get_row();
$cts2->add_paragraph('<a href="'.$topdir.'admin/cartes.php?action=pdf&ids='.$id.'">Imprimer la carte</a>');
}
}
if ( !file_exists("/var/www/bds/www/var/img/profil/" . $user->id .".jpg"))
$cts2->add_paragraph("<img src=\"".$topdir."images/actions/delete.png\"><b>ATTENTION</b>: " .
"<a href=\"user.php?page=edit&amp;id_utilisateur=".$user->id.
"&amp;see=photo\">Photo d'identit&eacute; non pr&eacute;sente !</a>");
$limit=$user->get_certificat();
if(!$limit)
$cts2->add_paragraph("<img src=\"".$topdir."images/actions/delete.png\"><b>ATTENTION</b>: " .
"Vous n'avez pas de certificat médical à jour, vous n'avez donc pas le droit de ".
......@@ -692,16 +715,12 @@ else
else
$cts2->add_paragraph("Certificat médical valide jusqu'au ".date(strtotime($limit)));
$req = new requete($site->db, "SELECT `date_fin_cotis` FROM `cotisations`
WHERE `id_utilisateur`='".$user->id."'
AND `date_fin_cotis` >= '" . date("Y-m-d") . "'
ORDER BY `date_fin_cotis` DESC LIMIT 1");
if ($req->lines > 1)
{
$cts2->add_paragraph("ATTENTION: Plusieurs cotisations en cours.");
$cts->add($cts2,true,true,'cotisationinfos','cotisationinfos');
}
elseif ($req->lines != 1)
elseif ($req->lines == 0)
{
$cts2->add_paragraph("ATTENTION: Cotisation non enregistr&eacute;e ou etat non &agrave; jour.");
$cts->add($cts2,true,true,'cotisationinfos','cotisationinfos');
......
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