907 |
return $res_bool; |
return $res_bool; |
908 |
|
|
909 |
} |
} |
910 |
|
|
911 |
//Retourne la valeur de valF si $restrictionValue n'est pas un chiffre, |
/** |
912 |
//le chiffre sinon |
* Récupère la valeur du champ dans la restriction |
913 |
|
* @param string $restrictionValue Nom du champ |
914 |
|
* @return mixed Valeur du champ |
915 |
|
*/ |
916 |
function getRestrictionValue($restrictionValue){ |
function getRestrictionValue($restrictionValue){ |
917 |
|
|
918 |
|
// Initialisation de la valeur de retour |
919 |
$return = false; |
$return = false; |
920 |
|
|
921 |
|
// Récupére les valeurs du dossier |
922 |
|
$value_dossier = $this->get_dossier_actual(); |
923 |
|
|
924 |
|
// |
925 |
if (is_numeric($restrictionValue)) { |
if (is_numeric($restrictionValue)) { |
926 |
$return = $restrictionValue; |
$return = $restrictionValue; |
927 |
|
}elseif (isset($value_dossier[$restrictionValue])) { |
928 |
|
$return = $value_dossier[$restrictionValue]; |
929 |
}elseif (isset($this->valF[$restrictionValue])) { |
}elseif (isset($this->valF[$restrictionValue])) { |
930 |
$return = $this->valF[$restrictionValue]; |
$return = $this->valF[$restrictionValue]; |
931 |
} |
} |
932 |
|
|
933 |
|
// Retourne la valeur du champ |
934 |
return $return; |
return $return; |
935 |
} |
} |
936 |
|
|
2069 |
} |
} |
2070 |
return $statut; |
return $statut; |
2071 |
} |
} |
2072 |
|
|
2073 |
|
/** |
2074 |
|
* Récupère les données du dossier |
2075 |
|
* @return array |
2076 |
|
*/ |
2077 |
|
function get_dossier_actual() { |
2078 |
|
|
2079 |
|
// Initialisation de la valeur de retour |
2080 |
|
$return = array(); |
2081 |
|
|
2082 |
|
// Récupération de toutes les valeurs du dossier d'instruction en cours |
2083 |
|
$sql = "SELECT * FROM ".DB_PREFIXE."dossier |
2084 |
|
WHERE dossier='".$this->valF['dossier']."'"; |
2085 |
|
$res = $this->db->query($sql); |
2086 |
|
$this->addToLog("get_dossier_actual(): db->query(\"".$sql."\");", VERBOSE_MODE); |
2087 |
|
$this->f->isDatabaseError($res); |
2088 |
|
|
2089 |
|
// |
2090 |
|
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) { |
2091 |
|
|
2092 |
|
// Récupération de la valeur actuelle du délai, de l'accord tacite, |
2093 |
|
// de l'état et de l'avis du dossier d'instruction |
2094 |
|
$return['archive_delai']=$row['delai']; |
2095 |
|
$return['archive_accord_tacite']=$row['accord_tacite']; |
2096 |
|
$return['archive_etat']=$row['etat']; |
2097 |
|
$return['archive_avis']=$row['avis_decision']; |
2098 |
|
// Récupération de la valeur actuelle des 9 dates du dossier |
2099 |
|
// d'instruction |
2100 |
|
$return['archive_date_complet']=$row['date_complet']; |
2101 |
|
$return['archive_date_dernier_depot']=$row['date_dernier_depot']; |
2102 |
|
$return['archive_date_rejet']= $row['date_rejet']; |
2103 |
|
$return['archive_date_limite']= $row['date_limite']; |
2104 |
|
$return['archive_date_notification_delai']= $row['date_notification_delai']; |
2105 |
|
$return['archive_date_decision']= $row['date_decision']; |
2106 |
|
$return['archive_date_validite']= $row['date_validite']; |
2107 |
|
$return['archive_date_achevement']= $row['date_achevement']; |
2108 |
|
$return['archive_date_chantier']= $row['date_chantier']; |
2109 |
|
$return['archive_date_conformite']= $row['date_conformite']; |
2110 |
|
$return['archive_incompletude']= $row['incompletude']; |
2111 |
|
$return['archive_evenement_suivant_tacite']= $row['evenement_suivant_tacite']; |
2112 |
|
$return['archive_evenement_suivant_tacite_incompletude']= $row['evenement_suivant_tacite_incompletude']; |
2113 |
|
$return['archive_etat_pendant_incompletude']= $row['etat_pendant_incompletude']; |
2114 |
|
$return['archive_date_limite_incompletude']= $row['date_limite_incompletude']; |
2115 |
|
$return['archive_delai_incompletude']= $row['delai_incompletude']; |
2116 |
|
$return['archive_autorite_competente']= $row['autorite_competente']; |
2117 |
|
$return['duree_validite']= $row['duree_validite']; |
2118 |
|
} |
2119 |
|
|
2120 |
|
// Retour de la fonction |
2121 |
|
return $return; |
2122 |
|
|
2123 |
|
} |
2124 |
|
|
2125 |
}// fin classe |
}// fin classe |
2126 |
?> |
?> |