35 |
$sql=str_replace("<idx>",$this->getParameter("idx_dossier"), |
$sql=str_replace("<idx>",$this->getParameter("idx_dossier"), |
36 |
$sql_infos_dossier); |
$sql_infos_dossier); |
37 |
$res = $this->db->query($sql); |
$res = $this->db->query($sql); |
38 |
$this->addToLog("demande -> getValFromDossier() : ".$sql); |
$this->f->addToLog("getValFromDossier(): db->query(\"".$sql."\")", VERBOSE_MODE); |
39 |
$this->f->isDatabaseError(); |
if ( database::isError($res)){ |
40 |
|
die(); |
41 |
|
} |
42 |
$row = & $res->fetchRow(DB_FETCHMODE_ASSOC); |
$row = & $res->fetchRow(DB_FETCHMODE_ASSOC); |
43 |
return $row; |
return $row; |
44 |
} |
} |
78 |
if(!isset($this->postedIdDemandeur["petitionnaire_principal"]) OR |
if(!isset($this->postedIdDemandeur["petitionnaire_principal"]) OR |
79 |
empty($this->postedIdDemandeur["petitionnaire_principal"])) { |
empty($this->postedIdDemandeur["petitionnaire_principal"])) { |
80 |
$this->correct = false; |
$this->correct = false; |
81 |
$this->addToMessage("La saisie d'un petitionnaire principal est obligatoire."); |
$this->addToMessage(_("La saisie d'un petitionnaire principal est obligatoire.")); |
82 |
} |
} |
83 |
} |
} |
84 |
|
|
93 |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
94 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
95 |
|
|
96 |
//Récupération de paramètre pour le rechargement ajax du select |
// Si en ajout |
97 |
$idx_dossier = $this->getParameter("idx_dossier"); |
if ($maj == 0) { |
98 |
$datd = $this->getParameter("datd"); |
//Récupération de paramètre pour le rechargement ajax du select |
99 |
|
$idx_dossier = $this->getParameter("idx_dossier"); |
100 |
$contenu = array(); |
$datd = $this->getParameter("datd"); |
101 |
|
|
102 |
// Ajout de filtre sur la requête (initial) |
$contenu = array(); |
103 |
if(isset($idx_dossier) AND $idx_dossier != "") { |
|
104 |
$sql_demande_type .= " WHERE demande_type.demande_nature = 2 "; |
$sql_demande_type = "SELECT demande_type.demande_type, demande_type.libelle FROM ".DB_PREFIXE."demande_type |
105 |
|
LEFT OUTER JOIN ".DB_PREFIXE."lien_demande_type_etat_dossier_autorisation |
106 |
|
ON lien_demande_type_etat_dossier_autorisation.demande_type=demande_type.demande_type |
107 |
|
LEFT OUTER JOIN ".DB_PREFIXE."dossier_autorisation |
108 |
|
ON lien_demande_type_etat_dossier_autorisation.etat_dossier_autorisation= |
109 |
|
dossier_autorisation.etat_dossier_autorisation |
110 |
|
LEFT OUTER JOIN ".DB_PREFIXE."dossier |
111 |
|
ON dossier.dossier_autorisation=dossier_autorisation.dossier_autorisation"; |
112 |
|
|
113 |
|
|
114 |
|
// Ajout de filtre sur la requête (initial) |
115 |
|
if(isset($idx_dossier) AND $idx_dossier != "") { |
116 |
|
$sql_demande_type .= " WHERE demande_type.demande_nature = 2 "; |
117 |
|
|
118 |
// ajout du numéro de dossier existant pour tester l'état du DA |
// ajout du numéro de dossier existant pour tester l'état du DA |
119 |
$sql_demande_type .= "AND dossier.dossier = '".$idx_dossier."' "; |
$sql_demande_type .= "AND dossier.dossier = '".$idx_dossier."' "; |
120 |
} else { |
} else { |
121 |
$sql_demande_type .= " WHERE demande_type.demande_nature = 1 "; |
$sql_demande_type .= " WHERE demande_type.demande_nature = 1 "; |
122 |
} |
} |
123 |
if(isset($_POST["dossier_autorisation_type_detaille"]) AND $_POST["dossier_autorisation_type_detaille"] != "") { |
if(isset($_POST["dossier_autorisation_type_detaille"]) AND $_POST["dossier_autorisation_type_detaille"] != "") { |
124 |
$datd = $_POST["dossier_autorisation_type_detaille"]; |
$datd = $_POST["dossier_autorisation_type_detaille"]; |
125 |
} |
} |
126 |
// Ajout de filtre sur la requête (dossier_autorisation_type_detaille) |
// Ajout de filtre sur la requête (dossier_autorisation_type_detaille) |
127 |
if(isset($datd) AND $datd != "") { |
if(isset($datd) AND $datd != "") { |
|
$sql_demande_type .= " AND demande_type.dossier_autorisation_type_detaille = ".$datd; |
|
|
} else { |
|
|
$datd = $this->getVal("dossier_autorisation_type_detaille"); |
|
|
if ($datd != "") { |
|
128 |
$sql_demande_type .= " AND demande_type.dossier_autorisation_type_detaille = ".$datd; |
$sql_demande_type .= " AND demande_type.dossier_autorisation_type_detaille = ".$datd; |
129 |
|
} else { |
130 |
|
$datd = $this->getVal("dossier_autorisation_type_detaille"); |
131 |
|
if ($datd != "") { |
132 |
|
$sql_demande_type .= " AND demande_type.dossier_autorisation_type_detaille = ".$datd; |
133 |
|
} |
134 |
} |
} |
135 |
} |
$sql_demande_type .= " ORDER BY demande_type.libelle"; |
136 |
|
$res = $db->query($sql_demande_type); |
137 |
|
|
138 |
$res = $db->query($sql_demande_type); |
// logger |
139 |
|
$this->f->addToLog("setSelect(): db->query(\"".$sql_demande_type."\");", |
140 |
|
VERBOSE_MODE); |
141 |
|
if ( database::isError($res)){ |
142 |
|
die(); |
143 |
|
} |
144 |
|
|
145 |
// logger |
$contenu[0][0] = ''; |
146 |
$this->addToLog("setSelect()[gen/obj]: db->query(\"".$sql_demande_type."\");", |
$contenu[1][0] = _('choisir')." "._("demande_type"); |
|
VERBOSE_MODE); |
|
|
$this->f->isDatabaseError($res); |
|
147 |
|
|
148 |
$contenu[0][0] = ''; |
$k=1; |
149 |
$contenu[1][0] = _('choisir')." "._("demande_type"); |
while($row =& $res->fetchRow()){ |
150 |
|
|
151 |
$k=1; |
$contenu[0][$k] = $row[0]; |
152 |
while($row =& $res->fetchRow()){ |
$contenu[1][$k] = $row[1]; |
153 |
|
$k++; |
154 |
|
} |
155 |
|
|
156 |
$contenu[0][$k] = $row[0]; |
$form->setSelect("demande_type", $contenu); |
|
$contenu[1][$k] = $row[1]; |
|
|
$k++; |
|
157 |
} |
} |
158 |
|
|
|
$form->setSelect("demande_type", $contenu); |
|
|
|
|
159 |
} |
} |
160 |
/* |
/* |
161 |
* Ajout du fielset |
* Ajout du fielset |
198 |
*/ |
*/ |
199 |
function setOnchange(&$form,$maj){ |
function setOnchange(&$form,$maj){ |
200 |
parent::setOnchange($form,$maj); |
parent::setOnchange($form,$maj); |
201 |
|
|
202 |
$form->setOnchange("dossier_autorisation_type_detaille","changeDemandeType();"); |
$form->setOnchange("dossier_autorisation_type_detaille","changeDemandeType();"); |
203 |
$form->setOnchange("demande_type","showFormsDemande();"); |
$form->setOnchange("demande_type","showFormsDemande();"); |
204 |
} |
} |
261 |
$sql = "SELECT count(*) FROM ".DB_PREFIXE."etat_dossier_autorisation |
$sql = "SELECT count(*) FROM ".DB_PREFIXE."etat_dossier_autorisation |
262 |
WHERE etat_dossier_autorisation = ".$id_etat_initial_da; |
WHERE etat_dossier_autorisation = ".$id_etat_initial_da; |
263 |
$count = $this->db->getOne($sql); |
$count = $this->db->getOne($sql); |
264 |
$this->addToLog("ajoutDossierAutorisation() getOne() : ".$sql); |
$this->f->addToLog("ajoutDossierAutorisation() : db->getOne(\"".$sql."\")", VERBOSE_MODE); |
265 |
$this->f->isDatabaseError($count); |
if ( database::isError($count)){ |
266 |
|
die(); |
267 |
|
} |
268 |
if($count != 1) { |
if($count != 1) { |
269 |
$error = true; |
$error = true; |
270 |
} else { |
} else { |
396 |
AND now()>=om_validite_debut |
AND now()>=om_validite_debut |
397 |
AND dossier_instruction_type=".$dossier_instruction_type; |
AND dossier_instruction_type=".$dossier_instruction_type; |
398 |
$valInstr['cerfa'] = $db->getOne($sql); |
$valInstr['cerfa'] = $db->getOne($sql); |
399 |
$this->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
$this->f->addToLog("ajoutDossierInstruction() : db->getone(\"".$sql."\");", VERBOSE_MODE); |
400 |
|
if ( database::isError($valInstr['cerfa'])){ |
401 |
|
die(); |
402 |
|
} |
403 |
$dossier->ajouter($valInstr, $db, $DEBUG); |
$dossier->ajouter($valInstr, $db, $DEBUG); |
|
$this->f->isDatabaseError(); |
|
404 |
// Liaison du dossier ajouter à la demande |
// Liaison du dossier ajouter à la demande |
405 |
$this->valF['dossier_instruction'] = $dossier->valF['dossier']; |
$this->valF['dossier_instruction'] = $dossier->valF['dossier']; |
406 |
} |
} |
423 |
|
|
424 |
// Ajout des données techniques |
// Ajout des données techniques |
425 |
$donnees_techniques->ajouter($val, $db, $DEBUG); |
$donnees_techniques->ajouter($val, $db, $DEBUG); |
|
$this->f->isDatabaseError(); |
|
426 |
} |
} |
427 |
|
|
428 |
/** |
/** |
429 |
* Ajout des liens demandeurs / dossier d'autorisation |
* Ajout des liens demandeurs / dossier d'autorisation s'ils n'y sont pas déjà |
430 |
**/ |
**/ |
431 |
function ajoutLiensDossierAutorisation($id, &$db, $val, $DEBUG) { |
function ajoutLiensDossierAutorisation($id, &$db, $val, $DEBUG) { |
432 |
// Création des liens entre le dossier autorisation et les demandeurs |
// Création des liens entre le dossier autorisation et les demandeurs |
434 |
require_once '../obj/lien_dossier_autorisation_demandeur.class.php'; |
require_once '../obj/lien_dossier_autorisation_demandeur.class.php'; |
435 |
$ldad = new lien_dossier_autorisation_demandeur("]",$db,$DEBUG); |
$ldad = new lien_dossier_autorisation_demandeur("]",$db,$DEBUG); |
436 |
// Recupération des demandeurs liés à la demande |
// Recupération des demandeurs liés à la demande |
437 |
$sql = str_replace("<demande>",$this->valF['demande'],$sql_lien_demande_demandeur); |
$sql = str_replace("<demande>",$this->valF['demande'],$sql_lien_demande_demandeur. |
438 |
|
" AND lien_demande_demandeur.demandeur NOT IN ( |
439 |
|
SELECT lien_dossier_autorisation_demandeur.demandeur |
440 |
|
FROM ".DB_PREFIXE."lien_dossier_autorisation_demandeur |
441 |
|
WHERE lien_dossier_autorisation_demandeur.dossier_autorisation = |
442 |
|
'".$this->valF['dossier_autorisation']."' |
443 |
|
)"); |
444 |
$res = $db->query($sql); |
$res = $db->query($sql); |
445 |
$this->f->addToLog("demande.class.php: db->query(\"".$sql."\");", VERBOSE_MODE); |
$this->f->addToLog("ajoutLiensDossierAutorisation() : db->query(\"".$sql."\");", VERBOSE_MODE); |
446 |
$this->f->isDatabaseError(); |
if ( database::isError($res)){ |
447 |
|
die(); |
448 |
|
} |
449 |
while($row = &$res->fetchRow(DB_FETCHMODE_ASSOC)) { |
while($row = &$res->fetchRow(DB_FETCHMODE_ASSOC)) { |
450 |
$row['lien_dossier_autorisation_demandeur'] = NULL; |
$row['lien_dossier_autorisation_demandeur'] = NULL; |
451 |
$row['dossier_autorisation'] = $this->valF['dossier_autorisation']; |
$row['dossier_autorisation'] = $this->valF['dossier_autorisation']; |
464 |
// Recupération des demandeurs liés à la demande |
// Recupération des demandeurs liés à la demande |
465 |
$sql = str_replace("<demande>",$this->valF['demande'],$sql_lien_demande_demandeur); |
$sql = str_replace("<demande>",$this->valF['demande'],$sql_lien_demande_demandeur); |
466 |
$res = $db->query($sql); |
$res = $db->query($sql); |
467 |
$this->f->addToLog("demande.class.php: db->query(\"".$sql."\");", VERBOSE_MODE); |
$this->f->addToLog("ajoutLiensDossierInstruction() : db->query(\"".$sql."\");", VERBOSE_MODE); |
468 |
$this->f->isDatabaseError(); |
if ( database::isError($res)){ |
469 |
|
die(); |
470 |
|
} |
471 |
while($row = &$res->fetchRow(DB_FETCHMODE_ASSOC)) { |
while($row = &$res->fetchRow(DB_FETCHMODE_ASSOC)) { |
472 |
$row['lien_dossier_demandeur'] = NULL; |
$row['lien_dossier_demandeur'] = NULL; |
473 |
$row['dossier'] = $this->valF['dossier_instruction']; |
$row['dossier'] = $this->valF['dossier_instruction']; |
491 |
$this->addToLog("demande.class.php : ".$sql." execute <br>", EXTRA_VERBOSE_MODE); |
$this->addToLog("demande.class.php : ".$sql." execute <br>", EXTRA_VERBOSE_MODE); |
492 |
|
|
493 |
$res = $this->db->query($sql); |
$res = $this->db->query($sql); |
494 |
$this->f->isDatabaseError($res); |
$this->f->addToLog("getArrondissement() : db->query(\"".$sql."\")", VERBOSE_MODE); |
495 |
|
if ( database::isError($res)){ |
496 |
|
die(); |
497 |
|
} |
498 |
|
|
499 |
if( $res->numrows() > 0 ) { |
if( $res->numrows() > 0 ) { |
500 |
|
|
521 |
demande_type = $demande_type"; |
demande_type = $demande_type"; |
522 |
|
|
523 |
$res = $this->db->query($sql); |
$res = $this->db->query($sql); |
524 |
$this->f->isDatabaseError($res); |
$this->f->addToLog("getEvenement() : db->query(\"".$sql."\")", VERBOSE_MODE); |
525 |
|
if ( database::isError($res)){ |
526 |
|
die(); |
527 |
|
} |
528 |
|
|
529 |
if ( $res->numrows() > 0 ){ |
if ( $res->numrows() > 0 ){ |
530 |
|
|
551 |
evenement = $evenement"; |
evenement = $evenement"; |
552 |
|
|
553 |
$res = $this->db->query($sql); |
$res = $this->db->query($sql); |
554 |
$this->f->isDatabaseError($res); |
$this->f->addToLog("getLettreType() : db->query(\"".$sql."\")", VERBOSE_MODE); |
555 |
|
if ( database::isError($res)){ |
556 |
|
die(); |
557 |
|
} |
558 |
|
|
559 |
if ( $res->numrows() > 0 ){ |
if ( $res->numrows() > 0 ){ |
560 |
|
|
572 |
include '../sql/pgsql/demande.form.inc.php'; |
include '../sql/pgsql/demande.form.inc.php'; |
573 |
if($this->valF["demande_type"] != NULL) { |
if($this->valF["demande_type"] != NULL) { |
574 |
$res = $db->query(str_replace('<idx>', $this->valF['demande_type'], $sql_demande_type_details_by_id)); |
$res = $db->query(str_replace('<idx>', $this->valF['demande_type'], $sql_demande_type_details_by_id)); |
575 |
$this->f->isDatabaseError(); |
$this->f->addToLog("triggerAjouter() : db->query(\"".str_replace('<idx>', $this->valF['demande_type'], $sql_demande_type_details_by_id)."\")", VERBOSE_MODE); |
576 |
|
if ( database::isError($res)){ |
577 |
|
die(); |
578 |
|
} |
579 |
|
// Attribut permettant de définir si un dossier a été créé |
580 |
|
$this->ajoutDI = FALSE; |
581 |
$dossier_type = $res->fetchRow(DB_FETCHMODE_ASSOC); |
$dossier_type = $res->fetchRow(DB_FETCHMODE_ASSOC); |
582 |
// Création du dossier_autorisation |
// Création du dossier_autorisation |
583 |
if($this->valF['dossier_autorisation'] == "") { |
if($this->valF['dossier_autorisation'] == "") { |
584 |
$this->ajoutDossierAutorisation($id, $db, $val, $DEBUG); |
$this->ajoutDossierAutorisation($id, $db, $val, $DEBUG); |
585 |
$this -> addToMessage(_("Creation du dossier d'autorisation no").$this->valF['dossier_autorisation']); |
$this -> addToMessage(_("Creation du dossier d'autorisation no").$this->valF['dossier_autorisation']); |
586 |
} |
} |
587 |
|
// Enregistrement du numéro dossier existant (il sera écrasé si un DI est créé) |
588 |
|
if ($this->getParameter("idx_dossier") != "") { |
589 |
|
$this->valF['dossier_instruction'] = $this->getParameter("idx_dossier"); |
590 |
|
} |
591 |
// Création du dossier d'instruction |
// Création du dossier d'instruction |
592 |
if($dossier_type['dossier_instruction_type'] != NULL) { |
if($dossier_type['dossier_instruction_type'] != NULL) { |
593 |
$this->ajoutDossierInstruction($id, $db, $val, $DEBUG, $dossier_type['dossier_instruction_type']); |
$this->ajoutDossierInstruction($id, $db, $val, $DEBUG, $dossier_type['dossier_instruction_type']); |
594 |
$this -> addToMessage(_("Creation du dossier d'instruction no").$this->valF['dossier_instruction']); |
$this -> addToMessage(_("Creation du dossier d'instruction no").$this->valF['dossier_instruction']); |
595 |
|
// Attribut permettant de définir si un dossier a été créé. |
596 |
|
$this->ajoutDI = TRUE; |
597 |
|
|
598 |
//Ajout des données techniques au dossier d'instruction |
//Ajout des données techniques au dossier d'instruction |
599 |
$this->ajoutDonneesTechniques($id, $db, $val, $DEBUG); |
$this->ajoutDonneesTechniques($id, $db, $val, $DEBUG); |
670 |
$valInstr['date_retour_controle_legalite']=NULL; |
$valInstr['date_retour_controle_legalite']=NULL; |
671 |
$valInstr['signataire_arrete']=NULL; |
$valInstr['signataire_arrete']=NULL; |
672 |
$valInstr['numero_arrete']=NULL; |
$valInstr['numero_arrete']=NULL; |
673 |
|
$valInstr['code_barres']=NULL; |
674 |
|
$valInstr['om_fichier_instruction']=NULL; |
675 |
|
$valInstr['om_final_instruction']=NULL; |
676 |
|
$valInstr['document_numerise']=NULL; |
677 |
|
|
678 |
/*Fichier requis*/ |
/*Fichier requis*/ |
679 |
require_once '../obj/instruction.class.php'; |
require_once '../obj/instruction.class.php'; |
683 |
$instruction->valF = ""; |
$instruction->valF = ""; |
684 |
$instruction->ajouter($valInstr, $db, $DEBUG); |
$instruction->ajouter($valInstr, $db, $DEBUG); |
685 |
|
|
686 |
|
//Finalisation du document |
687 |
|
$_GET['obj']='instruction'; |
688 |
|
$_GET['idx']=$instruction->valF[$instruction->clePrimaire]; |
689 |
|
$instruction = new instruction($_GET['idx'],$db,$DEBUG); |
690 |
|
$res = $instruction->finaliser('', 1, '', ''); |
691 |
|
|
692 |
/*Si la création a réussie*/ |
/*Si la création a réussie*/ |
693 |
if ( $instruction->valF['instruction'] != "" ){ |
if ( $instruction->valF['instruction'] != "" ){ |
694 |
|
|
696 |
$this->valF['instruction_recepisse'] = $instruction->valF['instruction']; |
$this->valF['instruction_recepisse'] = $instruction->valF['instruction']; |
697 |
$this -> addToMessage("<br/><a |
$this -> addToMessage("<br/><a |
698 |
class='lien' |
class='lien' |
699 |
href='../pdf/pdflettretype.php?obj=".$lettretype."&idx=".$instruction->valF['instruction']."' |
href='" |
700 |
|
.((isset($res['pdf'])&&$instruction->valF['om_final_instruction'])?$res['pdf']: |
701 |
|
"../pdf/pdflettretype.php?obj=".$lettretype."&idx=".$instruction->valF['instruction'])."' |
702 |
target='_blank'> |
target='_blank'> |
703 |
<span |
<span |
704 |
class=\"om-icon om-icon-16 om-icon-fix pdf-16\" |
class=\"om-icon om-icon-16 om-icon-fix pdf-16\" |
731 |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
732 |
|
|
733 |
// Ajout des lliens entre dossier_autorisation et demandeur |
// Ajout des lliens entre dossier_autorisation et demandeur |
734 |
if(!empty($this->valF['dossier_autorisation']) AND $val['dossier_autorisation'] == "" ) { |
if(!empty($this->valF['dossier_autorisation'])) { |
735 |
$this->ajoutLiensDossierAutorisation($id, $db, $val, $DEBUG); |
$this->ajoutLiensDossierAutorisation($id, $db, $val, $DEBUG); |
736 |
} |
} |
737 |
// Ajout des lliens entre dossier et demandeur |
// Ajout des lliens entre dossier et demandeur |
738 |
if(!empty($this->valF['dossier_instruction'])) { |
if($this->ajoutDI === TRUE) { |
739 |
$this->ajoutLiensDossierInstruction($id, $db, $val, $DEBUG); |
$this->ajoutLiensDossierInstruction($id, $db, $val, $DEBUG); |
740 |
} |
} |
741 |
|
|
787 |
$sqlDemandeurs = "SELECT * FROM ".DB_PREFIXE."lien_lot_demandeur |
$sqlDemandeurs = "SELECT * FROM ".DB_PREFIXE."lien_lot_demandeur |
788 |
WHERE lot = ".$rowLot['lot']; |
WHERE lot = ".$rowLot['lot']; |
789 |
$res = $db -> query($sqlDemandeurs); |
$res = $db -> query($sqlDemandeurs); |
790 |
$this->f->addToLog("db->query(\"".$sqlDemandeurs."\");", VERBOSE_MODE); |
$this->f->addToLog("lienLotDossierInstruction() : db->query(\"".$sqlDemandeurs."\");", VERBOSE_MODE); |
791 |
$this->f->isDatabaseError($res); |
if ( database::isError($res)){ |
792 |
|
die(); |
793 |
|
} |
794 |
|
|
795 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
796 |
$valLld["lien_lot_demandeur"] = ""; |
$valLld["lien_lot_demandeur"] = ""; |
879 |
// Execution de la requete de suppression de l'objet |
// Execution de la requete de suppression de l'objet |
880 |
$res = $db->query($sql); |
$res = $db->query($sql); |
881 |
// Logger |
// Logger |
882 |
$this->f->addToLog("supprimer(): db->query(\"".$sql."\");", VERBOSE_MODE); |
$this->f->addToLog("deleteLinkDemandeDemandeur(): db->query(\"".$sql."\");", VERBOSE_MODE); |
883 |
$this->f->isDatabaseError(); |
if ( database::isError($res)){ |
884 |
|
die(); |
885 |
|
} |
886 |
|
|
887 |
} |
} |
888 |
|
|
895 |
WHERE demande = ".$this->valF['demande']. |
WHERE demande = ".$this->valF['demande']. |
896 |
"AND demandeur = ".$idDemandeur; |
"AND demandeur = ".$idDemandeur; |
897 |
$count = $this->f->db->getOne($sql); |
$count = $this->f->db->getOne($sql); |
898 |
$this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
$this->f->addToLog("isLinkDemandeDemandeurExist() : db->getone(\"".$sql."\");", VERBOSE_MODE); |
899 |
$this->f->isDatabaseError($count); |
if ( database::isError($count)){ |
900 |
|
die(); |
901 |
|
} |
902 |
if ($count === 0) { |
if ($count === 0) { |
903 |
return false; |
return false; |
904 |
} else { |
} else { |
948 |
WHERE ".$from." = '".$id."'"; |
WHERE ".$from." = '".$id."'"; |
949 |
$res = $this->f->db->query($sql); |
$res = $this->f->db->query($sql); |
950 |
$this->f->addToLog("listeDemandeur(): db->query(\"".$sql."\")", VERBOSE_MODE); |
$this->f->addToLog("listeDemandeur(): db->query(\"".$sql."\")", VERBOSE_MODE); |
951 |
$this->f->isDatabaseError($res); |
if ( database::isError($res)){ |
952 |
|
die(); |
953 |
|
} |
954 |
// Stockage du résultat dans un tableau |
// Stockage du résultat dans un tableau |
955 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
956 |
if ($row['petitionnaire_principal'] == 't' AND |
if ($row['petitionnaire_principal'] == 't' AND |
1161 |
demande = $id"; |
demande = $id"; |
1162 |
|
|
1163 |
$res = $this->f->db->query($sql); |
$res = $this->f->db->query($sql); |
1164 |
$this->f->addToLog("triggerSupprimer() : ".$sql); |
$this->f->addToLog("triggerSupprimer() : db->query(\"".$sql."\")"); |
1165 |
$this->f->isDatabaseError($res); |
if ( database::isError($res)){ |
1166 |
|
die(); |
1167 |
|
} |
1168 |
} |
} |
1169 |
|
|
1170 |
// }}} |
// }}} |