public function formconnectaction() { //$error; if (isset($_POST['connectionEmail']) && isset($_POST['connectionMdp'])) { if (empty($_POST['connectionEmail'])) { echo "4"; } else { if (filter_var($_POST['connectionEmail'], FILTER_VALIDATE_EMAIL) == FALSE) { echo "0"; } else { if (empty($_POST['connectionMdp'])) { echo "2"; } else { $verifmail = 0; foreach (T_e_client_cli::findAll() as $t_e_client_cli) { if ($t_e_client_cli->cli_mel == $_POST['connectionEmail']) { $verifmail = 1; if ($t_e_client_cli->cli_motpasse == $_POST['connectionMdp']) { echo "1"; $client = new T_e_client_cli($t_e_client_cli->cli_id); $_SESSION['client'] = serialize($client); } else { echo "5"; } } } if ($verifmail == 0) { echo "6"; } } } } } else { echo "3"; } }
public function displayAdresseFac() { $this->render("index", T_e_client_cli::findAll()); }
public function index() { $this->render("index", T_e_client_cli::findAll()); }