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;
<?php if (!defined("__MAGIC__")) { exit; } $mb_id = GV::Id('mb_id', 'POST'); if (Config::Inst('config.php')->admin == $mb_id) { Dialog::Alert("최고관리자는 질문 답변으로 비밀번호를 찾을수 없습니다."); } $ret = $this->Sql('fetch_by_id', $mb_id); if (!$ret['mb_question']) { Dialog::alert("비밀번호 찾기 질문을 등록하지 않았습니다.\n질문 답변으로 비밀번호를 찾을수 없습니다.\n관리자에게 문의하세요.", Path::Group()); }
<?php if (!defined("__MAGIC__")) { exit; } $key = GV::Number($this->KN()); $file = $this->Sql('fetch', $key); $path = Path::Group($file['file_path']); // 무단 링크 검사 // 무단링크시에는 hotlink.gif이미지를 뿌려준다. $check_hotlink = GV::String(File::hotlink); if (!$check_hotlink || $_SESSION[File::hotlink] != $check_hotlink) { $path = Path::img('hotlink.gif'); } if (file_exists($path)) { header("content-type: {$file['file_type']}"); header("content-length: " . filesize($path)); header("pragma: no-cache"); header("expires: 0"); flush(); $fp = fopen($path, "rb"); while (!feof($fp)) { echo fread($fp, 100 * 1024); flush(); } fclose($fp); flush(); } else { Dialog::Alert("파일을 찾을 수 없습니다."); } exit;
$uploaded_files = array(); $number_of_files = sizeof($_FILES[$fName_file]['tmp_name']); for ($i = 0; $i < $number_of_files; $i++) { if (!$_FILES[$fName_file]['name'][$i]) { continue; } $file_name = $_FILES[$fName_file]['name'][$i]; $type = $_FILES[$fName_file]['type'][$i]; $tmp_name = $_FILES[$fName_file]['tmp_name'][$i]; $size = $_FILES[$fName_file]['size'][$i]; $wr_no = $att[1]; if (is_uploaded_file($tmp_name)) { $real_file_name = $this->Action('realfilename', $file_name); //$this->GenRealFileName($file_name); $upload_path = $this->Config('upload_path'); $dest_file = Path::Group($upload_path . $real_file_name); if (move_uploaded_file($tmp_name, $dest_file)) { chmod($dest_file, 0606); // insert record $insertData['mb_no'] = Member::Inst()->mb_no; $insertData['wr_no'] = $wr_no; $insertData['file_name'] = $file_name; $insertData['file_path'] = $upload_path . $real_file_name; $insertData['file_size'] = $size; $insertData['file_type'] = $type; $insertData['file_datetime'] = Util::GetDatetime(); $uploaded_files[] = DB::Get()->InsertEx($this->TBN(), $insertData); } } } $result = $uploaded_files;
<?php if (!defined("__MAGIC__")) { exit; } // 스펨 차단코드 검사 Captcha::Inst()->Check(); $m = $this->Action('login_info'); $passwd = $this->Sql('password', $_POST['mb_passwd']); if ($passwd != $m['mb_passwd']) { Dialog::alert("기존 비밀번호가 맞지 않습니다.\n다시한번 확인하세요."); } // 파일을 업로드 했을 때 이전 파일들은 지움 $f = File::Inst(); $files = array(); foreach ($f->mb_no($m['mb_no'])->Action('files') as $v) { $files[] = $v['file_no']; } // 삭제해야할 파일들 삭제 foreach ($files as $v) { $f->Action('delete', $v); } $this->Sql('unregist', $m['mb_no'], GV::String('mb_memo')); $this->Action('logout'); Dialog::alert("정상적으로 회원탈퇴 되었습니다.\n그동안 이용해 주셔서 감사합니다.", Path::Group()); exit;
$this->root['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id']); } $this->main['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id'] . '&' . $this->Config('main') . '=' . $this->main['m_id']); $this->sub['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id'] . '&' . $this->Config('main') . '=' . $this->main['m_id'] . '&' . $this->Config('sub') . '=' . $this->sub['m_id']); /* if($this->root['m_id']!='mobile' && $this->root['m_id']!='mobile_member' && Util::checkMobile() && is_dir(Path::Root('magic/skin/Layout/mobile'))) { Url::GoReplace(Path::Root('?r=mobile')); } */ // 현재메뉴 정보를 불러옴 // redirection 정보가 있으면 바로 이동해줌 // redirection 보다는 메뉴주소자체를 바로 바꾸어줌 $menu = ''; if ($sub['m_no']) { $menu = $sub; } else { if ($main['m_no']) { $menu = $main; } else { $menu = $root; } } if (isset($menu['m_redirection']) && $menu['m_redirection']) { Url::GoReplace($menu['m_redirection']); } /* * 테마에 따른 css 입력 * 테마는 관리자에서 설정하도록 추가할 예정 */ Styles::Add(Path::Group('/magic/css/' . $this->Config('theme') . '/jquery-ui-all.css'));
public static function GoHome() { self::Go(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 { // 파일을 업로드 했을 때 이전 파일들은 지움 $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; } $this->Action('logout'); if ($_GET['ret_url']) { $url = $_GET['ret_url']; } else { $url = Path::Group(); } Dialog::alertNReplace("정상적으로 로그아웃 되었습니다.\n감사합니다.", $url);
<?php if (!defined("__MAGIC__")) { exit; } Scripts::Add(Path::Group('magic/js/plugin/external/jquery.cookie.js'));
<?php if (!defined("__MAGIC__")) { exit; } /* * 해당 레이아웃에서 사용할 css/js set */ Styles::Add(Path::Group('magic/css/basic/jquery-ui-all.css')); /* * 페이지 엘리먼트 불러오기 */ $this->header = PageElement::Inst('admin_header')->html(); $this->side = PageElement::Inst('admin_side')->html(); $this->menu = PageElement::Inst('admin_menu')->html(); $this->head = PageElement::Inst('head')->html();
public static function alertGoHome($msg) { self::Alert($msg, Path::Group()); }
/* * 메뉴목록을 재정렬함 */ $list_all = $this->Sql('list'); // 최상위 리스트 구하기 $list = array(); foreach ($list_all as $v) { if ($v['m_parent'] == 0) { $v['children'] = array(); $list[$v['m_no']] = $v; } } // 메인메뉴 구하기 foreach ($list_all as $v) { if ($list[$v['m_parent']]) { $v['children'] = array(); $list[$v['m_parent']]['children'][$v['m_no']] = $v; } } // 서브메뉴 구하기 foreach ($list_all as $v) { foreach ($list as $kk => $vv) { if ($vv['children'][$v['m_parent']]) { $v['children'] = array(); $list[$kk]['children'][$v['m_parent']]['children'][$v['m_no']] = $v; } } } $this->list = $list; Scripts::Add(Path::Group('magic/js/plugin/jquery.jstree.js'));
name="mb_memo"></textarea> <?php if (Config::Inst()->regist_field_memo == 'require') { echo '<span class="require"> [필수입력]</span>'; } ?> </td> </tr> <?php } ?> <tr> <th>자동등록<br/>방지코드 <span class="require">(*)</span></th> <td class="left"><?php echo Captcha::Inst()->MsgPos('right')->html(); ?> </td> </tr> </tbody> </table> <div class="center buttonset"> <input class="button hover" type="submit" value="회원가입"/><input class="button" type="button" value="취소" onclick="location.href='<?php echo Path::Group(); ?> '"/> </div> </div> </form>
<?php if (!defined("__MAGIC__")) { exit; } /* * 링크 정의법 * --------- * $link['링크명']['include']['포함할 쿼리명'] = '쿼리값'; // 포함할 값 * $link['링크명']['exclude'][] = '현재주소에서 제거할 쿼리명'; // 제거할 값 * $link['링크명']['path'] = '현재주소와 다른 경로값 : 공백이면 현재주소 경로'; * * 함수 추가 파라메터 * delete, update등에서 키값을 활용할때 사용함 * -------------------------------------- * $att[1], $att[2], $att[3] * */ // 링크 생성에 필요한 값들 정의 $link = array(); $link['subject']['include'][$this->KN()] = $att[1]; $link['subject']['path'] = Path::Group($this->Config('bo_location'));
<?php if (!defined("__MAGIC__")) { exit; } // 스킨폴더/guidline_for_design.php 파일을 참고하세요 ?> <ul> <li class="first"><img src="<?php echo $this->path_img('menu_icon_00.png'); ?> "/><a href="<?php echo Path::Group('?r=admin'); ?> ">관리자메인</a></li> <?php foreach ($this->menu_main as $v) { ?> <li class="<?php echo $v['active'] ? ' active' : ''; echo $v['last'] ? ' last' : ''; ?> "> <img src="<?php echo $v['icon']; ?> "/> <a href="<?php echo $v['link']; ?> " <?php