function alert_error($error_code) { switch ($error_code) { case "wrong_access": ErrMsg("잘못된 접근방식입니다."); break; case "fail_upload": ErrMsg("업로드가 안되었습니다.\\n\\n다시 업로드하여 주세요."); break; case "not_upload": ErrMsg("업로드할 수 없는 파일입니다."); break; case "not_musicupload": ErrMsg("저작권 문제의 소지가 있는 mp3, wma, asf 형식의 음악파일첨부는 하실 수 없습니다."); break; case "not_access": ErrMsg("접근 권한이 없습니다."); break; case "not_exist": ErrMsg("게시판이 존재하지 않습니다."); break; case "not_login": ErrMsg("회원님만이 게시물을 보실 수 있습니다.\\n\\n로그인을 먼저 하여 주세요."); break; case "not_admin_word": ErrMsg("운영상 금지어 입니다."); break; case "not_passwd": ErrMsg("입력하신 비밀번호가 맞지 않습니다.\\n\\n확인하시고 다시 입력하여 주세요."); break; case "not_id_passwd": ErrMsg("아이디나 비밀번호가 일치하지 않습니다.\\n\\n다시 확인하시고 로그인하여 주세요."); break; case "not_data": ErrMsg("해당 자료가 존재하지 않습니다."); break; case "not_file": ErrMsg("해당 파일이나 경로가 존재하지 않습니다."); break; case "badword": ErrMsg("욕설 및 타인에게 혐오감을 주는 단어는 금지됩니다."); break; case "only_image": ErrMsg("gif, jpg, jpeg, png, bmp 파일만 업로드하실 수 있습니다."); break; case "not_open": ErrMsg("임시 폐쇄되었습니다."); break; case "not_use": ErrMsg("사용중이지 않습니다."); break; case "not_down": ErrMsg("다운로드 권한이 없습니다."); break; case "fail_makefolder": ErrMsg("이미 생성되어진 폴더가 있습니다."); break; case "duplicate_file": //동영상, mp3 업로드 중복체크 ErrMsg("중복된 파일이 있습니다.\\n\\n다른 이름으로 수정 후 업로드 하여 주세요."); break; case "sql_error": ErrMsg("에러가 발생하였습니다."); break; /* case "sql_error" : $err_no = mysql_errno(); $err_msg = mysql_error(); $error_msg = "error_code " . $err_no . " : " . $err_msg; $error_msg = addslashes($error_msg); ErrMsg($error_msg); break; */ } }
$name = addslashes($_POST['name']); $phone = addslashes($_POST['phone']); $mobile1 = addslashes($_POST['mobile1']); $mobile2 = addslashes($_POST['mobile2']); $mobile3 = addslashes($_POST['mobile3']); if ($mobile1 != "" && $mobile2 != "" && $mobile3 != "") { $mobile = $mobile1 . "-" . $mobile2 . "-" . $mobile3; } //중복아이디 체크 시작 $sql = "select idx from tbl_admin"; $sql .= " where id = '{$id}'"; $result = $db->query($sql); $rows = mysqli_num_rows($result); if ($rows > 0) { $alert_msg = $id . "은(는) 이미 존재하는 아이디입니다.\\n\\n새로운 아이디로 가입하여 주세요."; ErrMsg($alert_msg); } //중복아이디 체크 끝 $uniqid = get_admin_uniqid(); $userip = $_SERVER['REMOTE_ADDR']; $table = "tbl_admin"; $idx_field = "idx"; $db['use_YN'] = $use_YN; $db['uniqid'] = $uniqid; $db['id'] = $id; $db['passwd'] = "(hex(aes_encrypt('{$passwd}', '{$encrypt_code}')))"; $db['name'] = $name; $db['phone'] = $phone; $db['mobile'] = $mobile; $db['userip'] = $userip; $db['regdate'] = $nowdate;