From 1efe3a750b7463df272b7ddb755c2222304ad5c5 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 13 Jan 2018 21:08:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=91=EC=97=85=20=EC=A4=91...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/new_lib.php | 1 + i_entrance/adminPost.php | 23 +++++++++++++++---- .../session/sess_0g2lnrmd2poc1blmuai0r5vfoq | 1 + twe_close/func_process.php | 2 +- twe_close/lib.php | 22 +++++++++--------- twe_close/new_lib.php | 15 ++++++++++++ 6 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq diff --git a/che_close/new_lib.php b/che_close/new_lib.php index 02f1b34c..ee0ba8dc 100644 --- a/che_close/new_lib.php +++ b/che_close/new_lib.php @@ -10,3 +10,4 @@ function dbConnRoot() { @MYDB_select_db($f[4], $connect) or Error("DB Select 에러가 발생했습니다",""); return $connect; } + diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index cb7f706b..c176fe6a 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -4,16 +4,31 @@ // $_POST['notice'] : 공지 // $_POST['server'] : 서버 인덱스 // $_POST['select'] : 0: 폐쇄, 1: 리셋, 2: 오픈 -$action = $_POST['action']; -$notice = $_POST['notice']; -$server = $_POST['server']; -$select = $_POST['select']; require_once('_common.php'); require_once(ROOT.W.F_FUNC.W.'class._JSON.php'); require_once(ROOT.W.F_CONFIG.W.DB.PHP); require_once(ROOT.W.F_CONFIG.W.SESSION.PHP); +function getPost($str){ + if(!isset($_POST[$str])){ + return ''; + } + $temp = $_POST[$str]; + $temp=str_replace(" ","",$temp); + $temp=str_replace("\n","",$temp); + $temp=strip_tags($temp); + $temp=str_replace(" ","",$temp); + $temp=str_replace(" ","",$temp); + return $temp; +} + +$action = getPost('action'); +$notice = getPost('notice'); +$server = getPost('server'); +$select = getPost('select'); + + $rs = $DB->Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq b/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq new file mode 100644 index 00000000..79fe9609 --- /dev/null +++ b/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq @@ -0,0 +1 @@ +p_ip|s:12:"192.168.0.26";p_time|i:1515678740; \ No newline at end of file diff --git a/twe_close/func_process.php b/twe_close/func_process.php index 7c25f4ff..b75f7a2b 100644 --- a/twe_close/func_process.php +++ b/twe_close/func_process.php @@ -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); diff --git a/twe_close/lib.php b/twe_close/lib.php index 4cf324a7..75399e82 100644 --- a/twe_close/lib.php +++ b/twe_close/lib.php @@ -17,8 +17,8 @@ ob_start(); include "MYDB.php"; // 각종 변수 -define(STEP_LOG, true); -define(PROCESS_LOG, true); +define('STEP_LOG', true); +define('PROCESS_LOG', true); $_startTime = getMicroTime(); $_ver = "서비스중"; $_version = "삼국지 모의전투 PHP v2.29.1"; @@ -76,21 +76,21 @@ session_cache_expire(60); // 60분 session_start(); //첫 등장 -if($_SESSION[p_ip] == "") { - $_SESSION[p_ip] = getenv("REMOTE_ADDR"); - $_SESSION[p_time] = time(); +if(!isset($_SESSION['p_ip']) || $_SESSION['p_ip'] == "") { + $_SESSION['p_ip'] = getenv("REMOTE_ADDR"); + $_SESSION['p_time'] = time(); } //id, 이름, 국가는 로그인에서 //초과된 세션은 로그아웃(1시간) -if($_SESSION[p_time]+3600 < time()) { - $_SESSION[p_id] = ""; - $_SESSION[p_name] = ""; - $_SESSION[p_nation] = 0; - $_SESSION[p_time] = time(); +if($_SESSION['p_time']+3600 < time()) { + $_SESSION['p_id'] = ""; + $_SESSION['p_name'] = ""; + $_SESSION['p_nation'] = 0; + $_SESSION['p_time'] = time(); session_destroy(); } else { - $_SESSION[p_time] = time(); + $_SESSION['p_time'] = time(); } // DB가 설정이 되었는지를 검사 diff --git a/twe_close/new_lib.php b/twe_close/new_lib.php index 02f1b34c..b08635cd 100644 --- a/twe_close/new_lib.php +++ b/twe_close/new_lib.php @@ -10,3 +10,18 @@ function dbConnRoot() { @MYDB_select_db($f[4], $connect) or Error("DB Select 에러가 발생했습니다",""); return $connect; } + + + +class General{ + protected + $no, $user_id, $name, $level, $level_exp, + $leadership, $leadership_exp, + $power, $power_exp, + $intel, $intel_exp; +} + +class NPCGeneral extends General{ + protected + $npc_name, $npcmsg; +} \ No newline at end of file