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