mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@856 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b96a8dfc4f
commit
f08a92575f
5 changed files with 27 additions and 22 deletions
|
|
@ -92,7 +92,13 @@
|
|||
}
|
||||
|
||||
// act값에 admin이 들어 있는데 관리자가 아닌 경우 오류 표시
|
||||
if(!$grant->is_admin && substr_count($this->act, 'Admin')) return $this->stop('msg_not_permitted_act');
|
||||
if(substr_count($this->act, 'Admin')) {
|
||||
if(!$is_logged) {
|
||||
$this->setAct("dispMemberLoginForm");
|
||||
} elseif(!$grant->is_admin) {
|
||||
return $this->stop('msg_not_permitted_act');
|
||||
}
|
||||
}
|
||||
|
||||
// 권한 설정
|
||||
if($xml_info->grant) {
|
||||
|
|
|
|||
|
|
@ -26,21 +26,23 @@ String.prototype.getQuery = function(key) {
|
|||
String.prototype.setQuery = function(key, val) {
|
||||
var href = location.href;
|
||||
var idx = href.indexOf('?');
|
||||
if(idx == -1) return;
|
||||
var uri = href.substr(0, idx);
|
||||
var uri = href;
|
||||
if(idx != -1) {
|
||||
uri = href.substr(0, idx);
|
||||
var query_string = href.substr(idx+1, href.length);
|
||||
var args = {}
|
||||
query_string.replace(/([^=]+)=([^&]*)(&|$)/g, function() { args[arguments[1]] = arguments[2]; });
|
||||
|
||||
args[key] = val;
|
||||
|
||||
var q_list = new Array();
|
||||
for(var i in args) {
|
||||
if(!args[i].trim()) continue;
|
||||
q_list[q_list.length] = i+'='+args[i];
|
||||
}
|
||||
|
||||
return uri+'?'+q_list.join('&');
|
||||
return uri+"?"+q_list.join("&");
|
||||
} else {
|
||||
if(val.trim()) return uri+"?"+key+"="+val;
|
||||
else return uri;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
if(!$this->grant->is_admin) return;
|
||||
|
||||
// template path 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
|
||||
|
|
@ -18,12 +20,6 @@
|
|||
$oMemberModel = &getModel('member');
|
||||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
|
||||
// 로그인 하지 않았다면 로그인 폼 출력
|
||||
if(!$oMemberModel->isLogged()) return $this->act = 'dispLogin';
|
||||
|
||||
// 로그인되었는데 관리자(member->is_admin!=1)가 아니면 오류 표시
|
||||
if($logged_info->is_admin != 'Y') return $this->stop('msg_is_not_administrator');
|
||||
|
||||
// 관리자용 레이아웃으로 변경
|
||||
$this->setLayoutPath($this->getTemplatePath());
|
||||
$this->setLayoutFile('layout.html');
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
|
||||
<div id="admin_sub_menu">
|
||||
<a href="{getUrl('act','dispLogout')}">{$lang->cmd_logout}</a>
|
||||
<a href="{getUrl('act','dispMemberLogout')}">{$lang->cmd_logout}</a>
|
||||
</div>
|
||||
|
||||
<div id="admin_main_menu">
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ function completeInsert(ret_obj, response_tags, args, fo_obj) {
|
|||
|
||||
/* 로그인 후 */
|
||||
function completeLogin(ret_obj) {
|
||||
var url = location.href.setQuery('act','');
|
||||
location.href = location.href.setQuery('act','');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue