public function setVilleNom($vil_nom)
 {
     $vil_nom = removeJavascript($vil_nom);
     if (empty($vil_nom)) {
         throw new ExceptionPerso("Le nom d'une ville ne peut être vide !", ExceptionPerso::ERR_VILLE);
     }
     $this->vil_nom = $vil_nom;
 }
 public function setPerPrenom($perPrenom)
 {
     $prenom = removeJavascript($perPrenom);
     if (empty($prenom)) {
         throw new ExceptionPerso("Exception contrôlée, merci de ne pas saisir de javascript !", ExceptionPerso::ERR_PERSONNE);
     }
     $this->per_prenom = $prenom;
 }
Example #3
0
function compressContent($content)
{
    ## this needs loads more testing across systems to be sure
    return $content;
    $content = preg_replace("/\n/", ' ', $content);
    $content = preg_replace("/\r/", '', $content);
    $content = removeJavascript($content);
    $content = stripComments($content);
    ## find some clean way to remove double spacing
    $content = preg_replace("/\t/", ' ', $content);
    while (preg_match('/  /', $content)) {
        $content = preg_replace('/  /', ' ', $content);
    }
    return $content;
}
 public function setCitationLibelle($valeur)
 {
     $libelle = removeJavascript($valeur);
     if (empty($libelle)) {
         throw new ExceptionPerso("Le contenu de la blague ne peut-être vide !", ExceptionPerso::ERR_CITATION);
     }
     $this->cit_libelle = $libelle;
 }