tool 기능을 개선하여 전체 tool관리 가능하도록 변경(주소/tools 로 접속하여 선택). 빈 디렉토리 삭제 기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4378 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-07-17 03:30:49 +00:00
parent b206a07524
commit 0fddaf252f
12 changed files with 196 additions and 340 deletions

View file

@ -0,0 +1,17 @@
<?php
/**
* @file tools/clear_cache.php
* @author zero <zero@zeroboard.com>
* @brief XE 캐시파일 불필요한 파일 정리
**/
// 인증이 되지 않은 접근이면 종료
if(!defined('__XE_TOOL_AUTH__') || !__XE_TOOL_AUTH__) exit();
// 캐시 파일 제거
$oAdminController = &getAdminController('admin');
$oAdminController->procAdminRecompileCacheFile();
$output = Context::getLang('success_reset');
Context::set('output', $output);
?>

View file

@ -1,32 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="XE" />
<title>XE Cache Cleaner</title>
<link rel="stylesheet" href="./style.css" type="text/css" charset="UTF-8" media="all" />
</head>
<body>
<h1>XE Cache Cleaner</h1>
<hr />
<!--@if($msg)-->
<blockquote>{$msg}</blockquote>
<!--@end-->
<form action="./index.php" method="post">
<code>
<label for="db_id">{$lang->db_userid}</label>
<input type="text" id="db_id" name="id" />
</code>
<code>
<label for="db_pw">{$lang->db_password}</label>
<input type="password" id="db_pw" name="pw" />
</code>
<input type="submit" value="{$lang->cmd_reset}" class="submit"/>
</form>
</body>
</html>

View file

@ -1,58 +0,0 @@
<?php
/**
* @file tools/clear_cache.php
* @author zero <zero@zeroboard.com>
* @brief XE 캐시파일 불필요한 파일 정리
**/
/**
* @brief 기본적인 상수 선언, 웹에서 직접 호출되는 것을 막기 위해 체크하는 상수 선언
**/
define('__ZBXE__', true);
/**
* @brief 필요한 설정 파일들을 include
**/
require_once('../../config/config.inc.php');
// id/ password 구함
$id = $_POST['id'];
$pw = $_POST['pw'];
// 저장되어 있는 비밀번호와 비교
$oContext = &Context::getInstance();
$oContext->init();
$db_info = $oContext->getDBInfo();
// install 모듈의 언어파일을 로드
Context::loadLang(_XE_PATH_.'modules/install/lang');
// 설치가 되어 있지 않을 경우
if(!Context::isInstalled()) {
$msg = Context::getLang('msg_db_not_setted');
// 인증 정보가 없을 경우
} elseif(!isset($id) || !isset($pw)) {
// 입력된 정보와 저장된 정보 비교
} else if($id !== $db_info->db_userid || $pw !== $db_info->db_password) {
if($id !== $db_info->db_userid) $msg = sprintf($lang->filter->equalto, Context::getLang('user_id'));
else $msg = sprintf($lang->filter->equalto, Context::getLang('password'));
// 캐시 파일 제거
} else if($id === $db_info->db_userid && $pw === $db_info->db_password) {
$oAdminController = &getAdminController('admin');
$oAdminController->procAdminRecompileCacheFile();
$msg = Context::getLang('success_reset');
}
Context::set('msg', $msg);
$oTemplate = &TemplateHandler::getInstance();
print $oTemplate->compile('./tools/cache_cleaner/','form');
?>

View file

@ -1,10 +0,0 @@
h1 { font-size:1.5em; font-family:tahoma; margin:0; padding:0; }
hr { border:none; border-top:1px solid #555555; border-bottom:1px solid #888888; margin:0; margin-bottom:10px; padding:0; }
blockquote { border:1px solid red; color:red; width:280px; margin:0 0 10px 0; padding:10px;}
code { display:block; clear:both; margin-bottom:10px;}
code label { float:left; display:block; width:150px; }
code input { display:block; width:150px; border:1px solid #AAAAAA; }
input.submit { width:300px; border:1px solid #AAAAAA;}