diff --git a/i_entrance/Action.js b/i_entrance/Action.js index 5b1ff846..a8491ed2 100644 --- a/i_entrance/Action.js +++ b/i_entrance/Action.js @@ -181,3 +181,16 @@ function Entrance_Logout() { ) }); } + +$(function(){ + ImportView("body", "../i_popup/Frame.php"); + //ImportView("body", FRAME); + + Popup_Import(); + Popup_Init(); + Popup_Update(); + + Entrance_Import(); + Entrance_Init(); + Entrance_Update(); +}); \ No newline at end of file diff --git a/i_entrance/adminAction.js b/i_entrance/adminAction.js index 251606b4..b4b6610b 100644 --- a/i_entrance/adminAction.js +++ b/i_entrance/adminAction.js @@ -1,7 +1,28 @@ + +var serverAdminTemplate = '\ +\ + \ + \ + \ + \ + \ +\ +'; + + +$(function(){ + Entrance_AdminImport(); + Entrance_AdminInit(); + Entrance_AdminUpdate(); +}); function Entrance_AdminImport() { } function Entrance_AdminInit() { + console.log('adminInit'); $("#Entrance_000201").click(Entrance_Donation); $("#Entrance_000202").click(Entrance_Member); $("#Entrance_000204").click(Entrance_AdminChangeNotice); diff --git a/i_entrance/adminInc.php b/i_entrance/adminInc.php deleted file mode 100644 index 5a060b3d..00000000 --- a/i_entrance/adminInc.php +++ /dev/null @@ -1,83 +0,0 @@ - - - - -
-
회 원 관 리
- - - -
-
-
서 버 관 리
-
-
서버(접속)
-
상 태
-
선 택
-
-
-getBasePath(); - $serverDir = $settingObj->getShortName(); - //TODO: .htaccess가 서버 오픈에도 사용될 수 있으니 별도의 방법이 필요함 - if(!is_dir($serverPath)){ - $state = '상태이상, 01'; - } - else if(!file_exists($serverPath.'/index.php')){ - $state = '상태이상, 02'; - } - else if(file_exists($serverPath.'/.htaccess')) { - // 폐쇄중 - if($settingObj->isExist()) { - // 폐쇄중, 설정있음 - $state = '폐쇄중, 설정있음'; - } else { - // 폐쇄중, 설정없음 - $state = '폐쇄중, 설정없음'; - } - } else{ - // 오픈중 - if($settingObj->isExist()) { - // 서비스중 - $state = '서비스중'; - } else { - // 오픈중, 설정없음 - $state = '오픈중, 설정없음'; - } - } - -?> -
-
-
-
- - - - - - - -
-
- -
-
diff --git a/i_entrance/adminStyle.css b/i_entrance/adminStyle.css index 0e12fc36..dadf3bb4 100644 --- a/i_entrance/adminStyle.css +++ b/i_entrance/adminStyle.css @@ -1,8 +1,12 @@ @charset "utf-8"; +#server_admin_table{ + width:100%; +} + #Entrance_0002 { width: 800px; height: 170px; - position: absolute; top: 304px; left: 0px; + /*position: absolute; top: 304px; left: 0px;*/ } #Entrance_000200 { @@ -34,44 +38,36 @@ #Entrance_0003 { width: 800px; height: 176px; - position: absolute; top: 494px; left: 0px; } #Entrance_000300 { width: 798px; height: 50px; - position: absolute; top: 0px; left: 0px; font-size: 30px; font-weight: bold; } #Entrance_000301 { width: 798px; height: 20px; - position: absolute; top: 52px; left: 0px; border: none; } #Entrance_00030000 { width: 98px; height: 20px; - position: absolute; top: 0px; left: 0px; } #Entrance_00030001 { width: 198px; height: 20px; - position: absolute; top: 0px; left: 100px; } #Entrance_00030002 { width: 498px; height: 20px; - position: absolute; top: 0px; left: 300px; } #Entrance_00030003 { width: 118px; height: 20px; - position: absolute; top: 0px; left: 680px; } #Entrance_000302 { width: 798px; - position: absolute; top: 74px; left: 0px; border: none; } diff --git a/i_entrance/entrance.php b/i_entrance/entrance.php index 06069f24..9bae4ab6 100644 --- a/i_entrance/entrance.php +++ b/i_entrance/entrance.php @@ -3,10 +3,12 @@ require_once('_common.php'); require_once(ROOT.'/f_config/DB.php'); require_once(ROOT.'/f_config/SESSION.php'); +$templates = new League\Plates\Engine('templates'); + $db = getRootDB(); $system = $db->queryFirstRow('SELECT `NOTICE` FROM `SYSTEM` WHERE `NO`=1'); $member = $db->queryFirstRow('SELECT ID, GRADE FROM `MEMBER` WHERE `NO` = %i', $SESSION->NoMember()); - +$userGrade = $member['GRADE']; ?> @@ -22,6 +24,8 @@ $member = $db->queryFirstRow('SELECT ID, GRADE FROM `MEMBER` WHERE `NO` = %i', $ + + @@ -31,36 +35,32 @@ $member = $db->queryFirstRow('SELECT ID, GRADE FROM `MEMBER` WHERE `NO` = %i', $ - + - Popup_Import(); - Popup_Init(); - Popup_Update(); - - Entrance_Import(); - Entrance_Init(); - Entrance_Update(); -} - = 6) { - include(MEMBER.W.FRAME); + include('member/Frame.php'); } ?>
+= 6){ + echo $templates->render('global_panel',['notice'=>$system['NOTICE']]); +} +?> +
- @@ -105,10 +105,10 @@ if($member['GRADE'] >= 6) { - = 6) { -include(ADMIN.INC); +if($userGrade >= 6){ + echo $templates->render('server_panel',[]); + //include('adminInc.php'); } ?> diff --git a/i_entrance/j_serverAdminStatus.php b/i_entrance/j_serverAdminStatus.php new file mode 100644 index 00000000..9cc9405e --- /dev/null +++ b/i_entrance/j_serverAdminStatus.php @@ -0,0 +1,58 @@ +getBasePath(); + $serverDir = $setting->getShortName(); + //TODO: .htaccess가 서버 오픈에도 사용될 수 있으니 별도의 방법이 필요함 + if (!is_dir($serverPath)) { + $state = [ + 'valid'=>false, + 'run'=>false, + 'reason'=>'디렉토리 없음' + ]; + } elseif (!file_exists($serverPath.'/index.php')) { + $state = [ + 'valid'=>false, + 'run'=>false, + 'reason'=>'index.php 없음' + ]; + } elseif (!$setting->isExists()) { + $state = [ + 'valid'=>false, + 'run'=>false, + 'reason'=>'설정 파일 없음' + ]; + } elseif (file_exists($serverPath.'/.htaccess')) { + // 폐쇄중 + $state = [ + 'valid'=>true, + 'run'=>false, + 'reason'=>'폐쇄됨' + ]; + } else { + // 오픈중 + $state = [ + 'valid'=>true, + 'run'=>true, + 'reason'=>'운영중' + ]; + } + + $state = array_merge($state, [ + 'name' => $serverDir, + 'korName' => $serverKorName, + 'color' => $serverColor + ]); + $result[] = $state; +} + +returnJson($result); \ No newline at end of file diff --git a/i_entrance/templates/_common.php b/i_entrance/templates/_common.php new file mode 100644 index 00000000..45d617d2 --- /dev/null +++ b/i_entrance/templates/_common.php @@ -0,0 +1,11 @@ + +
회 원 관 리
+ + + + \ No newline at end of file diff --git a/i_entrance/templates/server_panel.php b/i_entrance/templates/server_panel.php new file mode 100644 index 00000000..e28f3255 --- /dev/null +++ b/i_entrance/templates/server_panel.php @@ -0,0 +1,33 @@ +
서 버 선 택
+ ++ + + + + + + + + + + + + + + + +
서 버 관 리
서버상태명령 선택
+ + \ No newline at end of file