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 |
$sql_demande_type = "SELECT demande_type.demande_type, demande_type.libelle FROM ".DB_PREFIXE."demande_type |
$contenu = array(); |
103 |
LEFT OUTER JOIN ".DB_PREFIXE."lien_demande_type_etat_dossier_autorisation |
|
104 |
ON lien_demande_type_etat_dossier_autorisation.demande_type=demande_type.demande_type |
$sql_demande_type = "SELECT demande_type.demande_type, demande_type.libelle FROM ".DB_PREFIXE."demande_type |
105 |
LEFT OUTER JOIN ".DB_PREFIXE."dossier_autorisation |
LEFT OUTER JOIN ".DB_PREFIXE."lien_demande_type_etat_dossier_autorisation |
106 |
ON lien_demande_type_etat_dossier_autorisation.etat_dossier_autorisation= |
ON lien_demande_type_etat_dossier_autorisation.demande_type=demande_type.demande_type |
107 |
dossier_autorisation.etat_dossier_autorisation |
LEFT OUTER JOIN ".DB_PREFIXE."dossier_autorisation |
108 |
LEFT OUTER JOIN ".DB_PREFIXE."dossier |
ON lien_demande_type_etat_dossier_autorisation.etat_dossier_autorisation= |
109 |
ON dossier.dossier_autorisation=dossier_autorisation.dossier_autorisation"; |
dossier_autorisation.etat_dossier_autorisation |
110 |
|
LEFT OUTER JOIN ".DB_PREFIXE."dossier |
111 |
// Ajout de filtre sur la requête (initial) |
ON dossier.dossier_autorisation=dossier_autorisation.dossier_autorisation"; |
112 |
if(isset($idx_dossier) AND $idx_dossier != "") { |
|
113 |
$sql_demande_type .= " WHERE demande_type.demande_nature = 2 "; |
|
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 |
$sql_demande_type .= " ORDER BY demande_type.libelle"; |
$res = $db->query($sql_demande_type); |
|
$res = $db->query($sql_demande_type); |
|
137 |
|
|
138 |
// logger |
// logger |
139 |
$this->f->addToLog("setSelect(): db->query(\"".$sql_demande_type."\");", |
$this->f->addToLog("setSelect(): db->query(\"".$sql_demande_type."\");", |
140 |
VERBOSE_MODE); |
VERBOSE_MODE); |
141 |
if ( database::isError($res)){ |
if ( database::isError($res)){ |
142 |
die(); |
die(); |
143 |
} |
} |
|
|
|
|
$contenu[0][0] = ''; |
|
|
$contenu[1][0] = _('choisir')." "._("demande_type"); |
|
144 |
|
|
145 |
$k=1; |
$contenu[0][0] = ''; |
146 |
while($row =& $res->fetchRow()){ |
$contenu[1][0] = _('choisir')." "._("demande_type"); |
147 |
|
|
148 |
$contenu[0][$k] = $row[0]; |
$k=1; |
149 |
$contenu[1][$k] = $row[1]; |
while($row =& $res->fetchRow()){ |
|
$k++; |
|
|
} |
|
150 |
|
|
151 |
$form->setSelect("demande_type", $contenu); |
$contenu[0][$k] = $row[0]; |
152 |
|
$contenu[1][$k] = $row[1]; |
153 |
|
$k++; |
154 |
|
} |
155 |
|
|
156 |
|
$form->setSelect("demande_type", $contenu); |
157 |
|
} |
158 |
|
|
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 |
} |
} |
207 |
parent::setLib($form,$maj); |
parent::setLib($form,$maj); |
208 |
//libelle des champs |
//libelle des champs |
209 |
|
|
210 |
$form->setLib('complement',_('terrain_adresse')); |
$form->setLib('terrain_adresse_voie',_('terrain_adresse')); |
211 |
} |
} |
212 |
/* |
/* |
213 |
* Cache le champ terrain_references_cadastrales |
* Cache le champ terrain_references_cadastrales |
228 |
$form->setType('dossier_autorisation_type_detaille', 'selecthiddenstatic'); |
$form->setType('dossier_autorisation_type_detaille', 'selecthiddenstatic'); |
229 |
$form->setType('terrain_references_cadastrales', 'hiddenstatic'); |
$form->setType('terrain_references_cadastrales', 'hiddenstatic'); |
230 |
$form->setType('terrain_adresse_voie_numero', 'hiddenstatic'); |
$form->setType('terrain_adresse_voie_numero', 'hiddenstatic'); |
231 |
$form->setType('complement', 'hiddenstatic'); |
$form->setType('terrain_adresse_voie', 'hiddenstatic'); |
232 |
$form->setType('terrain_adresse_lieu_dit', 'hiddenstatic'); |
$form->setType('terrain_adresse_lieu_dit', 'hiddenstatic'); |
233 |
$form->setType('terrain_adresse_localite', 'hiddenstatic'); |
$form->setType('terrain_adresse_localite', 'hiddenstatic'); |
234 |
$form->setType('terrain_adresse_code_postal', 'hiddenstatic'); |
$form->setType('terrain_adresse_code_postal', 'hiddenstatic'); |
287 |
$valAuto['depot_initial']=$this->dateDBToForm($this->valF['date_demande']); |
$valAuto['depot_initial']=$this->dateDBToForm($this->valF['date_demande']); |
288 |
$valAuto['terrain_references_cadastrales']=$this->valF['terrain_references_cadastrales']; |
$valAuto['terrain_references_cadastrales']=$this->valF['terrain_references_cadastrales']; |
289 |
$valAuto['terrain_adresse_voie_numero']=$this->valF['terrain_adresse_voie_numero']; |
$valAuto['terrain_adresse_voie_numero']=$this->valF['terrain_adresse_voie_numero']; |
290 |
$valAuto['complement']=$this->valF['complement']; |
$valAuto['terrain_adresse_voie']=$this->valF['terrain_adresse_voie']; |
291 |
$valAuto['terrain_adresse_lieu_dit']=$this->valF['terrain_adresse_lieu_dit']; |
$valAuto['terrain_adresse_lieu_dit']=$this->valF['terrain_adresse_lieu_dit']; |
292 |
$valAuto['terrain_adresse_localite']=$this->valF['terrain_adresse_localite']; |
$valAuto['terrain_adresse_localite']=$this->valF['terrain_adresse_localite']; |
293 |
$valAuto['terrain_adresse_code_postal']=$this->valF['terrain_adresse_code_postal']; |
$valAuto['terrain_adresse_code_postal']=$this->valF['terrain_adresse_code_postal']; |
354 |
$valInstr['depot_initial']=$this->dateDBToForm($this->valF['date_demande']); |
$valInstr['depot_initial']=$this->dateDBToForm($this->valF['date_demande']); |
355 |
$valInstr['terrain_references_cadastrales']=$this->valF['terrain_references_cadastrales']; |
$valInstr['terrain_references_cadastrales']=$this->valF['terrain_references_cadastrales']; |
356 |
$valInstr['terrain_adresse_voie_numero']=$this->valF['terrain_adresse_voie_numero']; |
$valInstr['terrain_adresse_voie_numero']=$this->valF['terrain_adresse_voie_numero']; |
357 |
$valInstr['complement']=$this->valF['complement']; |
$valInstr['terrain_adresse_voie']=$this->valF['terrain_adresse_voie']; |
358 |
$valInstr['terrain_adresse_lieu_dit']=$this->valF['terrain_adresse_lieu_dit']; |
$valInstr['terrain_adresse_lieu_dit']=$this->valF['terrain_adresse_lieu_dit']; |
359 |
$valInstr['terrain_adresse_localite']=$this->valF['terrain_adresse_localite']; |
$valInstr['terrain_adresse_localite']=$this->valF['terrain_adresse_localite']; |
360 |
$valInstr['terrain_adresse_code_postal']=$this->valF['terrain_adresse_code_postal']; |
$valInstr['terrain_adresse_code_postal']=$this->valF['terrain_adresse_code_postal']; |
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("ajoutLiensDossierAutorisation() : db->query(\"".$sql."\");", VERBOSE_MODE); |
$this->f->addToLog("ajoutLiensDossierAutorisation() : db->query(\"".$sql."\");", VERBOSE_MODE); |
446 |
if ( database::isError($res)){ |
if ( database::isError($res)){ |
569 |
* Ajout des dossiers |
* Ajout des dossiers |
570 |
**/ |
**/ |
571 |
function triggerAjouter($id, &$db, $val, $DEBUG){ |
function triggerAjouter($id, &$db, $val, $DEBUG){ |
572 |
|
|
573 |
include '../sql/pgsql/demande.form.inc.php'; |
include '../sql/pgsql/demande.form.inc.php'; |
574 |
|
|
575 |
if($this->valF["demande_type"] != NULL) { |
if($this->valF["demande_type"] != NULL) { |
576 |
$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)); |
577 |
$this->f->addToLog("triggerAjouter() : db->query(\"".str_replace('<idx>', $this->valF['demande_type'], $sql_demande_type_details_by_id)."\")", VERBOSE_MODE); |
$this->f->addToLog("triggerAjouter() : db->query(\"".str_replace('<idx>', $this->valF['demande_type'], $sql_demande_type_details_by_id)."\")", VERBOSE_MODE); |
600 |
//Ajout des données techniques au dossier d'instruction |
//Ajout des données techniques au dossier d'instruction |
601 |
$this->ajoutDonneesTechniques($id, $db, $val, $DEBUG); |
$this->ajoutDonneesTechniques($id, $db, $val, $DEBUG); |
602 |
} |
} |
603 |
|
|
604 |
|
// Si le dossier_instruction existe |
605 |
|
if (isset($this->valF['dossier_instruction']) && $this->valF['dossier_instruction'] !== "" ) { |
606 |
|
// Récupère les informations nécessaire pour créer le répertoire de numérisation |
607 |
|
$getInfosForFoldername = $this->getInfosForFoldername($this->valF['dossier_instruction']); |
608 |
|
// Création du répertoire pour la numérisation |
609 |
|
if ($this->createFolder($getInfosForFoldername['dossier_autorisation'], $getInfosForFoldername['code'], $getInfosForFoldername['version']) === false) { |
610 |
|
$this->correct = false; |
611 |
|
// efface les messages précédents |
612 |
|
$this->msg = ''; |
613 |
|
// affiche l'erreur pour l'utilisateur et dans le log |
614 |
|
$this->addToErrors('', _("Le repertoire du dossier d'instruction ne s'est pas cree dans le repertoire de numerisation.")." "._("Veuillez contacter votre administrateur."), _("Le repertoire du dossier d'instruction ne s'est pas cree dans le repertoire de numerisation.")); |
615 |
|
// arrête le traitement entier |
616 |
|
return false; |
617 |
|
} |
618 |
|
} |
619 |
|
|
620 |
/*Création du lien de téléchargement de récépissé de demande*/ |
/*Création du lien de téléchargement de récépissé de demande*/ |
621 |
if ( $this->valF['demande_type'] != "" && is_numeric($this->valF['demande_type']) |
if ( $this->valF['demande_type'] != "" && is_numeric($this->valF['demande_type']) |
665 |
$valInstr['archive_etat_pendant_incompletude']=NULL; |
$valInstr['archive_etat_pendant_incompletude']=NULL; |
666 |
$valInstr['archive_date_limite_incompletude']=NULL; |
$valInstr['archive_date_limite_incompletude']=NULL; |
667 |
$valInstr['archive_delai_incompletude']=NULL; |
$valInstr['archive_delai_incompletude']=NULL; |
668 |
|
$valInstr['archive_autorite_competente']=NULL; |
669 |
$valInstr['complement3']=""; |
$valInstr['complement3']=""; |
670 |
$valInstr['complement4']=""; |
$valInstr['complement4']=""; |
671 |
$valInstr['complement5']=""; |
$valInstr['complement5']=""; |
692 |
$valInstr['code_barres']=NULL; |
$valInstr['code_barres']=NULL; |
693 |
$valInstr['om_fichier_instruction']=NULL; |
$valInstr['om_fichier_instruction']=NULL; |
694 |
$valInstr['om_final_instruction']=NULL; |
$valInstr['om_final_instruction']=NULL; |
695 |
$valInstr['document_arrete']=NULL; |
$valInstr['document_numerise']=NULL; |
696 |
|
|
697 |
/*Fichier requis*/ |
/*Fichier requis*/ |
698 |
require_once '../obj/instruction.class.php'; |
require_once '../obj/instruction.class.php'; |
706 |
$_GET['obj']='instruction'; |
$_GET['obj']='instruction'; |
707 |
$_GET['idx']=$instruction->valF[$instruction->clePrimaire]; |
$_GET['idx']=$instruction->valF[$instruction->clePrimaire]; |
708 |
$instruction = new instruction($_GET['idx'],$db,$DEBUG); |
$instruction = new instruction($_GET['idx'],$db,$DEBUG); |
709 |
$res = $instruction->finaliser('', 1, ''); |
$res = $instruction->finaliser('', 1, '', ''); |
710 |
|
|
711 |
/*Si la création a réussie*/ |
/*Si la création a réussie*/ |
712 |
if ( $instruction->valF['instruction'] != "" ){ |
if ( $instruction->valF['instruction'] != "" ){ |
747 |
* Ajout des délégataires et pétitionnaires |
* Ajout des délégataires et pétitionnaires |
748 |
**/ |
**/ |
749 |
function triggerAjouterApres($id, &$db, $val, $DEBUG){ |
function triggerAjouterApres($id, &$db, $val, $DEBUG){ |
750 |
|
|
751 |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
752 |
|
|
753 |
// Ajout des lliens entre dossier_autorisation et demandeur |
// Ajout des lliens entre dossier_autorisation et demandeur |
754 |
if(!empty($this->valF['dossier_autorisation']) AND $val['dossier_autorisation'] == "" ) { |
if(!empty($this->valF['dossier_autorisation'])) { |
755 |
$this->ajoutLiensDossierAutorisation($id, $db, $val, $DEBUG); |
$this->ajoutLiensDossierAutorisation($id, $db, $val, $DEBUG); |
756 |
} |
} |
757 |
// Ajout des lliens entre dossier et demandeur |
// Ajout des lliens entre dossier et demandeur |
779 |
function lienLotDossierInstruction($id, $db, $val, $DEBUG) { |
function lienLotDossierInstruction($id, $db, $val, $DEBUG) { |
780 |
require_once ("../obj/lot.class.php"); |
require_once ("../obj/lot.class.php"); |
781 |
$lot = new lot("]", $db, $DEBUG); |
$lot = new lot("]", $db, $DEBUG); |
|
require_once ("../obj/lien_dossier_lot.class.php"); |
|
|
$ldl = new lien_dossier_lot("]", $db, $DEBUG); |
|
782 |
require_once ("../obj/lien_lot_demandeur.class.php"); |
require_once ("../obj/lien_lot_demandeur.class.php"); |
783 |
$lld = new lien_lot_demandeur("]", $db, $DEBUG); |
$lld = new lien_lot_demandeur("]", $db, $DEBUG); |
784 |
|
|
793 |
$valLot['lot'] = ""; |
$valLot['lot'] = ""; |
794 |
$valLot['libelle'] = $rowLot['libelle']; |
$valLot['libelle'] = $rowLot['libelle']; |
795 |
$valLot['dossier_autorisation'] = NULL; |
$valLot['dossier_autorisation'] = NULL; |
796 |
|
$valLot['dossier'] = $this->valF['dossier_instruction']; |
797 |
$lot -> ajouter($valLot, $db, $DEBUG); |
$lot -> ajouter($valLot, $db, $DEBUG); |
798 |
|
|
|
//Insertion du lien entre le lot et le dossier d'instruction |
|
|
$valLdl['lien_dossier_lot'] = ""; |
|
|
$valLdl['dossier'] = $this->valF['dossier_instruction']; |
|
|
$valLdl['lot'] = $lot->valF['lot']; |
|
|
$ldl->ajouter($valLdl, $db, $DEBUG); |
|
|
|
|
799 |
//Insertion des liens entre dossier et les lots |
//Insertion des liens entre dossier et les lots |
800 |
$sqlDemandeurs = "SELECT * FROM ".DB_PREFIXE."lien_lot_demandeur |
$sqlDemandeurs = "SELECT * FROM ".DB_PREFIXE."lien_lot_demandeur |
801 |
WHERE lot = ".$rowLot['lot']; |
WHERE lot = ".$rowLot['lot']; |
1001 |
echo "obj=".get_class($this); |
echo "obj=".get_class($this); |
1002 |
if($this->getParameter("retour")=="form") { |
if($this->getParameter("retour")=="form") { |
1003 |
echo "&idx=".$this->getParameter("idx"); |
echo "&idx=".$this->getParameter("idx"); |
1004 |
|
echo "&idz=".$this->getParameter("idz"); |
1005 |
echo "&action=3"; |
echo "&action=3"; |
1006 |
} |
} |
1007 |
} |
} |
1182 |
} |
} |
1183 |
|
|
1184 |
// }}} |
// }}} |
1185 |
|
|
1186 |
|
|
1187 |
|
/** |
1188 |
|
* Cette fonction permet de récupérer les informations nécessaires |
1189 |
|
* à la génération du nom du répertoire |
1190 |
|
* @param string $dossier Identifiant du dossier |
1191 |
|
* @return array Tableau des résultats |
1192 |
|
*/ |
1193 |
|
private function getInfosForFoldername($dossier) { |
1194 |
|
|
1195 |
|
//Requête SQL |
1196 |
|
$sql = "SELECT dossier.dossier_autorisation, dossier_instruction_type.code, dossier.version |
1197 |
|
FROM ".DB_PREFIXE."dossier |
1198 |
|
LEFT JOIN ".DB_PREFIXE."dossier_instruction_type |
1199 |
|
ON dossier_instruction_type.dossier_instruction_type = dossier.dossier_instruction_type |
1200 |
|
WHERE dossier.dossier = '".$dossier."'"; |
1201 |
|
$res = $this->f->db->query($sql); |
1202 |
|
$this->addToLog("getInfosForFoldername() : db->query(".$sql.")", VERBOSE_MODE); |
1203 |
|
database::isError($res); |
1204 |
|
|
1205 |
|
// tableau des résultats |
1206 |
|
$row = $res->fetchRow(DB_FETCHMODE_ASSOC); |
1207 |
|
|
1208 |
|
// retourne le tableau des résultats |
1209 |
|
return $row; |
1210 |
|
} |
1211 |
|
|
1212 |
|
/** |
1213 |
|
* Cette fonction permet la création du répertoire dans le dossier de numérisation |
1214 |
|
* @param string $dossier_autorisation Identifiant dossier d'autorisation |
1215 |
|
* @param string $code Type du dossier d'instruction |
1216 |
|
* @param int $version Numéro de version du dossier |
1217 |
|
* @return boolean Vrai ou Faux |
1218 |
|
*/ |
1219 |
|
private function createFolder($dossier_autorisation, $code, $version) { |
1220 |
|
|
1221 |
|
// génération du nom du répertoire |
1222 |
|
$foldername = $dossier_autorisation.".".$code.$version; |
1223 |
|
|
1224 |
|
// création du répertoire dans le dossier de numérisation |
1225 |
|
if (isset($this->f->config["path_scan"])) { |
1226 |
|
$dir = $this->f->config["path_scan"]."Todo/"; |
1227 |
|
// vérifie que le répêrtoire des "à traiter" existe |
1228 |
|
// et qu'un répertoire du dossier n'existe pas déjà |
1229 |
|
if (is_dir($dir) && !file_exists($dir.$foldername)) { |
1230 |
|
mkdir($dir.$foldername, 0777); |
1231 |
|
// si la création a réussi |
1232 |
|
$this->addToLog("createFolder() : Success", VERBOSE_MODE); |
1233 |
|
return true; |
1234 |
|
} |
1235 |
|
} |
1236 |
|
|
1237 |
|
// en cas d'échec |
1238 |
|
$this->addToLog("createFolder() : Failure", VERBOSE_MODE); |
1239 |
|
return false; |
1240 |
|
} |
1241 |
|
|
1242 |
}// fin classe |
}// fin classe |
1243 |
?> |
?> |