public function setMdp($mdp)
 {
     global $regex_FR_LANG_WITH_NUMBERS;
     if (!isValidString($mdp, regex_FR_LANG_WITH_NUMBERS, 1, 20)) {
         throw new Exception("Erreur, le mot de passe doit être de minimum 8 caractère, et maximum 20" . "erreur alphanumérique");
     }
     $this->mdp = empty($mdp) ? "" : $mdp;
 }
Exemplo n.º 2
0
 public function setTexte($texte)
 {
     global $regex_FR_LANG_WITH_NUMBERS;
     if (!isValidString($texte, regex_FR_LANG_WITH_NUMBERS, 1, 3000)) {
         throw new Exception("Erreur ... ... ..." . " (...)");
     }
     $this->texte = empty($texte) ? "" : $texte;
 }
 public function setExpFav($expFav)
 {
     global $regex_FR_LANG_WITH_NUMBERS;
     if (!isValidString($expFav, regex_FR_LANG_WITH_NUMBERS, 1, 10)) {
         throw new Exception("Erreur ... ... ..." . " (...)");
     }
     $this->expFav = empty($expFav) ? "" : $expFav;
 }
Exemplo n.º 4
0
function isValidAddress($address)
{
    if (isValidString($address)) {
        $addresscheck = explode(" ", trim($address));
        if (!isset($addresscheck[2])) {
            return false;
        } else {
            return true;
        }
    } else {
        return false;
    }
}
Exemplo n.º 5
0
             $sql_teste = $sql_teste . "i.nome = '" . $image . "'";
             $primeiro = false;
         } else {
             $sql_teste = $sql_teste . " OR i.nome = '" . $image . "'";
         }
     }
     $count++;
 }
 exec("rm -f scripts/" . $name . ".out");
 $sql_teste = $sql_teste . ") GROUP BY c.texto ORDER BY q DESC";
 $result = mysql_query($sql_teste);
 echo "Have you been looking for more...?";
 $count = 0;
 while (($row = mysql_fetch_array($result)) && $count < 10) {
     $string = $row['texto'];
     if (isValidString($string, $array)) {
         echo " <span class='fake-link' onclick=searchForLink('" . $string . "')>" . $string . "</span> ";
         $count++;
     }
 }
 echo "<br>";
 if ($aux > 0) {
     for ($i = 0; $i < $aux; $i++) {
         echo "<img src='images/" . $select_images[$i] . ".jpg' id = 'images' onclick='image_click(this)'\\>\n";
     }
 }
 echo "<script> document.getElementById('result').innerHTML = '";
 if ($f_count > 0) {
     echo $f_count . " similar image(s) found.";
 } else {
     echo "No images found.";
Exemplo n.º 6
0
    die('Connection error: (' . $connect->connect_errno . '): ' . $connect->connect_error);
}
?>

<body>

<h1>Validation of Organization Addresses</h1>

<?php 
$sql = "SELECT * FROM organization";
$result = $connect->query($sql) or die($connect->error);
echo '<table border="1"><tr><th>Organization ID</th><th>Organization Name</th><th>Address</th><th>Phone</th></tr>';
while ($result2 = $result->fetch_array(MYSQLI_ASSOC)) {
    if (isValidOrgName($result2['org_name']) && isValidAddress($result2['org_street']) && isValidString($result2['org_state']) && isValidZIPCode($result2['org_zip']) && isValidPhone($result2['org_phone'])) {
    } else {
        echo '<tr><td>' . $result2['org_id'] . '</td><td>' . $result2['org_name'] . '<br>' . formatValid(isValidOrgName($result2['org_name'])) . '</td><td>' . $result2['org_street'] . ", " . $result2['org_city'] . ", " . $result2['org_state'] . " " . $result2['org_zip'] . '<br> Street:' . formatValid(isValidAddress($result2['org_street'])) . '<br>City: ' . formatValid(isValidString($result2['org_state'])) . '<br>ZIP:' . formatValid(isValidZIPCode($result2['org_zip'])) . '</td><td>' . $result2['org_phone'] . '<br>' . formatValid(isValidPhone($result2['org_phone'])) . '</td>';
        echo '</tr>';
    }
}
/* while ($result2 = $result->fetch_array(MYSQLI_ASSOC)) {
	
	echo '<tr><td>' . $result2['org_id'] . '</td><td>' . $result2['org_name'] . '<br>' . formatValid(isValidOrgName($result2['org_name'])) . '</td><td>' . $result2['org_street'] . ", " . $result2['org_city'] . ", " . $result2['org_state'] . " " . $result2['org_zip'] . '<br> Street:' . formatValid(isValidAddress($result2['org_street'])) . '<br>City: ' . formatValid(isValidString($result2['org_state'])) . '<br>ZIP:' . formatValid(isValidZIPCode($result2['org_zip'])) . '</td><td>' . $result2['org_phone'] . '<br>' . formatValid(isValidPhone($result2['org_phone'])) . '</td>';
	
	echo '</tr>';
	
} */
echo '</table>';
?>


</body>