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->f->addToLog("setSelect(): db->query(\"".$sql_demande_type."\");", |
$contenu[1][0] = _('choisir')." "._("demande_type"); |
|
VERBOSE_MODE); |
|
|
if ( database::isError($res)){ |
|
|
die(); |
|
|
} |
|
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 |
} |
} |
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); |
578 |
if ( database::isError($res)){ |
if ( database::isError($res)){ |
579 |
die(); |
die(); |
580 |
} |
} |
581 |
|
// Attribut permettant de définir si un dossier a été créé |
582 |
|
$this->ajoutDI = FALSE; |
583 |
$dossier_type = $res->fetchRow(DB_FETCHMODE_ASSOC); |
$dossier_type = $res->fetchRow(DB_FETCHMODE_ASSOC); |
584 |
// Création du dossier_autorisation |
// Création du dossier_autorisation |
585 |
if($this->valF['dossier_autorisation'] == "") { |
if($this->valF['dossier_autorisation'] == "") { |
586 |
$this->ajoutDossierAutorisation($id, $db, $val, $DEBUG); |
$this->ajoutDossierAutorisation($id, $db, $val, $DEBUG); |
587 |
$this -> addToMessage(_("Creation du dossier d'autorisation no").$this->valF['dossier_autorisation']); |
$this -> addToMessage(_("Creation du dossier d'autorisation no").$this->valF['dossier_autorisation']); |
588 |
} |
} |
589 |
|
// Enregistrement du numéro dossier existant (il sera écrasé si un DI est créé) |
590 |
|
if ($this->getParameter("idx_dossier") != "") { |
591 |
|
$this->valF['dossier_instruction'] = $this->getParameter("idx_dossier"); |
592 |
|
} |
593 |
// Création du dossier d'instruction |
// Création du dossier d'instruction |
594 |
if($dossier_type['dossier_instruction_type'] != NULL) { |
if($dossier_type['dossier_instruction_type'] != NULL) { |
595 |
$this->ajoutDossierInstruction($id, $db, $val, $DEBUG, $dossier_type['dossier_instruction_type']); |
$this->ajoutDossierInstruction($id, $db, $val, $DEBUG, $dossier_type['dossier_instruction_type']); |
596 |
$this -> addToMessage(_("Creation du dossier d'instruction no").$this->valF['dossier_instruction']); |
$this -> addToMessage(_("Creation du dossier d'instruction no").$this->valF['dossier_instruction']); |
597 |
|
// Attribut permettant de définir si un dossier a été créé. |
598 |
|
$this->ajoutDI = TRUE; |
599 |
|
|
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']) |
688 |
$valInstr['date_retour_controle_legalite']=NULL; |
$valInstr['date_retour_controle_legalite']=NULL; |
689 |
$valInstr['signataire_arrete']=NULL; |
$valInstr['signataire_arrete']=NULL; |
690 |
$valInstr['numero_arrete']=NULL; |
$valInstr['numero_arrete']=NULL; |
691 |
|
$valInstr['code_barres']=NULL; |
692 |
|
$valInstr['om_fichier_instruction']=NULL; |
693 |
|
$valInstr['om_final_instruction']=NULL; |
694 |
|
$valInstr['document_numerise']=NULL; |
695 |
|
|
696 |
/*Fichier requis*/ |
/*Fichier requis*/ |
697 |
require_once '../obj/instruction.class.php'; |
require_once '../obj/instruction.class.php'; |
701 |
$instruction->valF = ""; |
$instruction->valF = ""; |
702 |
$instruction->ajouter($valInstr, $db, $DEBUG); |
$instruction->ajouter($valInstr, $db, $DEBUG); |
703 |
|
|
704 |
|
//Finalisation du document |
705 |
|
$_GET['obj']='instruction'; |
706 |
|
$_GET['idx']=$instruction->valF[$instruction->clePrimaire]; |
707 |
|
$instruction = new instruction($_GET['idx'],$db,$DEBUG); |
708 |
|
$res = $instruction->finaliser('', 1, '', ''); |
709 |
|
|
710 |
/*Si la création a réussie*/ |
/*Si la création a réussie*/ |
711 |
if ( $instruction->valF['instruction'] != "" ){ |
if ( $instruction->valF['instruction'] != "" ){ |
712 |
|
|
714 |
$this->valF['instruction_recepisse'] = $instruction->valF['instruction']; |
$this->valF['instruction_recepisse'] = $instruction->valF['instruction']; |
715 |
$this -> addToMessage("<br/><a |
$this -> addToMessage("<br/><a |
716 |
class='lien' |
class='lien' |
717 |
href='../pdf/pdflettretype.php?obj=".$lettretype."&idx=".$instruction->valF['instruction']."' |
href='" |
718 |
|
.((isset($res['pdf'])&&$instruction->valF['om_final_instruction'])?$res['pdf']: |
719 |
|
"../pdf/pdflettretype.php?obj=".$lettretype."&idx=".$instruction->valF['instruction'])."' |
720 |
target='_blank'> |
target='_blank'> |
721 |
<span |
<span |
722 |
class=\"om-icon om-icon-16 om-icon-fix pdf-16\" |
class=\"om-icon om-icon-16 om-icon-fix pdf-16\" |
746 |
* Ajout des délégataires et pétitionnaires |
* Ajout des délégataires et pétitionnaires |
747 |
**/ |
**/ |
748 |
function triggerAjouterApres($id, &$db, $val, $DEBUG){ |
function triggerAjouterApres($id, &$db, $val, $DEBUG){ |
749 |
|
|
750 |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
$this->insertLinkDemandeDemandeur($db, $DEBUG); |
751 |
|
|
752 |
// Ajout des lliens entre dossier_autorisation et demandeur |
// Ajout des lliens entre dossier_autorisation et demandeur |
753 |
if(!empty($this->valF['dossier_autorisation']) AND $val['dossier_autorisation'] == "" ) { |
if(!empty($this->valF['dossier_autorisation'])) { |
754 |
$this->ajoutLiensDossierAutorisation($id, $db, $val, $DEBUG); |
$this->ajoutLiensDossierAutorisation($id, $db, $val, $DEBUG); |
755 |
} |
} |
756 |
// Ajout des lliens entre dossier et demandeur |
// Ajout des lliens entre dossier et demandeur |
757 |
if(!empty($this->valF['dossier_instruction'])) { |
if($this->ajoutDI === TRUE) { |
758 |
$this->ajoutLiensDossierInstruction($id, $db, $val, $DEBUG); |
$this->ajoutLiensDossierInstruction($id, $db, $val, $DEBUG); |
759 |
} |
} |
760 |
|
|
1187 |
} |
} |
1188 |
|
|
1189 |
// }}} |
// }}} |
1190 |
|
|
1191 |
|
|
1192 |
|
/** |
1193 |
|
* Cette fonction permet de récupérer les informations nécessaires |
1194 |
|
* à la génération du nom du répertoire |
1195 |
|
* @param string $dossier Identifiant du dossier |
1196 |
|
* @return array Tableau des résultats |
1197 |
|
*/ |
1198 |
|
private function getInfosForFoldername($dossier) { |
1199 |
|
|
1200 |
|
//Requête SQL |
1201 |
|
$sql = "SELECT dossier.dossier_autorisation, dossier_instruction_type.code, dossier.version |
1202 |
|
FROM ".DB_PREFIXE."dossier |
1203 |
|
LEFT JOIN ".DB_PREFIXE."dossier_instruction_type |
1204 |
|
ON dossier_instruction_type.dossier_instruction_type = dossier.dossier_instruction_type |
1205 |
|
WHERE dossier.dossier = '".$dossier."'"; |
1206 |
|
$res = $this->f->db->query($sql); |
1207 |
|
$this->addToLog("getInfosForFoldername() : db->query(".$sql.")", VERBOSE_MODE); |
1208 |
|
database::isError($res); |
1209 |
|
|
1210 |
|
// tableau des résultats |
1211 |
|
$row = $res->fetchRow(DB_FETCHMODE_ASSOC); |
1212 |
|
|
1213 |
|
// retourne le tableau des résultats |
1214 |
|
return $row; |
1215 |
|
} |
1216 |
|
|
1217 |
|
/** |
1218 |
|
* Cette fonction permet la création du répertoire dans le dossier de numérisation |
1219 |
|
* @param string $dossier_autorisation Identifiant dossier d'autorisation |
1220 |
|
* @param string $code Type du dossier d'instruction |
1221 |
|
* @param int $version Numéro de version du dossier |
1222 |
|
* @return boolean Vrai ou Faux |
1223 |
|
*/ |
1224 |
|
private function createFolder($dossier_autorisation, $code, $version) { |
1225 |
|
|
1226 |
|
// génération du nom du répertoire |
1227 |
|
$foldername = $dossier_autorisation.".".$code.$version; |
1228 |
|
|
1229 |
|
// création du répertoire dans le dossier de numérisation |
1230 |
|
if (isset($this->f->config["path_scan"])) { |
1231 |
|
$dir = $this->f->config["path_scan"]."Todo/"; |
1232 |
|
// vérifie que le répêrtoire des "à traiter" existe |
1233 |
|
// et qu'un répertoire du dossier n'existe pas déjà |
1234 |
|
if (is_dir($dir) && !file_exists($dir.$foldername)) { |
1235 |
|
mkdir($dir.$foldername, 0777); |
1236 |
|
// si la création a réussi |
1237 |
|
$this->addToLog("createFolder() : Success", VERBOSE_MODE); |
1238 |
|
return true; |
1239 |
|
} |
1240 |
|
} |
1241 |
|
|
1242 |
|
// en cas d'échec |
1243 |
|
$this->addToLog("createFolder() : Failure", VERBOSE_MODE); |
1244 |
|
return false; |
1245 |
|
} |
1246 |
|
|
1247 |
}// fin classe |
}// fin classe |
1248 |
?> |
?> |