<?php if (!defined("__MAGIC__")) { exit; } $m = $this->Sql('fetch', GV::Number($this->KN())); if (Config::Inst()->admin == $m['mb_id']) { Dialog::Alert("최고관리자는 질문 답변으로 비밀번호를 찾을수 없습니다."); } if ($m['mb_answer'] != $_POST['mb_answer']) { Dialog::Alert('답변이 틀렸습니다.'); } else { $new_passwd = ''; for ($i = 0; $i <= 7; $i++) { $new_passwd .= substr('23456789abcdef', rand(0, 13), 1); } $this->Sql('change_password', $m['mb_no'], $new_passwd); // 비밀번호 바꾸고 바뀐 비밀번호 알려주기 Dialog::alertNReplace("임시 비밀번호는 {$new_passwd} 입니다.\n개인정보에서 꼭 비밀번호를 변경하세요.", $this->Link('login')); }
<?php if(!defined("__MAGIC__")) exit; $clear = $this->Clear(); if(!$clear['wr_content']) Dialog::alert('내용을 입력해 주세요.'); $this->Sql('update', $clear); Dialog::alertNReplace("페이지 수정을 완료 하였습니다.", $this->Link('list'));
if (!$clear['mb_email']) { Dialog::alert("이메일 주소를 입력하세요."); } if ($clear['mb_passwd'] != $_POST['confirm_passwd']) { Dialog::alert("비밀번호 확인이 일치하지 않습니다."); } $clear['mb_passwd'] = $this->Sql('password', $clear['mb_passwd']); $clear['mb_datetime'] = 'NOW()'; $clear['mb_level'] = '2'; $tbn = $this->TBN(); $sql = "\n SELECT\n mb_id,\n mb_nick,\n mb_name,\n mb_email\n FROM {$tbn}\n WHERE\n mb_id='{$clear['mb_id']}' OR\n mb_nick='{$clear['mb_nick']}' OR\n mb_name='{$clear['mb_name']}' OR\n mb_email='{$clear['mb_email']}'\n LIMIT 1\n"; $dup = DB::Get()->sql_fetch($sql); if ($duplication !== false) { if ($dup['mb_id'] == $clear['mb_id']) { Dialog::alertNReplace("동일한 회원아이디가 있습니다.", Path::Group()); } if ($dup['mb_nick'] == $clear['mb_nick']) { Dialog::alertNReplace("동일한 회원닉네임이 있습니다.", Path::Group()); } if ($dup['mb_name'] == $clear['mb_name']) { Dialog::alertNReplace("동일한 회원이름이 있습니다.", Path::Group()); } if ($dup['mb_email'] == $clear['mb_email']) { Dialog::alertNReplace("동일한 이메일 주소가 있습니다.", Path::Group()); } } else { // 회원정보 입력 $this->Sql('insert', $clear); Dialog::alertNReplace("회원가입을 환영합니다.\n가입하신 아이디와 비밀번호로 로그인하세요.", Path::Group()); } exit;
if($clear['wr_password']!=$_POST['wr_password_check']) Dialog::alert('[비밀번호/비밀번호확인]이 일치하지 않습니다.'); if(!$clear['wr_password']) Dialog::alert('비밀번호를 입력해 주세요.'); $clear['wr_password'] = $this->Sql('password', $clear['wr_password']); } else { $clear['wr_writer'] = Member::Inst()->mb_nick; } // 최근게시글을 위해 게시글이 출력되는 아이디를 저장함 $clear['last_id'] = GV::String('id'); if(!$clear['wr_subject']) Dialog::alert('제목을 입력해 주세요.'); if(!$clear['wr_content']) Dialog::alert('내용을 입력해 주세요.'); if(!$clear['wr_writer']) Dialog::alert('글쓴이를 입력해 주세요.'); if($board->bo_use_category) if(!$clear['wr_category']) Dialog::alert('분류를 선택하세요.'); // 업데이트 날짜 $data['wr_update'] = 'NOW()'; DB::Get()->update($tbn, $clear, ' WHERE wr_no='.$key); // 파일 업로드 File::Inst()->Action('upload', $key); $del_files = $_POST[File::Inst()->Config('form_name', 'del')]; if(!is_array($del_files)) $del_files = array(); foreach ($del_files as $v) { File::Inst()->Action('delete', $v); } Dialog::alertNReplace("게시글 수정을 완료 하였습니다.", Url::Get('',$this->Mode('name')));
// 로그인한 회원정보 $m = $this->Action('login_info'); // 수정하지 않을 변수 unset($clear['mb_id']); unset($clear['mb_passwd']); if (!$clear['mb_nick']) { Dialog::alert("별명을 입력하세요."); } // 파일을 업로드 했을 때 이전 파일들은 지움 $f = File::Inst(); $files = array(); if ($_FILES[$f->Config('form_name', 'file')]['name']) { foreach ($f->mb_no($m['mb_no'])->Action('files') as $k => $v) { $files[] = $v['file_no']; } } // 삭제파일 $del_files = $_POST[File::Inst()->Config('form_name', 'del')]; if (!$del_files) { $del_files = array(); } // 삭제해야할 파일들 삭제 foreach (array_merge($files, $del_files) as $v) { $f->Action('delete', $v); } // 파일 업로드 $f->Action('upload', 0); // 회원정보 업데이트 $this->Sql('update', $m['mb_no'], $clear); Dialog::alertNReplace("회원정보가 수정되었습니다.", $this->Link('list')); exit;
<?php if (!defined("__MAGIC__")) { exit; } $this->Action('logout'); if ($_GET['ret_url']) { $url = $_GET['ret_url']; } else { $url = Path::Group(); } Dialog::alertNReplace("정상적으로 로그아웃 되었습니다.\n감사합니다.", $url);
if ($dup['mb_name'] == $clear['mb_name']) { Dialog::alertNReplace("동일한 회원이름이 있습니다.", Path::Group()); } if ($dup['mb_email'] == $clear['mb_email']) { Dialog::alertNReplace("동일한 이메일 주소가 있습니다.", Path::Group()); } } else { // 파일을 업로드 했을 때 이전 파일들은 지움 $f = File::Inst(); $files = array(); if ($_FILES[$f->Config('form_name', 'file')]['name']) { foreach ($f->mb_no($m->mb_no)->Action('files') as $k => $v) { $files[] = $v['file_no']; } } // 삭제파일 $del_files = $_POST[File::Inst()->Config('form_name', 'del')]; if (!$del_files) { $del_files = array(); } // 삭제해야할 파일들 삭제 foreach (array_merge($files, $del_files) as $v) { $f->Action('delete', $v); } // 파일 업로드 $f->Action('upload', 0); // 회원정보 업데이트 $this->Sql('update', $m->mb_no, $clear); Dialog::alertNReplace("회원정보가 수정되었습니다.", Path::Group()); } exit;
<?php if (!defined("__MAGIC__")) { exit; } $check = $this->Can('modify'); if (!$check) { Dialog::alertNReplace("수정권한이 없습니다."); }
<?php if (!defined("__MAGIC__")) { exit; } // 스펨 차단코드 검사 ZSF::Check(); $m = $this->Action('login_info'); $passwd = $this->Sql('password', $_POST['old_passwd']); if ($passwd != $m['mb_passwd']) { Dialog::alert("기존 비밀번호가 맞지 않습니다.\n다시한번 확인하세요."); } $password = GV::Password('mb_passwd'); $password_check = GV::Password('mb_passwd_check'); if (!$password) { Dialog::alert("변경할 비밀번호를 입력하세요."); } if ($password != $password_check) { Dialog::alert("변경할 비밀번호가 일치 하지 않습니다."); } if ($password == $_POST['old_passwd']) { Dialog::alert("이전 비밀번호와 동일합니다."); } $this->Sql('change_password', $password); $this->Action('logout'); Dialog::alertNReplace("비밀번호가 수정되었습니다.\n다시 로그인 하세요.", htmlspecialchars_decode($this->Link('login')));
<?php if (!defined("__MAGIC__")) { exit; } $check = $this->Can('view'); if (!$check) { Dialog::alertNReplace("로그인이 필요한 서비스 입니다.\n로그인 하세요", htmlspecialchars_decode($this->Link('login'))); }