1 |
fmichon |
1005 |
<?php |
2 |
|
|
/** |
3 |
fmichon |
1515 |
* 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$ |
8 |
|
|
*/ |
9 |
nhaye |
1119 |
|
10 |
|
|
require_once "../obj/utils.class.php"; |
11 |
|
|
|
12 |
|
|
// Donnees |
13 |
|
|
$id_demande_type = (isset($_GET['iddemandetype']) ? $_GET['iddemandetype'] : "" ); |
14 |
|
|
$info = (isset($_GET['info']) ? $_GET['info'] : "" ); |
15 |
|
|
|
16 |
|
|
$f = new utils("nohtml"); |
17 |
nhaye |
1122 |
$f->isAccredited(array("demande","demande_modifier","demande_ajouter"), "OR"); |
18 |
|
|
|
19 |
nhaye |
1119 |
$f->disableLog(); |
20 |
|
|
if($id_demande_type != "" AND $info != "") { |
21 |
|
|
if($info == "nature") { |
22 |
|
|
$sql = "SELECT demande_nature.code FROM ".DB_PREFIXE."demande_nature |
23 |
|
|
INNER JOIN ".DB_PREFIXE."demande_type |
24 |
|
|
ON demande_type.demande_nature=demande_nature.demande_nature |
25 |
|
|
WHERE demande_type.demande_type=".$id_demande_type; |
26 |
|
|
$nature = $f->db->getOne($sql); |
27 |
|
|
$f->addToLog($sql); |
28 |
|
|
$f->isDatabaseError(); |
29 |
|
|
echo $nature; |
30 |
|
|
} |
31 |
|
|
if($info == "type") { |
32 |
|
|
$sql = "SELECT demande_type.code FROM ".DB_PREFIXE."demande_type |
33 |
|
|
WHERE demande_type.demande_type=".$id_demande_type; |
34 |
|
|
$type = $f->db->getOne($sql); |
35 |
|
|
$f->addToLog($sql); |
36 |
|
|
$f->isDatabaseError(); |
37 |
|
|
echo $type; |
38 |
|
|
} |
39 |
|
|
} |
40 |
|
|
|
41 |
|
|
?> |