<tr> <th class="require">자동등록 방지코드</th> <td> <?php echo Captcha::Inst()->html(); ?> <span class="desc"> - 로봇에 의한 자동회원 가입을 방지합니다.</span> </td> </tr> </tbody> </table> <div class="center"> <input type="image" class="adjust_button_line" src="<?php echo $this->path_img('btn_regist.gif'); ?> " alt="회원가입"/> <a href="<?php echo Path::Root(); ?> "><img src="<?php echo $this->path_img('btn_cancel.gif'); ?> " alt="취소"/></a> </div> </div><!-- #regist --> </form>
<?php if (!defined("__MAGIC__")) { exit; } /* * action파일 * action.*.php 파일은 Alert을 호출하지 않고 단순한 하나의 행동을하고 * 결과 값을 알려준다. * $result에 결과값을 저장해 줌 * -------------------------- */ $result = array(); foreach ($this->list_sub as $v) { $v['popup'] = false; if ($v['m_redirection']) { $v['link'] = $v['m_redirection']; if (strpos($v['m_redirection'], 'http://') !== false) { $v['popup'] = true; } } else { $v['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id'] . '&' . $this->Config('main') . '=' . $this->main['m_id'] . '&' . $this->Config('sub') . '=' . $v['m_id']); } $result[$v['m_order'] . $v['m_no']] = $v; }
* -------------------------------------- * $att[1], $att[2], $att[3] * */ // 링크 생성에 필요한 값들 정의 $mode_name = $this->Mode('name'); // 모드명 $mode = GV::String($mode_name); // 현재모드 $key_name = $this->KN(); // 테이블의 키 이름 $link = array(); /* * 로그인 페이지 : 정해진 경로로 이동 */ $link['login']['include'][$mode_name] = 'login'; $link['login']['exclude'][] = $key_name; $link['login']['exclude'][] = 'id1'; $link['login']['exclude'][] = 'id2'; /* * 로그인 아이디/비번 체크 : 정해진 경로로 이동 */ $link['login_check']['include'][$mode_name] = 'login_check'; /* * 로그아웃 : 정해진 경로로 이동 */ $link['logout']['include'][$mode_name] = 'logout'; $link['logout']['path'] = Path::Root(); foreach ($link as $k => $v) { $link[$k]['include']['r'] = 'mobile_member'; }
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;
public static function GoRoot() { self::Go(Path::Root()); }
/** * Fires off a controller web request in the background. This is used for triggering long running actions that don't require the user waiting. * * @param string controllerPath The full url to execute. * @param array $post Optional post data to accompany the request * @static */ public static function TriggerBackgroundTask($url, $post = null) { if ($url[0] != '/') { $url = "/{$url}"; } $key = uniqid(); $keypath = Path::Root("/cache/{$key}.srvskey"); touch($keypath); if (!file_exists($keypath)) { throw new Exception("Background process could not be triggered, access key could not be written"); } if (is_array($post)) { $post['SRVSKEY'] = $key; } else { $post = array('SRVSKEY' => $key); } //initiate the transaction. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, WebPath::Absolute('/srvs' . $url)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 1); //end the request immediately (one second), execution will continue. curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); if (curl_exec($ch) === false && file_exists($keypath)) { unlink($keypath); throw new Exception("Background process could not be triggered: " . curl_error($ch)); } curl_close($ch); }
<?php if (!defined("__MAGIC__")) { exit; } // 쿠키 사용을 위해서 Scripts::Add(Path::Root('magic/js/plugin/external/jquery.cookie.js'));
<?php if (!defined("__MAGIC__")) { exit; } /* * action파일 * action.*.php 파일은 Alert을 호출하지 않고 단순한 하나의 행동을하고 * 결과 값을 알려준다. * $result에 결과값을 저장해 줌 * -------------------------- */ /* * 루트 목록을 구함 */ $result = array(); foreach ($this->list_root as $v) { $v['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id']); if ($this->root['m_no'] == $v['m_no']) { $v['active'] = true; } $result[$v['m_order'] . $v['m_no']] = $v; } ksort($result);
<?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()); }
<?php if (!defined("__MAGIC__")) { exit; } $this->logo = Layout::Inst('admin')->path_img('logo.png'); $this->logo_link = Path::Root('?r=admin'); $this->link_logout = Member::Inst()->Link('logout'); $this->link_home = Path::Root(); $this->btn_home = Layout::Inst('admin')->path_img('btn_home.gif'); $this->btn_logout = Layout::Inst('admin')->path_img('btn_logout.gif'); $this->link_design = Widget::Inst()->Config('link_design'); $this->link_page = Widget::Inst()->Config('link_page'); // 아이콘 if (Widget::Inst()->Config('is_design')) { $this->icon_design = Layout::Inst('admin')->path_img('icon_design_on.gif'); } else { $this->icon_design = Layout::Inst('admin')->path_img('icon_design_off.gif'); } if (Widget::Inst()->Config('is_page')) { $this->icon_page = Layout::Inst('admin')->path_img('icon_page_on.gif'); } else { $this->icon_page = Layout::Inst('admin')->path_img('icon_page_off.gif'); }
{ return self::$Root . Path::controllers . "{$name}.php"; } public static function ControllerOptions($name) { return self::$Root . Path::controllers . "{$name}.opt"; } public static function Template($name) { return self::$Root . Path::templates . "{$name}.php"; } public static function OObject($name) { return self::$Root . Path::objects . "{$name}.php"; } public static function Model($name) { return self::$Root . Path::models . "{$name}.php"; } public static function Library($name) { return self::$Root . Path::libraries . $name; } //depreciated public static function Layout($name) { return Path::View($name); } } Path::$Root = dirname(dirname(__FILE__));
<?php if(!defined('__MAGIC__')) exit; $key = GV::Number($this->KN()); $btns = array(); // 분류나 기타 태그별 보기등이 실행중일 때 전체보기 버튼 생성 if($this->Config('mb', 'admin')) { $btns[] = array( 'href'=>Path::Root('admin/menu_3_0.php?boardMode=write&bo_no='.$this->bo_no), 'icon'=>'btn_admin.gif', 'alt'=>'블로그관리' ); } if($_GET['writeMode']!='tagcloud') { $btns[] = array( 'href'=>$this->Link('tagcloud'), 'icon'=>'btn_tagcloud.gif', 'alt'=>'태그구름' ); } // 분류나 기타 태그별 보기등이 실행중일 때 전체보기 버튼 생성 if($_GET['writeMode'] || $_GET['wr_no'] || $_GET['ca1'] || $_GET['ca2'] || $_GET['tag']) { $btns[] = array( 'href'=>Url::Get('', array('wr_no','ca1','ca2','tag','writeMode')), 'icon'=>'btn_list.gif', 'alt'=>'목록보기' ); }
$img['link'] = Path::Root($img['file_path']); $img['link_original'] = Path::Root($img['file_path']); if ($width) { if ($img['width'] > $width) { // 너비만큼 높이도 비율로 줄임 if ($height) { $img['height'] = $height; } else { $img['height'] = round($width * $img['height'] / $img['width']); } $img['width'] = $width; /* * 썸네일 생성 */ //$file = $this->Sql('fetch', $img['file_no']); $path = Path::Root($img['file_path']); // 원본 파일 검사 if (!file_exists($path)) { Dialog::Alert("파일을 찾을 수 없습니다."); exit; } $thumb_path = substr($path, 0, strrpos($path, '.')) . '_T_' . $img['width'] . '_' . $img['height']; $thumb_path .= strrchr($path, '.'); // 썸네일이 없으면 썸네일 생성 if (!file_exists($thumb_path)) { $thumb = new Thumbnail(); $thumb->create($img['width'], $img['height'], $path, $thumb_path); chmod($thumb_path, 0606); } $img['link'] = $thumb_path; }
function database_debug_query($query) { error_log(date('Ymd.His') . ' ' . $query, 3, Path::Root('/cache/database.log')); }
<div data-role="content"> <ul data-role="listview" data-divider-theme="b" data-inset="true"> <?php foreach ($menu_main as $v) { ?> <li data-role="list-divider" role="heading"><?php echo $v['m_id']; ?> </li> <?php foreach ($list_all as $vv) { if ($vv['m_parent'] == $v['m_no']) { ?> <li data-theme="c"><a href="<?php echo Path::Root("?r={$root['m_id']}&id1={$v['m_id']}&id2={$vv['m_id']}"); ?> " data-transition="slide"><?php echo $vv['m_id']; ?> </a></li> <?php } } ?> <?php } ?> </ul> </div>
<a href="<?php echo $root['link']; ?> " data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a> <?php if (Member::Inst()->Action('is_login')) { ?> <a href="<?php echo Member::Inst('mbasic')->Link('logout'); ?> " data-transition="fade">Logout</a> <?php } else { ?> <a href="<?php echo Path::Root('?r=mobile_member'); ?> " data-transition="fade">Login</a> <?php } ?> <div data-role="navbar"> <ul> <?php foreach ($menu_main as $v) { ?> <li><a href="<?php echo $v['link']; ?> " data-theme="" data-icon="" <?php
if (!defined('__MAGIC__')) { exit; } $menu_main = Magic::Inst()->Action('menu_main'); foreach ($menu_main as $k => $v) { $menu_main[$k]['first'] = true; break; } $menu_all = Magic::Inst()->Sql('list'); $i = 0; foreach ($menu_main as $k => $v) { if ($v['m_hidden'] == 0) { $v['children'] = array(); foreach ($menu_all as $vv) { if ($v['m_no'] == $vv['m_parent']) { $v['children'][] = array('m_id' => $vv['m_id'], 'link' => Path::Root('?id1=' . $v['m_id'] . '&id2=' . $vv['m_id'])); } } $menu_main[$k] = $v; } else { unset($menu_main[$k]); } } $root = Magic::Inst()->Action('root'); $path = Layout::Inst('index'); ?> <ul class="list"> <?php foreach ($menu_main as $v) { ?>
* phPit Foundation Framework - Core * This is the base execution file for phPit. The .htaccess file will take any request for a file * that does not actually exist and route it through this php file. This file may also be included in any * cron or shell script that needs access to the autoloading, database or path libraries. * * @package phPit * @author Jarvis Badgley * @copyright 2008 - 2011 Jarvis Badgley */ error_reporting(E_ALL ^ E_NOTICE); if (file_exists('config.php')) { require 'config.php'; } else { require 'config.default.php'; } require 'objects/Path.php'; require 'objects/Autoloader.php'; Autoloader::AddPath(Path::Root(Path::objects)); Autoloader::AddPath(Path::Root(Path::models)); Autoloader::AddPath(Path::Root(Path::templates)); Autoloader::AddPath(Path::Root(Path::libraries)); Autoloader::$quicklook = array('User' => Path::Root('/models/User.php'), 'ControllerAction' => Path::Root('/objects/ControllerAction.php'), 'Database' => Path::Root('/objects/Database.php'), 'DBRecord' => Path::Root('/objects/DBRecord.php'), 'DBSearch' => Path::Root('/objects/DBSearch.php'), 'File' => Path::Root('/objects/File.php'), 'Page' => Path::Root('/templates/Page.php'), 'pSubPage' => Path::Root('/templates/pSubPage.php'), 'Email' => Path::Root('/libraries/Email.php')); @(include 'functions.php'); //make php shutup about date timezones. date_default_timezone_set(defined('DATE_TIMEZONE') ? DATE_TIMEZONE : 'America/Los_Angeles'); //REQUEST_URI will only be set if main.php was triggered by apache //We only parse a controller if this value is set, so that cron jobs can load the framework as well if ($_SERVER['REQUEST_URI']) { $request = new ControllerAction($_SERVER['REQUEST_URI']); $request->run(); }