che, che_close, che_rest 방식을 통합 디렉토리를 이용하도록 변경
This commit is contained in:
1 parent
922af0d2a1
commit
8fae0c2b5a
178 files changed
+227
-33198
No files matched your search
Vendored
+1
-1
@@ -7,7 +7,7 @@
|
||||
"**/.DS_Store": true,
|
||||
"**/logs/*.txt": true,
|
||||
"**/session/sess*":true,
|
||||
"**/che_close": true,
|
||||
//"**/che_close": true,
|
||||
|
||||
},
|
||||
"search.exclude": {
|
||||
|
||||
@@ -38,4 +38,3 @@ function MYDB_close($connect) {
|
||||
return mysqli_close($connect);
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -8,7 +8,7 @@ $query = "select userlevel from general where user_id='$_SESSION[p_id]'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if($me['userlevel'] < 5) {
|
||||
if($me[userlevel] < 5) {
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
@@ -8,7 +8,7 @@ $query = "select userlevel from general where user_id='$_SESSION[p_id]'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if($me['userlevel'] < 5) {
|
||||
if($me[userlevel] < 5) {
|
||||
echo "<script>location.replace('_119.php');</script>";
|
||||
}
|
||||
|
||||
@@ -53,4 +53,5 @@ case "락풀기":
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<script>location.replace('_119.php');</script>";
|
||||
//echo "<script>location.replace('_119.php');</script>";
|
||||
echo '_119.php';//TODO:replace
|
||||
@@ -9,7 +9,7 @@ $query = "select userlevel from general where user_id='$_SESSION[p_id]'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if($me['userlevel'] < 5) {
|
||||
if($me[userlevel] < 5) {
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
@@ -43,7 +43,7 @@ $admin = getAdmin($connect);
|
||||
<form name=form1 method=post action=_admin1_submit.php>
|
||||
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13;word-break:break-all; id=bg0>
|
||||
<tr><td width=110 align=right>운영자메세지</td>
|
||||
<td colspan=3><input type=textarea size=90 style=color:white;background-color:black; name=msg value='<?=$admin['msg'];?>'><input type=submit name=btn value=변경></td></td>
|
||||
<td colspan=3><input type=textarea size=90 style=color:white;background-color:black; name=msg value='<?=$admin[msg];?>'><input type=submit name=btn value=변경></td></td>
|
||||
</tr>
|
||||
<tr><td width=110 align=right>중원정세추가</td>
|
||||
<td colspan=3><input type=textarea size=90 maxlength=80 style=color:white;background-color:black; name=log><input type=submit name=btn value=로그쓰기></td></td>
|
||||
@@ -55,7 +55,7 @@ $admin = getAdmin($connect);
|
||||
<td width=110 align=right>시작시간변경</td>
|
||||
<td width=285><input type=text size=20 maxlength=20 style=color:white;background-color:black;text-align:right; name=starttime value='<?=$admin[starttime];?>'><input type=submit name=btn value=변경1></td>
|
||||
<td width=110 align=right>현재도시훈사</td>
|
||||
<td width=285><?=$admin['city_rate'];?></td>
|
||||
<td width=285><?=$admin[city_rate];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=110 align=right>최대 장수</td>
|
||||
@@ -175,4 +175,6 @@ switch($btn) {
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<script>location.replace('_admin1.php');</script>";
|
||||
//echo "<script>location.replace('_admin1.php');</script>";
|
||||
echo '_admin1.php';//TODO:replace
|
||||
|
||||
File renamed without changes.
@@ -427,5 +427,6 @@ switch($btn) {
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<script>location.replace('_admin2.php');</script>";
|
||||
//echo "<script>location.replace('_admin2.php');</script>";
|
||||
echo '_admin2.php';//TODO:replace
|
||||
|
||||
File renamed without changes.
@@ -129,4 +129,6 @@ switch($btn) {
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<script>location.replace('_admin3.php');</script>";
|
||||
//echo "<script>location.replace('_admin3.php');</script>";
|
||||
echo '_admin3.php';//TODO:replace
|
||||
|
||||
File renamed without changes.
@@ -102,4 +102,6 @@ switch($btn) {
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<script>location.replace('_admin4.php');</script>";
|
||||
//echo "<script>location.replace('_admin4.php');</script>";
|
||||
echo '_admin4.php'; //TODO:replace
|
||||
|
||||
File renamed without changes.
@@ -25,4 +25,7 @@ switch($btn) {
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<script>location.replace('_admin5.php');</script>";
|
||||
//echo "<script>location.replace('_admin5.php');</script>";
|
||||
echo '_admin5.php';//TODO:replace
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -254,3 +254,4 @@ function getHexCode($hex) {
|
||||
case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,3 +335,4 @@ function getNewColor($type) {
|
||||
return $color;
|
||||
}
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -213,3 +213,4 @@ if($btn == "판매") {
|
||||
}
|
||||
|
||||
Submit("b_auction.php", $msg, $msg2);
|
||||
|
||||
@@ -38,4 +38,5 @@ for($i=0; $i < 16; $i++) {
|
||||
|
||||
?>
|
||||
|
||||
<script>location.replace('b_betting.php');</script>
|
||||
<!--<script>location.replace('b_betting.php');</script>//TODO:replace-->
|
||||
b_betting.php
|
||||
@@ -42,8 +42,8 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) {
|
||||
}
|
||||
}
|
||||
|
||||
echo "<script>location.replace('b_chiefboard.php');</script>";
|
||||
|
||||
//echo "<script>location.replace('b_chiefboard.php');</script>";
|
||||
echo 'b_chiefboard.php';//TODO:replace
|
||||
?>
|
||||
|
||||
</body>
|
||||
@@ -56,5 +56,7 @@ if($btn == "국가방침") {
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
|
||||
echo "<script>location.replace('b_dipcenter.php');</script>";
|
||||
//echo "<script>location.replace('b_dipcenter.php');</script>";
|
||||
echo 'b_dipcenter.php';//TODO:replace
|
||||
|
||||
|
||||
@@ -124,3 +124,4 @@ if($command == 46) {
|
||||
echo "<script>location.replace('main.php');</script>";
|
||||
}
|
||||
|
||||
|
||||
@@ -113,5 +113,6 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") {
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
echo "<script>location.replace('msglist.php');</script>";
|
||||
//echo "<script>location.replace('msglist.php');</script>";
|
||||
echo 'msglist.php';//TODO:replace
|
||||
|
||||
@@ -250,5 +250,7 @@ if($btn == "추방") {
|
||||
}
|
||||
}
|
||||
|
||||
echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
//echo "<script>location.replace('b_myBossInfo.php');</script>";
|
||||
echo 'b_myBossInfo.php'//TODO:replace
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) {
|
||||
}
|
||||
}
|
||||
|
||||
echo "<script>location.replace('b_nationboard.php');</script>";
|
||||
//echo "<script>location.replace('b_nationboard.php');</script>";
|
||||
echo 'b_nationboard.php';//TODO:replace
|
||||
|
||||
?>
|
||||
|
||||
@@ -16,5 +16,6 @@ $msg = addslashes(SQ2DQ($msg));
|
||||
$query = "update nation set rule='$msg' where nation='$me[nation]'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
echo "<script>location.replace('b_nationrule.php');</script>";
|
||||
//echo "<script>location.replace('b_nationrule.php');</script>";
|
||||
echo 'b_nationrule.php';//TODO:replace
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
$connect = dbConn();
|
||||
@@ -203,4 +202,5 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) {
|
||||
}
|
||||
?>
|
||||
|
||||
<script>location.replace('b_tournament.php');</script>
|
||||
<!--<script>location.replace('b_tournament.php');</script> //TODO:replace -->
|
||||
b_tournament.php
|
||||
File renamed without changes.
@@ -14,5 +14,6 @@ $admin[killturn] *= 3;
|
||||
$query = "update general set killturn='$admin[killturn]' where user_id='$_SESSION[p_id]'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
echo "<script>location.replace('b_myPage.php');</script>";
|
||||
//echo "<script>location.replace('b_myPage.php');</script>";
|
||||
echo 'b_myPage.php'; //TODO:replace
|
||||
|
||||
@@ -73,4 +73,5 @@ if($btn == "수정" && $me[userlevel] >= 5) {
|
||||
}
|
||||
?>
|
||||
|
||||
<script>location.replace('a_vote.php');</script>
|
||||
<!--<script>location.replace('a_vote.php');</script> //TODO:replace -->
|
||||
a_vote.php
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -159,3 +159,4 @@ pushAllLog($alllog);
|
||||
pushHistory($connect, $history);
|
||||
|
||||
echo "<script>location.replace('msglist.php');</script>";
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -124,4 +124,3 @@ pushHistory($connect, $history);
|
||||
|
||||
echo "<script>location.replace('msglist.php');</script>";
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -80,13 +80,16 @@ function abilityPowint() {
|
||||
function delInDir($dir) {
|
||||
$handle = opendir($dir);
|
||||
while(false !== ($FolderOrFile = readdir($handle))) {
|
||||
if($FolderOrFile != "." && $FolderOrFile != "..") {
|
||||
if(is_dir("$dir/$FolderOrFile")) {
|
||||
delInDir("$dir/$FolderOrFile");
|
||||
} // recursive
|
||||
else {
|
||||
unlink("$dir/$FolderOrFile");
|
||||
}
|
||||
if($FolderOrFile == "." || $FolderOrFile == "..") {
|
||||
continue;
|
||||
}
|
||||
|
||||
$filepath = sprintf('%s/%s', $dir, $FolderOrFile);
|
||||
if(is_dir($filepath)) {
|
||||
delInDir($filepath);
|
||||
} // recursive
|
||||
else {
|
||||
@unlink($filepath);
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
@@ -2879,7 +2882,7 @@ function pushProcessLog($connect, $log) {
|
||||
|
||||
function delStepLog() {
|
||||
$date = date('Y_m_d');
|
||||
@unlink(realpath(dirname(__FILE__))."/logs/_{$date}_steplog.txt");
|
||||
@unlink("logs/_{$date}_steplog.txt");
|
||||
}
|
||||
|
||||
function pushStepLog($log) {
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2395,7 +2395,7 @@ function process_32($connect, &$general) {
|
||||
|
||||
function process_33($connect, &$general) {
|
||||
global $_firing, $_basefiring, $_firingpower;
|
||||
global $_basegold, $_baserice;
|
||||
//global $_basegold, $_baserice; //TODO : 버그로 보여서 지웠는데, 진짜로 지워도 되는지 확인
|
||||
//탈취는 0까지 무제한
|
||||
$_basegold = 0; $_baserice = 0;
|
||||
$date = substr($general[turntime],11,5);
|
||||
@@ -220,7 +220,7 @@ class _String {
|
||||
}
|
||||
|
||||
//중간정렬
|
||||
function Fill($str, $maxsize, $ch) {
|
||||
public static function staticFill($str, $maxsize, $ch) {
|
||||
$size = strlen($str);
|
||||
|
||||
$count = ($maxsize - $size) / 2;
|
||||
@@ -236,11 +236,11 @@ class _String {
|
||||
}
|
||||
|
||||
//우측정렬
|
||||
function Fill2($str, $maxsize, $ch='0') {
|
||||
public static function Fill2($str, $maxsize, $ch='0') {
|
||||
$size = strlen($str);
|
||||
|
||||
$count = ($maxsize - $size);
|
||||
|
||||
$string = '';
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$string = $string.$ch;
|
||||
}
|
||||
@@ -238,12 +238,12 @@ function printFighting($tournament, $phase) {
|
||||
|
||||
function startTournament($connect, $auto, $type) {
|
||||
for($i=0; $i < 8; $i++) {
|
||||
@unlink(realpath(dirname(__FILE__))."/logs/fight{$i}.txt");
|
||||
@unlink(realpath(dirname(__FILE__))."/logs/fight1{$i}.txt");
|
||||
@unlink(realpath(dirname(__FILE__))."/logs/fight2{$i}.txt");
|
||||
@unlink(realpath(dirname(__FILE__))."/logs/fight3{$i}.txt");
|
||||
@unlink(realpath(dirname(__FILE__))."/logs/fight4{$i}.txt");
|
||||
@unlink(realpath(dirname(__FILE__))."/logs/fight5{$i}.txt");
|
||||
@unlink("logs/fight{$i}.txt");
|
||||
@unlink("logs/fight1{$i}.txt");
|
||||
@unlink("logs/fight2{$i}.txt");
|
||||
@unlink("logs/fight3{$i}.txt");
|
||||
@unlink("logs/fight4{$i}.txt");
|
||||
@unlink("logs/fight5{$i}.txt");
|
||||
}
|
||||
|
||||
switch($auto) {
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv='Refresh' content='0;URL=../'>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
</head>
|
||||
<body></body></html>
|
||||
File renamed without changes.
@@ -74,7 +74,7 @@ if(!$check) {
|
||||
<tr>
|
||||
<form method=post action=install1.php onsubmit='return check_submit()'>
|
||||
<td align=center height=30>
|
||||
<input type=button text='inst_b_1' border=0 align=absmiddle>
|
||||
<input type=submit text='inst_b_1' border=0 align=absmiddle>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,15 @@
|
||||
<?php
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
require('../e_lib/util.php');
|
||||
|
||||
$turnterm = util::array_get($_POST['turnterm'],'0');
|
||||
$sync = util::array_get($_POST['sync'],'0');
|
||||
$scenario = util::array_get($_POST['scenario'],'0');
|
||||
$fiction = util::array_get($_POST['fiction'],'0');
|
||||
$extend = util::array_get($_POST['extend'],'0');
|
||||
$npcmode = util::array_get($_POST['npcmode'],'0');
|
||||
$img = util::array_get($_POST['img'],'0');
|
||||
|
||||
$connect=dbConn();
|
||||
|
||||
@@ -293,6 +302,35 @@ insertCity($connect, "파양", 1, 103700, 2000, 2200, 2000, 3800, 3800, 7,
|
||||
insertCity($connect, "탐라", 1, 113000, 2200, 2100, 2000, 4300, 4100, 8, "31|33|34|62"); // 93 : 탐라
|
||||
insertCity($connect, "유구", 1, 92100, 1700, 1800, 2000, 3700, 3700, 8, "59|69"); // 94 : 유구
|
||||
|
||||
//TODO:replace
|
||||
switch($scenario) {
|
||||
case 0: echo "index.php"; break;
|
||||
case 1: echo "scenario_1.php"; break;
|
||||
case 2: echo "scenario_2.php"; break;
|
||||
case 3: echo "scenario_3.php"; break;
|
||||
case 4: echo "scenario_4.php"; break;
|
||||
case 5: echo "scenario_5.php"; break;
|
||||
case 6: echo "scenario_6.php"; break;
|
||||
case 7: echo "scenario_7.php"; break;
|
||||
case 8: echo "scenario_8.php"; break;
|
||||
case 9: echo "scenario_9.php"; break;
|
||||
case 10: echo "scenario_10.php"; break;
|
||||
case 11: echo "scenario_11.php"; break;
|
||||
|
||||
case 12: echo "scenario_12.php"; break;
|
||||
|
||||
case 20: echo "scenario_20.php"; break;
|
||||
case 21: echo "scenario_21.php"; break;
|
||||
case 22: echo "scenario_22.php"; break;
|
||||
case 23: echo "scenario_23.php"; break;
|
||||
case 24: echo "scenario_24.php"; break;
|
||||
case 25: echo "scenario_25.php"; break;
|
||||
case 26: echo "scenario_26.php"; break;
|
||||
case 27: echo "scenario_27.php"; break;
|
||||
case 28: echo "scenario_28.php"; break;
|
||||
default: echo "install3_ok.php"; break;
|
||||
}
|
||||
/*
|
||||
switch($scenario) {
|
||||
case 0: echo "<script>location.replace('index.php');</script>"; break;
|
||||
case 1: echo "<script>location.replace('scenario_1.php');</script>"; break;
|
||||
@@ -320,7 +358,7 @@ switch($scenario) {
|
||||
case 28: echo "<script>location.replace('scenario_28.php');</script>"; break;
|
||||
default: echo "<script>location.replace('install3_ok.php');</script>"; break;
|
||||
}
|
||||
|
||||
*/
|
||||
function insertCity($connect, $name, $level, $pop2, $agri2, $comm2, $secu2, $def2, $wall2, $region, $path) {
|
||||
switch($level) {
|
||||
case 1: $pop = 5000; $agri = 100; $comm = 100; $secu = 100; $def = 500; $wall = 500; break;
|
||||
@@ -7,4 +7,4 @@ $connect=dbConn();
|
||||
LogHistory($connect, 1);
|
||||
|
||||
//echo "<script>location.replace('index.php');</script>";
|
||||
echo "index.php"; //TODO:replace
|
||||
echo 'index.php'; //TODO:replace
|
||||
@@ -2,9 +2,15 @@
|
||||
include "lib.php";
|
||||
include "schema.php";
|
||||
include "func.php";
|
||||
|
||||
require "../e_lib/util.php";
|
||||
if(file_exists("d_setting/set.php")) error("이미 set.php가 생성되어 있습니다.<br><br>재설치하려면 해당 파일을 지우세요");
|
||||
|
||||
|
||||
$hostname = util::array_get($_POST['hostname'], '');
|
||||
$user_id = util::array_get($_POST['user_id'], '');
|
||||
$password = util::array_get($_POST['password'], '');
|
||||
$dbname = util::array_get($_POST['dbname'], '');
|
||||
|
||||
// 호스트네임, 아이디, DB네임, 비밀번호의 공백여부 검사
|
||||
if(isBlank($hostname)) Error("HostName을 입력하세요","");
|
||||
if(isBlank($user_id)) Error("User ID 를 입력하세요","");
|
||||
@@ -15,9 +21,9 @@ $connect = MYDB_connect($hostname,$user_id,$password) or Error("MySQL-DB Connect
|
||||
if(MYDB_error($connect)) Error(__LINE__.MYDB_error($connect),"");
|
||||
MYDB_select_db($dbname, $connect) or Error("MySQL-DB Select<br>Error!!!","");
|
||||
|
||||
delInDir(realpath(dirname(__FILE__))."/logs");
|
||||
delInDir(realpath(dirname(__FILE__))."/data/session");
|
||||
@unlink(realpath(dirname(__FILE__))."/data/connected.php");
|
||||
delInDir("logs");
|
||||
delInDir("data/session");
|
||||
@unlink("data/connected.php");
|
||||
|
||||
// 관리자 테이블 삭제
|
||||
if(isTable($connect, "game", $dbname)) @MYDB_query("drop table game", $connect) or Error("drop ".MYDB_error($connect),"");
|
||||
@@ -93,4 +99,4 @@ $temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1
|
||||
|
||||
MYDB_close($connect);
|
||||
|
||||
echo "<!--<script>location.replace('install2.php');</script>-->install2.php"; //TODO:location.replace 살려두기
|
||||
echo "<script>location.replace('install2.php');</script>";
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
require_once "lib.php";
|
||||
require_once "func.php";
|
||||
require_once("new_lib.php");
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
require("new_lib.php")
|
||||
|
||||
$id = $_POST[id];
|
||||
$pw = $_POST[pw];
|
||||
@@ -271,3 +271,4 @@ if($id_num) {
|
||||
</script>");
|
||||
echo("<script>location.replace('index.php');</script>");
|
||||
}
|
||||
|
||||
File renamed without changes.
@@ -54,3 +54,4 @@ $response['intel'] = $abil['intel'];
|
||||
|
||||
usleep(100*1000);
|
||||
echo json_encode($response);
|
||||
|
||||
File renamed without changes.
Loaded 100 of 178 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user