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

Annotation of /trunk/app/getDemandeInfo.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3730 - (hide annotations)
Fri Mar 18 11:50:26 2016 UTC (8 years, 10 months ago) by mbroquet
File size: 1589 byte(s)
Actualisation du trunk
1 mbroquet 3730 <?php
2     /**
3     * Ce script a pour objet de recuperer l'info passée en paramètre : soit la nature (nouveau dossier,
4     * dossier existant), soit le code du type de la demande
5     *
6     * @package openfoncier
7     * @version SVN : $Id: getDemandeInfo.php 4418 2015-02-24 17:30:28Z tbenita $
8     */
9    
10     require_once "../obj/utils.class.php";
11    
12     $f = new utils("nohtml");
13     $f->isAccredited(array("demande","demande_modifier","demande_ajouter"), "OR");
14     $f->disableLog();
15    
16     // Donnees
17     $id_demande_type = ($f->get_submitted_get_value("iddemandetype") != null) ? $f->get_submitted_get_value("iddemandetype") : "";
18     $info = ($f->get_submitted_get_value("info") != null) ? $f->get_submitted_get_value("info") : "";
19    
20    
21     if($id_demande_type != "" AND $info != "") {
22     if($info == "nature") {
23     $sql = "SELECT demande_nature.code FROM ".DB_PREFIXE."demande_nature
24     INNER JOIN ".DB_PREFIXE."demande_type
25     ON demande_type.demande_nature=demande_nature.demande_nature
26     WHERE demande_type.demande_type=".$id_demande_type;
27     $nature = $f->db->getOne($sql);
28     $f->addToLog("app/getDemandeInfo.php : db->getOne(\"".$sql."\")", VERBOSE_MODE);
29     $f->isDatabaseError($nature);
30     echo $nature;
31     }
32     if($info == "contraintes") {
33     $sql = "SELECT demande_type.contraintes FROM ".DB_PREFIXE."demande_type
34     WHERE demande_type.demande_type=".$id_demande_type;
35     $type = $f->db->getOne($sql);
36     $f->addToLog("app/getDemandeInfo.php : db->getOne(\"".$sql."\")", VERBOSE_MODE);
37     $f->isDatabaseError($type);
38     echo $type;
39     }
40     }
41    
42     ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26