4 |
* par la date de création et la catégorie |
* par la date de création et la catégorie |
5 |
* |
* |
6 |
* @package openads |
* @package openads |
7 |
* @version SVN : $Id |
* @version SVN : $Id: |
8 |
*/ |
*/ |
9 |
|
|
10 |
// |
// |
22 |
(isset($_GET['idxformulaire']) ? $idxformulaire = $_GET['idxformulaire'] : $idxformulaire = ""); |
(isset($_GET['idxformulaire']) ? $idxformulaire = $_GET['idxformulaire'] : $idxformulaire = ""); |
23 |
(isset($_GET['retourformulaire']) ? $retourformulaire = $_GET['retourformulaire'] : $retourformulaire = ""); |
(isset($_GET['retourformulaire']) ? $retourformulaire = $_GET['retourformulaire'] : $retourformulaire = ""); |
24 |
|
|
25 |
|
//Si le formulaire est demande_avis_encours |
26 |
|
if ($retourformulaire == 'demande_avis_encours') { |
27 |
|
|
28 |
|
// Récupération du dossier en fonction du numéro de consultation |
29 |
|
$sql = "SELECT dossier |
30 |
|
FROM ".DB_PREFIXE."consultation |
31 |
|
WHERE consultation=$idxformulaire"; |
32 |
|
$dossier = $f->db->getone($sql); |
33 |
|
$f->addToLog("app/document_numerise.view.php: db->getone(\"".$sql."\");", VERBOSE_MODE); |
34 |
|
$f->isDatabaseError($dossier); |
35 |
|
|
36 |
|
//Sinon si le formulaire est dossier_instruction |
37 |
|
} elseif ($retourformulaire == 'dossier_instruction') { |
38 |
|
|
39 |
|
//L'identifiant du dossier est $idxformualire |
40 |
|
$dossier = $idxformulaire; |
41 |
|
} |
42 |
|
|
43 |
// Récupération des documents numérisés par le numéro de dossier |
// Récupération des documents numérisés par le numéro de dossier |
44 |
$sql = "SELECT document_numerise.document_numerise as document_numerise, |
$sql = "SELECT document_numerise.document_numerise as document_numerise, |
45 |
document_numerise.date_creation as date_creation, |
document_numerise.date_creation as date_creation, |
52 |
ON document_numerise.document_numerise_type = document_numerise_type.document_numerise_type |
ON document_numerise.document_numerise_type = document_numerise_type.document_numerise_type |
53 |
LEFT JOIN ".DB_PREFIXE."document_numerise_type_categorie |
LEFT JOIN ".DB_PREFIXE."document_numerise_type_categorie |
54 |
ON document_numerise_type.document_numerise_type_categorie = document_numerise_type_categorie.document_numerise_type_categorie |
ON document_numerise_type.document_numerise_type_categorie = document_numerise_type_categorie.document_numerise_type_categorie |
55 |
WHERE document_numerise.dossier = '$idxformulaire' |
WHERE document_numerise.dossier = '$dossier' |
56 |
ORDER BY document_numerise.date_creation, document_numerise.nom_fichier"; |
ORDER BY document_numerise.date_creation, document_numerise.nom_fichier"; |
57 |
$res = $f->db->query($sql); |
$res = $f->db->query($sql); |
58 |
$f->addToLog("app/document_numerise.view.php: db->query(\"".$sql."\");", VERBOSE_MODE); |
$f->addToLog("app/document_numerise.view.php: db->query(\"".$sql."\");", VERBOSE_MODE); |
79 |
%s |
%s |
80 |
</a>"; |
</a>"; |
81 |
|
|
82 |
//Affiche bouton ajouter |
//Vérification des droits |
83 |
echo "<p><a onclick=\"ajaxIt('document_numerise','../scr/sousform.php?obj=document_numerise&action=0&tri=&objsf=document_numerise&premiersf=0&retourformulaire=dossier_instruction&idxformulaire=$idxformulaire&trisf=&retour=tab');\" href='#'> |
if ($f->isAccredited('document_numerise') || $f->isAccredited('document_numerise_ajouter')) { |
84 |
<span class='om-icon om-icon-16 om-icon-fix add-16' title='Ajouter'>Ajouter</span> |
|
85 |
Ajouter un document |
//Affiche bouton ajouter |
86 |
</a></p>"; |
echo "<p><a onclick=\"ajaxIt('document_numerise','../scr/sousform.php?obj=document_numerise&action=0&tri=&objsf=document_numerise&premiersf=0&retourformulaire=$retourformulaire&idxformulaire=$dossier&trisf=&retour=tab');\" href='#'> |
87 |
|
<span class='om-icon om-icon-16 om-icon-fix add-16' title='Ajouter'>Ajouter</span> |
88 |
|
Ajouter un document |
89 |
|
</a></p>"; |
90 |
|
} |
91 |
|
|
92 |
// |
// |
93 |
$i = 1; |
$i = 1; |