function checkInputdata() { switch ($this->mode) { case 'add': if (!$this->oMgr->checkEmpty($this->request['sendon_addr'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "転送先アドレス"); } else { if (!string::checkMailAddr($this->request['sendon_addr'])) { // エラーメッセージをセット $this->oMgr->setErr('E006', "転送先アドレス"); } else { if ($this->oMgr->existsSendonAddr($this->request['sendon_addr'])) { // エラーメッセージをセット $this->oMgr->setErr('E018', "転送先アドレス"); } } } break; case 'passwd': if (!$this->oMgr->checkEmpty($this->request['login_passwd'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "現在のパスワード"); } else { if (!$this->oMgr->checkCurrentPasswd($this->request['login_passwd'])) { $this->oMgr->setErr('E006', "現在のパスワード"); } else { if (!$this->oMgr->checkEmpty($this->request['new_login_passwd'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "新しいパスワード"); } else { if (!$this->oMgr->checkEmpty($this->request['new_login_passwd_conf'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "新しいパスワード(確認用)"); } else { if ($this->request['new_login_passwd'] != $this->request['new_login_passwd_conf']) { // エラーメッセージをセット $this->oMgr->setErr('E501'); } else { $passwd = $this->request['new_login_passwd']; if (!string::checkAlphanumWide($passwd, 6, 20) || !ereg("[0-9]", $passwd) || !ereg("[a-z]", $passwd) || !ereg("[A-Z]", $passwd)) { $param = array(); $param[0] = "パスワード"; $param[1] = "数字、英字大文字、英字小文字を各1文字以上使用し、6~20文字"; // エラーメッセージをセット $this->oMgr->setErr('E004', $param); } } } } } } break; case 'passwdSalary': if (!$this->oMgr->checkEmpty($this->request['new_salary_passwd'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "新しいパスワード"); } else { if (!$this->oMgr->checkEmpty($this->request['new_salary_passwd_conf'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "新しいパスワード(確認用)"); } else { if ($this->request['new_salary_passwd'] !== $this->request['new_salary_passwd_conf']) { // エラーメッセージをセット $this->oMgr->setErr('E501'); } else { $passwd = $this->request['new_salary_passwd']; if (!string::checkAlphanumWide($passwd, 6, 20) || !ereg("[0-9a-zA-Z]", $passwd)) { $param = array(); $param[0] = "パスワード"; $param[1] = "数字、英字大文字、英字小文字を使用し、6~20文字"; // エラーメッセージをセット $this->oMgr->setErr('E004', $param); } } } } break; } // エラーなし if (sizeof($this->oMgr->aryErrMsg) == 0) { return true; } // エラー発生 $this->errMsg = $this->oMgr->getErrMsg(); return false; }
function checkInputdata() { // メールアドレス if (!$this->oMgr->checkEmpty($this->request['mail_addr'])) { // $this->oMgr->setErr('E001', "メールアドレス"); } else { if (!string::checkMailAddr($this->request['mail_addr'])) { // エラーメッセージをセット $this->oMgr->setErr('E006', "メールアドレス"); } else { if ($this->oMgr->existsMailAddr($this->request['mail_addr'], $this->request['mlist_id'])) { $this->oMgr->setErr('E017', "メールアドレス"); } } } $sender_kbn = $this->oMgr->getSenderKbn($this->request['mlist_id']); if ($sender_kbn == SENDER_KBN_LIMIT && $this->mlist_kbn != MLIST_KBN_AUTO) { if (!$this->oMgr->checkEmpty($this->request['sender_flg']) && !$this->oMgr->checkEmpty($this->request['recipient_flg'])) { // エラーメッセージをセット $this->oMgr->setErr('E007', "受信または送信"); } } // エラーなし if (sizeof($this->oMgr->aryErrMsg) == 0) { return true; } // エラー発生 $this->errMsg = $this->oMgr->getErrMsg(); return false; }
function checkOldmailAddr() { $user_id = $this->request['user_id']; $oldmail_addr = $this->request['oldmail_addr']; if (!$this->oMgr->checkEmpty($oldmail_addr)) { // エラーメッセージをセット $this->oMgr->setErr('E001', "エイリアスアドレス"); } else { if (!string::checkMailAddr($oldmail_addr)) { // エラーメッセージをセット $this->oMgr->setErr('E006', "エイリアスアドレス"); } else { if (ereg("[A-Z]", $oldmail_addr)) { // エラーメッセージをセット $param = array(); $param[0] = "エイリアスアドレス"; $param[1] = "英字大文字"; $this->oMgr->setErr('E020', $param); } else { if ($this->oMgr->existsOldmailAddr($oldmail_addr, $user_id)) { // エラーメッセージをセット $this->oMgr->setErr('E018', "エイリアスアドレス"); } } } } // エラーなし if (sizeof($this->oMgr->aryErrMsg) == 0) { return true; } // エラー発生 $this->errMsg = $this->oMgr->getErrMsg(); return false; }
function checkInputdata() { // メールアドレス if (!$this->oMgr->checkEmpty($this->request['mail_addr'])) { // $this->oMgr->setErr('E001', "メールアドレス"); } else { if (!string::checkMailAddr($this->request['mail_addr'])) { // エラーメッセージをセット $this->oMgr->setErr('E006', "メールアドレス"); } } //else if ($this->oMgr->existsMailAddr($this->request['mail_addr'], $this->request['vpn_id'])) //{ // $this->oMgr->setErr('E017',"メールアドレス"); //} // パスワード // 新規登録の場合は、パスワードのチェックは不要 if (!$this->oMgr->checkEmpty($this->request['passwd'])) { // 編集の場合 if ($this->request['vpn_user_id'] != "") { $this->oMgr->setErr('E001', "パスワード"); } } else { $passwd = $this->request['passwd']; if (!string::checkAlphanumWide($passwd, 6, 20) || !ereg("[0-9]", $passwd) || !ereg("[a-z]", $passwd) || !ereg("[A-Z]", $passwd)) { $param = array(); $param[0] = "パスワード"; $param[1] = "数字、英字大文字、英字小文字を各1文字以上使用し、6~20文字"; // エラーメッセージをセット $this->oMgr->setErr('E004', $param); } } // 有効期限 if (!$this->oMgr->checkEmpty($this->request['expiry_date'])) { // $this->oMgr->setErr('E001', "有効期限"); } else { if (!$this->oMgr->checkDateFormat($this->request['expiry_date'])) { // エラーメッセージをセット $param = array(); $param[0] = "有効期限"; $param[1] = "yyyy/mm/dd"; $this->oMgr->setErr('E004', $param); $has_date_err = true; } else { if (!$this->oMgr->checkDate($this->request['expiry_date'])) { // エラーメッセージをセット $this->oMgr->setErr('E013', "有効期限"); $has_date_err = true; } } } // エラーなし if (sizeof($this->oMgr->aryErrMsg) == 0) { return true; } // エラー発生 $this->errMsg = $this->oMgr->getErrMsg(); return false; }