From 599160d0430373ca254bac99a723c69b0c5ef9e7 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 14 Jan 2018 13:49:50 +0900 Subject: [PATCH] =?UTF-8?q?require=5Fonce=EB=A5=BC=20require=EB=A1=9C=20?= =?UTF-8?q?=EB=8B=A4=EC=8B=9C=20=EB=B3=80=EA=B2=BD=20server=5Fclose=20?= =?UTF-8?q?=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EB=B3=80=EA=B2=BD=20=EC=A4=80?= =?UTF-8?q?=EB=B9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 4 ++-- che_close/d_setting/_common.php | 6 +++--- che_close/join.php | 2 +- che_close/new_lib.php | 2 +- d_setting/_common.php | 6 +++--- e_lib/includes.php | 4 ++-- e_lib/plates.php | 14 ++++++++++++++ e_lib/plates/plates.php | 14 -------------- f_config/DB.php | 6 +++--- f_config/_common.php | 6 +++--- i_entrance/adminPost.php | 13 ++----------- i_entrance/template/.htaccess | 1 + i_entrance/template/block_htaccess.php | 2 ++ phpinfo.php | 2 ++ 14 files changed, 39 insertions(+), 43 deletions(-) create mode 100644 e_lib/plates.php delete mode 100644 e_lib/plates/plates.php create mode 100644 i_entrance/template/.htaccess create mode 100644 i_entrance/template/block_htaccess.php create mode 100644 phpinfo.php diff --git a/.vscode/settings.json b/.vscode/settings.json index d8e64b4b..92af6b14 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,13 +6,13 @@ "**/CVS": true, "**/.DS_Store": true, "**/logs/*.txt": true, - "**/session/sess**":true, + "**/session/sess*":true, "**/che_close": true, }, "search.exclude": { "**/che_close": true, - "e_lib":true, + "e_lib/*":true, }, } \ No newline at end of file diff --git a/che_close/d_setting/_common.php b/che_close/d_setting/_common.php index 57949e8d..2b789212 100644 --- a/che_close/d_setting/_common.php +++ b/che_close/d_setting/_common.php @@ -2,8 +2,8 @@ if(!defined('ROOT')){ define('ROOT', '../..'); } -require_once(ROOT.'/f_config/config.php'); -require_once(ROOT.W.F_CONFIG.W.APP.PHP); -require_once(ROOT.W.F_FUNC.W.FUNC.PHP); +require(ROOT.'/f_config/config.php'); +require(ROOT.W.F_CONFIG.W.APP.PHP); +require(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); diff --git a/che_close/join.php b/che_close/join.php index f6462cbc..c6980bcc 100644 --- a/che_close/join.php +++ b/che_close/join.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/e_lib/plates.php b/e_lib/plates.php new file mode 100644 index 00000000..bd1f1534 --- /dev/null +++ b/e_lib/plates.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/e_lib/plates/plates.php b/e_lib/plates/plates.php deleted file mode 100644 index 181037cd..00000000 --- a/e_lib/plates/plates.php +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/f_config/DB.php b/f_config/DB.php index 58d04ce8..706dbe68 100644 --- a/f_config/DB.php +++ b/f_config/DB.php @@ -1,7 +1,7 @@ IsExist()) { $DB = new _DB($SETTING->DBHost(), $SETTING->DBId(), $SETTING->DBPw(), $SETTING->DBName()); diff --git a/f_config/_common.php b/f_config/_common.php index b25b4786..7b86fa95 100644 --- a/f_config/_common.php +++ b/f_config/_common.php @@ -2,9 +2,9 @@ if(!defined('ROOT')){ define('ROOT', '..'); } -require_once(ROOT.'/f_config/config.php'); -require_once(ROOT.W.F_CONFIG.W.APP.PHP); -require_once(ROOT.W.F_FUNC.W.FUNC.PHP); +require(ROOT.'/f_config/config.php'); +require(ROOT.W.F_CONFIG.W.APP.PHP); +require(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index 2c7e7a60..b0249781 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -11,17 +11,8 @@ 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; +function escapeIPv4($ip){ + return str_replace('.', '\\.', $ip); } $action = util::array_get($_POST['action'], ''); diff --git a/i_entrance/template/.htaccess b/i_entrance/template/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/i_entrance/template/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/i_entrance/template/block_htaccess.php b/i_entrance/template/block_htaccess.php new file mode 100644 index 00000000..2d485c81 --- /dev/null +++ b/i_entrance/template/block_htaccess.php @@ -0,0 +1,2 @@ +Deny from all +Allow from 192.168.0.40 \ No newline at end of file diff --git a/phpinfo.php b/phpinfo.php new file mode 100644 index 00000000..bfd863b0 --- /dev/null +++ b/phpinfo.php @@ -0,0 +1,2 @@ +