41 |
$this->val[array_search("avis_consultation",$this->champs)] != $val["avis_consultation"] OR |
$this->val[array_search("avis_consultation",$this->champs)] != $val["avis_consultation"] OR |
42 |
$this->val[array_search("date_retour",$this->champs)] != $val["date_retour"] OR |
$this->val[array_search("date_retour",$this->champs)] != $val["date_retour"] OR |
43 |
$this->val[array_search("motivation",$this->champs)] != $val["motivation"] OR |
$this->val[array_search("motivation",$this->champs)] != $val["motivation"] OR |
44 |
$this->val[array_search("fichier",$this->champs)] != $val["fichier"] ) |
$this->val[array_search("fichier",$this->champs)] != $val["fichier"]) |
45 |
) { |
) { |
46 |
$this->valF["lu"]=false; |
$this->valF["lu"]=false; |
47 |
} |
} |
48 |
|
} |
49 |
|
|
50 |
|
function verifier($val, &$db, $DEBUG) { |
51 |
|
parent::verifier($val, $db, $DEBUG); |
52 |
// Si le fichier envoye est different de l'existant |
// Si le fichier envoye est different de l'existant |
53 |
if (isset($this->val[array_search("fichier",$this->champs)]) |
if (isset($this->val[array_search("fichier",$this->champs)]) |
54 |
&& $this->val[array_search("fichier",$this->champs)] != $val["fichier"] |
&& $this->val[array_search("fichier",$this->champs)] != $val["fichier"] |
70 |
// Sinon on supprime le fichier dans tmp |
// Sinon on supprime le fichier dans tmp |
71 |
// on reinitialise le nom du fichier a l'ancienne valeur |
// on reinitialise le nom du fichier a l'ancienne valeur |
72 |
} else { |
} else { |
73 |
|
$this->correct = false; |
74 |
$this->addToMessage($res); |
$this->addToMessage($res); |
75 |
unlink("../tmp/".$this->valF['fichier']); |
unlink("../tmp/".$this->valF['fichier']); |
76 |
$this->valF['fichier']=$this->val[array_search("fichier",$this->champs)]; |
$this->valF['fichier']=$this->val[array_search("fichier",$this->champs)]; |
135 |
$form->setType('fichier', 'tmpUpload'); |
$form->setType('fichier', 'tmpUpload'); |
136 |
} else { |
} else { |
137 |
// Si non on affiche uniquement le nom du fichier |
// Si non on affiche uniquement le nom du fichier |
138 |
$form->setType('fichier', 'hiddenstatic'); |
$form->setType('fichier', 'tmpUploadStatic'); |
139 |
} |
} |
140 |
|
|
141 |
// Modification layout : écran de retour d'avis permettant |
// Modification layout : écran de retour d'avis permettant |
154 |
} |
} |
155 |
|
|
156 |
} |
} |
157 |
|
// MODE - CONSULTER |
158 |
|
if ( $maj == 3 ) { |
159 |
|
$form->setType('fichier', 'tmpUploadStatic'); |
160 |
|
} |
161 |
//// On cache la clé primaire |
//// On cache la clé primaire |
162 |
//$form->setType('consultation', 'hidden'); |
//$form->setType('consultation', 'hidden'); |
163 |
} |
} |
321 |
echo _("Retour"); |
echo _("Retour"); |
322 |
// |
// |
323 |
echo "</a>\n"; |
echo "</a>\n"; |
|
|
|
324 |
} |
} |
325 |
|
|
326 |
|
/** |
327 |
|
* Méthode de verification d'accèssibilité de la consultation |
328 |
|
* à l'utilisateur connecté |
329 |
|
*/ |
330 |
|
function canAccess() { |
331 |
|
if($this->f->isUserServiceExt()) { |
332 |
|
// On compare l'id du service de la consultation |
333 |
|
// aux id des services de utilisateur connecté |
334 |
|
foreach($this->f->om_utilisateur['service'] as $service) { |
335 |
|
if($this->val[array_search("service",$this->champs)]===$service['service']) { |
336 |
|
return true; |
337 |
|
} |
338 |
|
} |
339 |
|
} |
340 |
|
return false; |
341 |
|
} |
342 |
}// fin classe |
}// fin classe |
343 |
?> |
?> |