/[openfoncier]/trunk/app/widget_consultation_mes_retours.php
ViewVC logotype

Annotation of /trunk/app/widget_consultation_mes_retours.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1096 - (hide annotations)
Tue Dec 18 12:25:30 2012 UTC (12 years, 1 month ago) by fmichon
File size: 1758 byte(s)
Suppression de l'appel à l'objet message pour l'affichage des messages

1 nhaye 498 <?php
2 fmichon 656 /**
3     * Widget -
4     *
5     * @package openmairie_exemple
6     * @version SVN : $Id: dashboard.php 850 2011-11-23 22:11:30Z fraynaud $
7     */
8 nhaye 498
9 fmichon 656 require_once "../obj/utils.class.php";
10     if (!isset($f)) {
11     $f = new utils(NULL, "consultation_mes_retours", _("Widget - Mes retours de consultation"));
12     }
13    
14     //
15     $sql = "SELECT count(*)
16     FROM ".DB_PREFIXE."consultation
17     LEFT JOIN ".DB_PREFIXE."avis_consultation
18     ON consultation.avis_consultation=avis_consultation.avis_consultation
19     LEFT JOIN ".DB_PREFIXE."dossier
20     ON consultation.dossier=dossier.dossier
21     LEFT JOIN ".DB_PREFIXE."service
22     ON consultation.service=service.service
23     INNER JOIN ".DB_PREFIXE."instructeur
24     ON instructeur.instructeur=dossier.instructeur
25     INNER JOIN ".DB_PREFIXE."om_utilisateur
26     ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur
27 fmichon 885 WHERE consultation.lu IS FALSE AND om_utilisateur.login='".$_SESSION['login']."'";
28 fmichon 656
29     //
30     $res = $f->db->query($sql);
31     $f->addToLog("app/widget_consultation_mes_retours.php: db->query(\"".$sql."\");", VERBOSE_MODE);
32     $f->isDatabaseError($res);
33     $row =& $res->fetchRow();
34    
35     //
36     if (!empty($row) && ($row[0] > 1 || $row[0] == 1)) {
37 fmichon 911 //
38 fmichon 656 if ($row[0] > 1) {
39     //
40 fmichon 911 $message = _("Vous avez")." <span class=\"bold\">".$row[0]."</span> "._("consultations pour lesquelles un avis a ete rendu.");
41 fmichon 656 } elseif($row[0] == 1) {
42     //
43 fmichon 911 $message = _("Vous avez")." <span class=\"bold\">".$row[0]."</span> "._("consultation pour laquelle un avis a ete rendu.");
44 nhaye 498 }
45 fmichon 656 //
46 fmichon 1096 $f->displayMessage("transparent", $message);
47 fmichon 911 //
48 fmichon 656 $footer = "../scr/tab.php?obj=consultation_mes_retours";
49     $footer_title = _("Voir mes retours de consultation");
50     } else {
51     //
52     echo _("Vous n'avez aucune consultation pour laquelle un avis a ete rendu.");
53     }
54    
55 nhaye 498 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26