che_close 계열 코드 수정 완료
This commit is contained in:
Vendored
+2
-2
@@ -7,11 +7,11 @@
|
||||
"**/.DS_Store": true,
|
||||
"**/logs/*.txt": true,
|
||||
"**/session/sess*":true,
|
||||
//"**/che_close": true,
|
||||
"**/che": true,
|
||||
|
||||
},
|
||||
"search.exclude": {
|
||||
"**/che_close": true,
|
||||
"**/che": true,
|
||||
"e_lib/*":true,
|
||||
|
||||
},
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Deny from all
|
||||
SetEnvIf X-Forwarded-For ^192\.168\.0\.1 env_allow_1
|
||||
Allow from env=env_allow_1
|
||||
Allow from 192.168.0.1
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
SAM=che
|
||||
SRC=~/svn/trunk/sam/che_close/
|
||||
TAR=~/www/sam/${SAM}_close/
|
||||
SRC=~/svn/trunk/sam/che/
|
||||
TAR=~/www/sam/${SAM}/
|
||||
ALT=~/www/sam/${SAM}/
|
||||
|
||||
if [ -e $TAR ]
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
SAM=kwe
|
||||
SRC=~/svn/branches/che_devel/
|
||||
TAR=~/www/sam/${SAM}_close/
|
||||
TAR=~/www/sam/${SAM}/
|
||||
ALT=~/www/sam/${SAM}/
|
||||
|
||||
if [ -e $TAR ]
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
SAM=pwe
|
||||
SRC=~/svn/branches/che_devel/
|
||||
TAR=~/www/sam/${SAM}_close/
|
||||
TAR=~/www/sam/${SAM}/
|
||||
ALT=~/www/sam/${SAM}/
|
||||
|
||||
if [ -e $TAR ]
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
SAM=twe
|
||||
SRC=~/svn/branches/che_devel/
|
||||
TAR=~/www/sam/${SAM}_close/
|
||||
TAR=~/www/sam/${SAM}/
|
||||
ALT=~/www/sam/${SAM}/
|
||||
|
||||
if [ -e $TAR ]
|
||||
|
||||
@@ -80,7 +80,7 @@ function Entrance_AdminNPCCreate(serverDir) {
|
||||
}
|
||||
|
||||
function Entrance_AdminClosedLogin(serverDir) {
|
||||
ReplaceFrame(serverDir+'_close'+W+'npc_login'+PHP);
|
||||
ReplaceFrame(serverDir+W+'npc_login'+PHP);
|
||||
}
|
||||
|
||||
function Entrance_AdminOpen119(serverDir) {
|
||||
|
||||
@@ -25,9 +25,8 @@ $select = util::array_get($_POST['select'], '');
|
||||
$rs = $DB->Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'");
|
||||
$member = $DB->Get($rs);
|
||||
|
||||
function doServerModeSet($server, $select, &$reason){
|
||||
function doServerModeSet($server, $select, &$response){
|
||||
global $_serverDirs;
|
||||
$reason = '';
|
||||
$serverDir = $_serverDirs[$server];
|
||||
$serverPath = ROOT.W.$serverDir;
|
||||
$realServerPath = realpath(dirname(__FILE__)).W.$serverPath;
|
||||
@@ -50,20 +49,16 @@ function doServerModeSet($server, $select, &$reason){
|
||||
$htaccess = $templates->render('block_htaccess',
|
||||
['allow_ip' => $allow_ip, 'xforward_allow_ip' => $xforward_allow_ip]);
|
||||
file_put_contents($realServerPath.'/.htaccess', $htaccess);
|
||||
|
||||
$response['result'] = 'SUCCESS';
|
||||
} elseif($select == 1) {//리셋
|
||||
if(file_exists($realServerPath.W.D_SETTING.W.SET.PHP)){
|
||||
@unlink($realServerPath.W.D_SETTING.W.SET.PHP);
|
||||
}
|
||||
|
||||
$response['installURL'] = $serverPath.W."install.php";
|
||||
$response['result'] = 'SUCCESS';
|
||||
} elseif($select == 2) {//오픈
|
||||
if(file_exists($realServerPath.'.htaccess')){
|
||||
@unlink($realServerPath.'.htaccess');
|
||||
}
|
||||
$response['result'] = 'SUCCESS';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -83,13 +78,9 @@ function doAdminPost($member, $action, $notice, $server, $select){
|
||||
}
|
||||
|
||||
if($action == 1) {
|
||||
$reason = '';
|
||||
if(doServerModeSet($server, $select, $reason)){
|
||||
if(doServerModeSet($server, $select, $response)){
|
||||
$response['result'] = 'SUCCESS';
|
||||
}
|
||||
else{
|
||||
$response['msg'] = $reason;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
+5
-5
@@ -12,7 +12,7 @@ HOUR=`expr ${HOUR} + 0`
|
||||
|
||||
|
||||
|
||||
TAR=/home/jwh1807/www/sam/che_close/
|
||||
TAR=/home/jwh1807/www/sam/che/
|
||||
if [ -e $TAR ]
|
||||
then
|
||||
TIME=`date -d "0 hours" "+%H:%M:%S.%N"`
|
||||
@@ -27,7 +27,7 @@ fi
|
||||
|
||||
if [ $HOUR -ge 9 -a $HOUR -lt 21 ]
|
||||
then
|
||||
TAR=/home/jwh1807/www/sam/kwe_close/
|
||||
TAR=/home/jwh1807/www/sam/kwe/
|
||||
if [ -e $TAR ]
|
||||
then
|
||||
TIME=`date -d "0 hours" "+%H:%M:%S.%N"`
|
||||
@@ -38,7 +38,7 @@ then
|
||||
echo [$TIME] kwe finish.
|
||||
fi
|
||||
|
||||
TAR=/home/jwh1807/www/sam/pwe_close/
|
||||
TAR=/home/jwh1807/www/sam/pwe/
|
||||
if [ -e $TAR ]
|
||||
then
|
||||
TIME=`date -d "0 hours" "+%H:%M:%S.%N"`
|
||||
@@ -49,7 +49,7 @@ then
|
||||
echo [$TIME] pwe finish.
|
||||
fi
|
||||
|
||||
TAR=/home/jwh1807/www/sam/twe_close/
|
||||
TAR=/home/jwh1807/www/sam/twe/
|
||||
if [ -e $TAR ]
|
||||
then
|
||||
TIME=`date -d "0 hours" "+%H:%M:%S.%N"`
|
||||
@@ -60,7 +60,7 @@ then
|
||||
echo [$TIME] twe finish.
|
||||
fi
|
||||
|
||||
TAR=/home/jwh1807/www/sam/hwe_close/
|
||||
TAR=/home/jwh1807/www/sam/hwe/
|
||||
if [ -e $TAR ]
|
||||
then
|
||||
TIME=`date -d "0 hours" "+%H:%M:%S.%N"`
|
||||
|
||||
Reference in New Issue
Block a user