작업 중...

This commit is contained in:
2018-01-13 21:08:01 +09:00
parent f523683624
commit 1efe3a750b
6 changed files with 48 additions and 16 deletions
+1
View File
@@ -10,3 +10,4 @@ function dbConnRoot() {
@MYDB_select_db($f[4], $connect) or Error("DB Select 에러가 발생했습니다","");
return $connect;
}
+19 -4
View File
@@ -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);
@@ -0,0 +1 @@
p_ip|s:12:"192.168.0.26";p_time|i:1515678740;
+1 -1
View File
@@ -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);
+11 -11
View File
@@ -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가 설정이 되었는지를 검사
+15
View File
@@ -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;
}