private function check_input() { if ($this->mode == 1) { if ($this->check_dupli() > 0) { $this->err_msg[] = "同じルートIDが既に存在します。"; } } $this->err_msg[] = indi_check($this->route_name, "ルート名"); $this->err_msg[] = max_length_check($this->route_name, 50, "名前"); $this->err_msg[] = max_length_check($this->remarks, 100, "備考"); }
private function check_input() { if ($this->mode == 1) { if ($this->check_dupli() > 0) { $this->err_msg[] = "同じアカウントが既に存在します。"; } } $this->err_msg[] = indi_check($this->account, "アカウント"); // hannum_check 半角英数 // $this->err_msg[] = hannum_check($this->account,"アカウント"); // 8文字制限 $this->err_msg[] = max_length_check($this->account, 8, "アカウント"); $this->err_msg[] = indi_check($this->user_name, "名前"); $this->err_msg[] = max_length_check($this->user_name, 30, "名前"); $this->err_msg[] = mail_check($this->mail_address, "E-mail"); $this->err_msg[] = max_length_check($this->mail_address, 50, "E-mail"); }
private function login_check() { //必須チェック $this->err_msg[] = indi_check($this->account, "ユーザーID"); $this->err_msg[] = indi_check($this->passwd, "パスワード"); if (!array_filter($this->err_msg)) { $this->sql = "SELECT * FROM " . TABLE_ACCNT . " WHERE account = ?" . " AND passwd = ?"; $this->prepare(); $this->data_array = array($this->account, $this->passwd); $this->execute(); $row = $this->stmt->fetch(PDO::FETCH_ASSOC); if ($row["account"] == $this->account) { session_destroy(); session_start(); $_SESSION["sesUserID"] = $row["account"]; $_SESSION["sesUserNM"] = $row["user_name"]; $_SESSION["sesAdFlg"] = $row["admin_flg"]; header("Location: top.php"); } else { $this->err_msg[] = "ユーザーIDまたはパスワードが間違っています。"; } } }