<?php if (!defined('__MAGIC__')) { exit; } $title = Config::Inst()->hp_title; ?> <div class="sub_title"><h2><?php echo $title; ?> 회원로그인</h2></div> <div id="login"> <div class="banner"><a href="http://www.webmona.com/" class="popup"><img src="<?php echo $this->path_img('banner.jpg'); ?> "/></a></div> <div class="form"> <div class="box"> <form method="post" action="<?php echo $this->Link('login_check'); ?> "> <div><img src="<?php echo $this->path_img('ment.gif'); ?> " alt="보안로그인"/></div> <input style="float:right" type="image" src="<?php echo $this->path_img('login_button.gif'); ?>
<?php if (!defined("__MAGIC__")) { exit; } $mb_id = GV::Id('mb_id', 'POST'); if (Config::Inst()->admin == $mb_id) { Dialog::Alert("최고관리자는 질문 답변으로 비밀번호를 찾을수 없습니다."); } $ret = $this->Sql('fetch_by_id', $mb_id); if (!$ret['mb_question']) { Dialog::alert("비밀번호 찾기 질문을 등록하지 않았습니다.\n질문 답변으로 비밀번호를 찾을수 없습니다.\n관리자에게 문의하세요.", Path::Root()); }
if ($main) { $last_id = 'r=' . $root . ',id1=' . $main . ',id2=' . $clear['m_id']; } else { if ($root) { $last_id = 'r=' . $root . ',id1=' . $clear['m_id']; } else { $last_id = 'r=' . $clear['m_id']; } } $tbn_write = Write::Inst()->TBN(); $sql = " SELECT wr_no, last_id FROM {$tbn_write} WHERE bo_no=0 AND last_id LIKE '{$stx}%' "; $write_list = DB::Get()->sql_query_list($sql); foreach ($write_list as $v) { DB::Get()->update($tbn_write, array('last_id' => str_replace($stx, $last_id, $v['last_id'])), " WHERE wr_no='{$v['wr_no']}' "); } //* // 관리자페이지 아이디 변경 체크 if (Config::Inst()->path_admin == $data['m_id']) { $change_admin_page = true; DB::Get()->update(Config::Inst()->TBN(), array('cf_value' => $clear['m_id']), " WHERE cf_id='path_admin' "); } //*/ } // 회원정보 업데이트 $this->Sql('update', GV::Number($this->KN()), $clear); if ($change_admin_page) { Dialog::AlertNReplace("관리자 페이지 주소가 변경되었습니다.\n메인화면으로 이동합니다.", Path::Root()); } else { Url::GoReplace($this->Link('list')); } exit;
<?php if (!defined("__MAGIC__")) { exit; } $m = $this->Sql('fetch', GV::Number($this->KN())); if (Config::Inst('config.php')->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; } /* * action파일 * action.*.php 파일은 Alert을 호출하지 않고 단순한 하나의 행동을하고 * 결과 값을 알려준다. * $result에 결과값을 저장해 줌 * -------------------------- * 회원 이미지 경로 */ $pic_width = Config::Inst()->mb_pic_width; $pic_height = Config::Inst()->mb_pic_height; $list = File::Inst()->mb_no($this->mb_no)->Action('images', $pic_width, $pic_height); if (is_array($list) && sizeof($list) != 0) { $result['is'] = true; $result['file_no'] = $list[0]['file_no']; $result['link'] = $list[0]['link']; } else { $result['is'] = false; $result['link'] = $this->path_img('noimg.gif'); }
<?php } ?> </ul> </div> </li> <?php } ?> </ul> <div id="logo"><a href="<?php echo $root['link']; ?> "><img src="<?php echo $path->path_img('logo.png'); ?> " title="<?php echo Config::Inst()->hp_title; ?> "></a></div> <div class="search" style="display:none;"> <input type="text" name="stx" size="10"/> <input type="image" class="adjust_button_line" src="<?php echo $path->path_img('btn_search_all.gif'); ?> " value="검색"/> </div><!-- .search -->
} // 데이터 폴더 생성 foreach ($cfg['data_folder'] as $k => $v) { @mkdir($k, $v); @chmod($k, $v); $this->msg[] = '디렉토리 [' . $k . '] create -> chmod ' . $v; // 디렉토리에 있는 파일의 목록을 보이지 않게 한다. $file = $k . "/index.php"; $f = @fopen($file, "w"); @fwrite($f, ""); @fclose($f); @chmod($file, 0606); $this->msg[] = '목록방지파일 [' . $file . '] create -> chmod 0606'; } /* 환경설정 정보 입력 */ $tbn_cfg = Config::Inst()->TBN(); /* mysql_query(" INSERT INTO `$tbn_cfg` SET `cf_id` = 'hp_title', `cf_type` = 'str', `cf_value` = '$hp_title', `cf_desc` = '홈페이지 타이틀' "); $this->msg[] = 'insert to config `hp_title`'; //*/ // 관리자 회원가입 $tbn_mb = Member::Inst()->TBN(); mysql_query("\n\t\tINSERT INTO `{$tbn_mb}` \n\t\t\tSET\n\t\t\t`mb_no` = NULL,\n\t\t\t`mb_id` = '{$admin_id}',\n\t\t\t`mb_passwd` = PASSWORD('{$admin_pass}'),\n\t\t\t`mb_nick` = '{$admin_name}',\n\t\t\t`mb_email` = '',\n\t\t\t`mb_level` = 10,\n\t\t\t`mb_grade` = 'admin',\n\t\t\t`mb_memo` = '',\n\t\t\t`mb_datetime` = NOW(),\n\t\t\t`mb_leave` = '0'\n\t");
* $link['링크명']['path'] = '현재주소와 다른 경로값 : 공백이면 현재주소 경로'; * * 함수 추가 파라메터 * delete, update등에서 키값을 활용할때 사용함 * -------------------------------------- * $att[1], $att[2], $att[3] * */ // 링크 생성에 필요한 값들 정의 $mode_name = $this->Mode('name'); // 모드명 $mode = GV::String($mode_name); // 현재모드 $key_name = $this->KN(); // 테이블의 키 이름 $page_id = Config::Inst()->path_member; $link = array(); /* * 회원정보 보기 : 정해진 경로로 이동 */ $link['view']['include'][$mode_name] = 'view'; /* * 로그인 페이지 : 정해진 경로로 이동 */ $link['login']['include'][$mode_name] = 'login'; $link['login']['exclude'][] = $key_name; /* * 회원가입 : 정해진 경로로 이동 */ $link['regist']['include'][$mode_name] = 'regist'; /*
<?php if (!defined("__MAGIC__")) { exit; } /* * action파일 * action.*.php 파일은 Alert을 호출하지 않고 단순한 하나의 행동을하고 * 결과 값을 알려준다. * $result에 결과값을 저장해 줌 * -------------------------- */ $result = array(); if ($this->sub['m_no']) { $result[] = $this->sub['m_id']; } if ($this->main['m_no']) { $result[] = $this->main['m_id']; } $result[] = Config::Inst()->hp_title;
</tr> <?php } if (Config::Inst()->regist_field_signature != 'false') { ?> <tr> <th>서명</th> <td class="left"> <textarea cols="50" rows="5" <?php if (Config::Inst()->regist_field_memo == 'require') { echo 'class="require"'; } ?> 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>
<?php if (!defined('__MAGIC__')) { exit; } $data = $this->data; // 변수명 단축 $list = Config::Inst()->Sql('list'); foreach ($list as $k => $v) { if (in_array($v['cf_id'], $data['cf_id'])) { $list[$k]['selected'] = true; } } ?> <form id="widgetConfig" method="post" action="<?php echo $this->action; ?> "> <input type="hidden" name="wg_skin" value="<?php echo $data['wg_skin']; ?> "/> <table class="table_widget"> <tbody> <tr> <th>위젯 너비</th> <td> <input type="text" name="wg_width" size="4" class="require" alt="위젯너비" value="<?php echo $data['wg_width'];
* version 1.0 * 사용자의 구미에 맞도록 초기설치 제어를 수행함 */ $cfg = array(); // 데이터베이스 정보 $cfg['dbinfo'] = array('host' => 'localhost', 'user' => '', 'password' => '', 'db' => '', 'prefix' => 'm3_'); // 관리자 정보 $cfg['admin_info'] = array('id' => 'admin', 'password' => '', 'password_confirm' => '', 'name' => '최고관리자'); // 홈페이지 기본정보 $cfg['hp_info'] = array('title' => '매직보드'); // data 폴더 목록 // '폴더명'=>'권한값' $cfg['data_folder'] = array(Path::data() => 0707, Path::data_file() => 0707, Path::data('cache') => 0707, Path::data('zmLog') => 0707, Path::data('zmLogConnect') => 0755, Path::data('cheditor') => 0707, Path::data_member() => 0707); // 설치 테이블 정보 // '테이블명'=>'설치모듈 인스턴스' $cfg['tables'] = array('magic' => Magic::Inst(), 'config' => Config::Inst(), 'write' => Write::Inst(), 'board' => Board::Inst(), 'file' => File::Inst(), 'comment' => Comment::Inst(), 'member' => Member::Inst(), 'tag' => Tag::Inst(), 'widget' => Widget::Inst()); /* * 메뉴구성 및 기본 컨텐츠 설정 $cfg['default_data'] = " kr:index =widget:page=write:index.html +메뉴얼:basic =widget:page=write=widget:webclip:sub_title+=widget:page ++영문홈페이지:basic =widget:page=write=widget:webclip:sub_title+=widget:page ++모바일홈페이지:basic =widget:page=write=widget:webclip:sub_title+=widget:page +게시판:basic =widget:page=write=widget:webclip:sub_title+=widget:page ++공지사항:basic =widget:page=write=widget:webclip:sub_title+=widget:write=board:공지 eng:index =widget:page=write:index.html +English Sample:basic =widget:page=write member:member
<?php if (!defined("__MAGIC__")) { exit; } $data = $this->Sql('fetch', GV::Number($this->KN())); if (Config::Inst()->admin == $data['mb_id']) { Dialog::alert("최고관리자는 회원탈퇴할 수 없습니다."); } // 파일들은 지움 $f = File::Inst(); $files = array(); foreach ($f->mb_no($data['mb_no'])->Action('files') as $v) { $files[] = $v['file_no']; } // 삭제해야할 파일들 삭제 foreach ($files as $v) { $f->Action('delete', $v); } $this->Sql('unregist', $data['mb_no']); Url::GoReplace($this->Link('list')); exit;
<?php if (!defined("__MAGIC__")) { exit; } /* * action파일 * action.*.php 파일은 Alert을 호출하지 않고 단순한 하나의 행동을하고 * 결과 값을 알려준다. * $result에 결과값을 저장해 줌 * -------------------------- */ $result = false; if ($this->mb_id == Config::Inst()->admin) { $result = true; }
static function admin($id1 = '', $id2 = '') { $qstr = '?r=' . Config::Inst()->path_admin; if ($id1) { $qstr .= '&id1=' . $id1; if ($id2) { $qstr .= '&id2=' . $id2; } } return self::Root($qstr); }
<?php if (!defined('__MAGIC__')) { exit; } $v = Widget::Inst()->Action('data_explode', $this->wg_no); echo Config::Inst()->update(explode(',', $v['cf_id']))->html();
<?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()); }
<div id="agree"> <div class="ment"> <p>저희 사이트를 방문해 주셔서 감사드립니다.</p> <p>회원가입을 위해서는 아래 약관과 개인정보취급방침에 동의하셔야 절차가 진행됩니다.</p> </div> <h2>홈페이지 이용약관</h2> <textarea cols="10000" rows="10" readonly><?php echo Config::Inst()->termsofuse; ?> </textarea> <input name="terms" type="checkbox" value="1"/> <label>위 내용을 숙지 하였으며 이에 동의합니다.</label> <h2>개인정보 수집 및 이용에 대한 안내</h2> <textarea cols="10000" rows="10" readonly><?php echo Config::Inst()->privacyofuse; ?> </textarea> <input name="privacy" type="checkbox" value="1"/> <label>위 내용을 숙지 하였으며 이에 동의합니다.</label> <div class="buttons"> <input type="image" class="adjuse_button_line" src="<?php echo $this->path_img('btn_agree.gif'); ?> " alt="동의"/> <a href="<?php echo Path::Root(); ?> "><img src="<?php echo $this->path_img('btn_agree_cancel.gif'); ?>
<?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; } $cfg = array(); /* * 기본값 */ if (Config::Inst()->hp_title) { $cfg['title'][0] = Config::Inst()->hp_title; } $cfg['title'] = Magic::Inst()->Action('title_chain'); $cfg['script'] = Scripts::Get(); $cfg['style'] = Styles::Get();