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