From 02dce232fdee0f7d3e44fc0b4f8a0b8707e8fd53 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 3 Feb 2018 05:26:43 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=ED=95=B4=EC=A7=84?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=EB=93=A4=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/login_process.php | 43 +++--------------------------------------- twe/logout_process.php | 11 ----------- twe/start.php | 11 ----------- 3 files changed, 3 insertions(+), 62 deletions(-) delete mode 100644 twe/logout_process.php delete mode 100644 twe/start.php diff --git a/twe/login_process.php b/twe/login_process.php index 34029b99..e73b513b 100644 --- a/twe/login_process.php +++ b/twe/login_process.php @@ -6,32 +6,12 @@ include "func.php"; use utilphp\util as util; -$id = util::array_get($_POST['id'],''); -$pw = util::array_get($_POST['pw'], ''); -$conmsg = util::array_get($_POST['conmsg'], ''); - -$pw = substr($pw, 0, 32); - - - -//회원 테이블에서 정보확인 -$member = getRootDB()->queryFirstRow('select no,name from MEMBER where id=%s and pw=%s', $id, $pw); - - -if(!$member) { - MessageBox("아이디나 암호가 올바르지 않습니다!!!"); - //TODO:login_process를 rest 형태로 처리 - //header ("Location: index.php"); - exit(0); -} - -//NOTE: 왜 Session을 지우는가? -DeleteSession(); - $db = getDB(); +$userID = getUserID(); + //회원 테이블에서 정보확인 -$me= $db->queryFirstRow('select no,name,nation,block,killturn from general where user_id= %s', $id); +$me= $db->queryFirstRow('select no,name,nation,block,killturn from general where no_member= %s', $userID); $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -56,7 +36,6 @@ case 3: } $_SESSION[getServPrefix().'p_no'] = toInt($me['no']); -$_SESSION['p_id'] = $id; $_SESSION[getServPrefix().'p_name'] = $me['name']; $_SESSION['p_time'] = time(); @@ -75,20 +54,4 @@ fclose($fp); header ("Location: index.php"); -function DeleteSession() { - $session_path = "data/session"; // 세션이저장된 디렉토리 - if(!$dir=@opendir($session_path)) echo "디렉토리를 열지못했습니다."; - - while($file=@readdir($dir)) { - if(!strstr($file,'sess_')) continue; - if(strpos($file,'sess_')!=0) continue; - if (!$atime=@fileatime("$session_path/$file")) continue; - if (time() > $atime + 86400) { // 10대시 지난시간을 초로 계산해서 적어주시면 됩니다. - // $return = (@unlink("$session_path/$file")); - @unlink("$session_path/$file"); - } - } - closedir($dir); -} - MYDB_close($connect); diff --git a/twe/logout_process.php b/twe/logout_process.php deleted file mode 100644 index 93645dd4..00000000 --- a/twe/logout_process.php +++ /dev/null @@ -1,11 +0,0 @@ - - -../ -