diff --git a/f_config/config.php b/f_config/config.php
index 1123e653..9f23b279 100644
--- a/f_config/config.php
+++ b/f_config/config.php
@@ -1,7 +1,7 @@
diff --git a/f_install/j_create_admin.php b/f_install/j_create_admin.php
index a88ce7c5..4e50fcc3 100644
--- a/f_install/j_create_admin.php
+++ b/f_install/j_create_admin.php
@@ -1,7 +1,7 @@
error_handler = function ($params) {
$mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨.
-if ($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql'))) {
+if ($mysqli_obj->multi_query(file_get_contents(__DIR__.'/sql/common_schema.sql'))) {
while (true) {
if (!$mysqli_obj->more_results()) {
break;
@@ -195,7 +195,7 @@ $imageRequestPath = WebUtil::resolveRelativePath($gameImagePath.'/../hook/git_pu
$imageKeyInstallPath = WebUtil::resolveRelativePath($gameImagePath.'/../hook/InstallKey.php', $servHost);
$result = Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/ServConfig.orig.php',
+ __DIR__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
[
'serverBasePath'=>$servHost,
@@ -219,7 +219,7 @@ if ($result !== true) {
}
$result = Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/common_path.orig.js',
+ __DIR__.'/templates/common_path.orig.js',
ROOT.'/d_shared/common_path.js',
[
'serverBasePath'=>$servHost,
@@ -230,7 +230,7 @@ $result = Util::generateFileUsingSimpleTemplate(
);
$result = Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/menu.orig.json',
+ __DIR__.'/templates/menu.orig.json',
ROOT.'/d_shared/menu.json',
[],
true
@@ -245,7 +245,7 @@ if ($result !== true) {
$result = Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/common.orig.css',
+ __DIR__.'/templates/common.orig.css',
ROOT.'/d_shared/common.css',
[
'serverBasePath'=>$servHost,
@@ -264,7 +264,7 @@ if ($result !== true) {
$result = Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/RootDB.orig.php',
+ __DIR__.'/templates/RootDB.orig.php',
ROOT.'/d_setting/RootDB.php',
[
'host'=>$host,
@@ -279,7 +279,7 @@ $result = Util::generateFileUsingSimpleTemplate(
$kakaoRedirectURI = WebUtil::resolveRelativePath('oauth_kakao/oauth.php', $servHost.'/');
Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/KakaoKey.orig.php',
+ __DIR__.'/templates/KakaoKey.orig.php',
ROOT.'/d_setting/KakaoKey.php',
[
'REST_API_KEY'=>$kakaoRESTKey,
diff --git a/f_install/j_update_js_css_path.php b/f_install/j_update_js_css_path.php
index 27b4fc10..5b5f215a 100644
--- a/f_install/j_update_js_css_path.php
+++ b/f_install/j_update_js_css_path.php
@@ -1,7 +1,7 @@
setReadOnly();
if($session->userGrade < 6){
@@ -27,7 +27,7 @@ if($servHost){
$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost);
$result = Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/ServConfig.orig.php',
+ __DIR__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
[
'serverBasePath'=>$servHost,
@@ -61,7 +61,7 @@ else if($sharedIconPath || $gameImagePath){
}
$result = Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/ServConfig.orig.php',
+ __DIR__.'/templates/ServConfig.orig.php',
ROOT.'/d_setting/ServConfig.php',
[
'serverBasePath'=>$servHost,
@@ -87,7 +87,7 @@ else{
$result = Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/common_path.orig.js',
+ __DIR__.'/templates/common_path.orig.js',
ROOT.'/d_shared/common_path.js',
[
'serverBasePath'=>$servHost,
@@ -99,7 +99,7 @@ $result = Util::generateFileUsingSimpleTemplate(
$result = Util::generateFileUsingSimpleTemplate(
- __dir__.'/templates/common.orig.css',
+ __DIR__.'/templates/common.orig.css',
ROOT.'/d_shared/common.css',
[
'serverBasePath'=>$servHost,
diff --git a/hwe/a_bestGeneral.php b/hwe/a_bestGeneral.php
index fec31459..67d68dca 100644
--- a/hwe/a_bestGeneral.php
+++ b/hwe/a_bestGeneral.php
@@ -14,7 +14,7 @@ $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
increaseRefresh("명장일람", 1);
-$templates = new \League\Plates\Engine(__dir__.'/templates');
+$templates = new \League\Plates\Engine(__DIR__.'/templates');
?>
diff --git a/hwe/a_traffic.php b/hwe/a_traffic.php
index 2f429b59..964629e3 100644
--- a/hwe/a_traffic.php
+++ b/hwe/a_traffic.php
@@ -11,7 +11,7 @@ increaseRefresh("갱신정보", 2);
$admin = $gameStor->getValues(['year','month','refresh','maxrefresh','maxonline']);
-$log = getRawFileLogRecent(__dir__.'/logs/'.UniqueConst::$serverID.'/_traffic.txt', 11, 100);
+$log = getRawFileLogRecent(__DIR__.'/logs/'.UniqueConst::$serverID.'/_traffic.txt', 11, 100);
$date = [];
$year = [];
diff --git a/hwe/func.php b/hwe/func.php
index 54e41007..8a2d9ded 100644
--- a/hwe/func.php
+++ b/hwe/func.php
@@ -1047,7 +1047,7 @@ function increaseRefresh($type="", $cnt=1) {
$date2 = substr($date, 0, 10);
$online = getOnlineNum();
file_put_contents(
- __dir__."/logs/".UniqueConst::$serverID."/_{$date2}_refresh.txt",
+ __DIR__."/logs/".UniqueConst::$serverID."/_{$date2}_refresh.txt",
sprintf(
"%s, %s, %s, %s, %s, %d\n",
$date,
@@ -1084,7 +1084,7 @@ function increaseRefresh($type="", $cnt=1) {
}
if($str != "") {
file_put_contents(
- __dir__."/logs/".UniqueConst::$serverID."/_{$date2}_ipcheck.txt",
+ __DIR__."/logs/".UniqueConst::$serverID."/_{$date2}_ipcheck.txt",
sprintf(
"%s, %s, %s%s\n",
$session->userName,
@@ -1119,7 +1119,7 @@ function updateTraffic() {
$date = TimeUtil::now();
//일시|년|월|총갱신|접속자|최다갱신자
- file_put_contents(__dir__."/logs/".UniqueConst::$serverID."/_traffic.txt",
+ file_put_contents(__DIR__."/logs/".UniqueConst::$serverID."/_traffic.txt",
Json::encode([
$date,
$admin['year'],
diff --git a/hwe/func_history.php b/hwe/func_history.php
index b5332fa5..4fb38e90 100644
--- a/hwe/func_history.php
+++ b/hwe/func_history.php
@@ -5,7 +5,7 @@ namespace sammo;
function delStepLog() {
$date = date('Y_m_d');
- @unlink(__dir__."/logs/".UniqueConst::$serverID."/_{$date}_steplog.txt");
+ @unlink(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_steplog.txt");
}
function pushRawFileLog($path, $lines){
@@ -50,81 +50,81 @@ function eraseTnmtFightLogAll(){
}
function eraseTnmtFightLog(int $group){
- $filepath = __dir__."/logs/".UniqueConst::$serverID."/fight{$group}.txt";
+ $filepath = __DIR__."/logs/".UniqueConst::$serverID."/fight{$group}.txt";
if(file_exists($filepath)){
@unlink($filepath);
}
}
function pushTnmtFightLog(int $group, $log) {
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/fight{$group}.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/fight{$group}.txt", $log);
}
function getTnmtFightLogAll(int $group) {
- return join('
',getFormattedFileLogAll(__dir__."/logs/".UniqueConst::$serverID."/fight{$group}.txt"));
+ return join('
',getFormattedFileLogAll(__DIR__."/logs/".UniqueConst::$serverID."/fight{$group}.txt"));
}
function pushSabotageLog($log) {
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_sabotagelog.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_sabotagelog.txt", $log);
}
function getSabotageLogRecent($count) {
- return join('
', getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/_sabotagelog.txt", $count, 150));
+ return join('
', getFormattedFileLogRecent(__DIR__."/logs/".UniqueConst::$serverID."/_sabotagelog.txt", $count, 150));
}
function pushProcessLog($log) {
$date = date('Y_m_d');
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_{$date}_processlog.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_processlog.txt", $log);
}
function pushStepLog($log) {
$date = date('Y_m_d');
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_{$date}_steplog.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_steplog.txt", $log);
}
function pushLockLog($log) {
$date = date('Y_m_d');
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_{$date}_locklog.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_{$date}_locklog.txt", $log);
}
function pushAdminLog($log) {
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_adminlog.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_adminlog.txt", $log);
}
function pushAuctionLog($log) {
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/_auctionlog.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/_auctionlog.txt", $log);
}
function getAuctionLogRecent(int $count) {
- return join('
', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/_auctionlog.txt", $count, 300)));
+ return join('
', array_reverse(getFormattedFileLogRecent(__DIR__."/logs/".UniqueConst::$serverID."/_auctionlog.txt", $count, 300)));
}
function pushGenLog($general, $log) {
$no = Util::toInt($general['no']);
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/gen{$no}.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/gen{$no}.txt", $log);
}
function getGenLogRecent(int $no, int $count) {
- return join('
', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/gen{$no}.txt", $count, 300)));
+ return join('
', array_reverse(getFormattedFileLogRecent(__DIR__."/logs/".UniqueConst::$serverID."/gen{$no}.txt", $count, 300)));
}
function pushBatRes($general, $log) {
$no = Util::toInt($general['no']);
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/batres{$no}.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/batres{$no}.txt", $log);
}
function getBatResRecent(int $no, int $count) {
- return join('
', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/batres{$no}.txt", $count, 300)));
+ return join('
', array_reverse(getFormattedFileLogRecent(__DIR__."/logs/".UniqueConst::$serverID."/batres{$no}.txt", $count, 300)));
}
function pushBatLog($general, $log) {
$no = Util::toInt($general['no']);
- pushRawFileLog(__dir__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $log);
+ pushRawFileLog(__DIR__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $log);
}
function getBatLogRecent(int $no, int $count) {
- return join('
', array_reverse(getFormattedFileLogRecent(__dir__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $count, 300)));
+ return join('
', array_reverse(getFormattedFileLogRecent(__DIR__."/logs/".UniqueConst::$serverID."/batlog{$no}.txt", $count, 300)));
}
function pushOldNationStop(int $no, int $nationNo){
@@ -132,7 +132,7 @@ function pushOldNationStop(int $no, int $nationNo){
$result = [];
foreach($logPrefixList as $logPrefix){
- $path = __dir__."/logs/".UniqueConst::$serverID."/{$logPrefix}{$no}.txt";
+ $path = __DIR__."/logs/".UniqueConst::$serverID."/{$logPrefix}{$no}.txt";
if(file_exists($path)){
$fileLen = @filesize($path);
}
@@ -142,7 +142,7 @@ function pushOldNationStop(int $no, int $nationNo){
$result[$logPrefix] = $fileLen;
}
- $baseStopPath = __dir__."/logs/".UniqueConst::$serverID."/stop{$no}.txt";
+ $baseStopPath = __DIR__."/logs/".UniqueConst::$serverID."/stop{$no}.txt";
if(file_exists($baseStopPath)){
$oldValues = Json::decode(file_get_contents($baseStopPath));
}
diff --git a/hwe/func_template.php b/hwe/func_template.php
index 8ea450ff..4befe43d 100644
--- a/hwe/func_template.php
+++ b/hwe/func_template.php
@@ -15,7 +15,7 @@ function turnTable() {
$turnList = [];
$turnList[] = "";
- foreach(range(1, GameConst::$maxTurn - 1) as $turnIdx){
+ foreach(\range(1, GameConst::$maxTurn - 1) as $turnIdx){
$turnText = $turnIdx + 1;
$turnList[] = "";
}
@@ -59,7 +59,7 @@ function displayiActionObjInfo(?iAction $action){
$text = $action->getName();
}
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
return $templates->render('tooltip', [
'text'=>$text,
@@ -71,7 +71,7 @@ function displayCharInfo(string $type):string{
$info = $class->getInfo();
$text = $class->getName();
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
return $templates->render('tooltip', [
'text'=>$text,
@@ -84,7 +84,7 @@ function displaySpecialWarInfo(?string $type):string{
$info = $class->getInfo();
$name = $class->getName();
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
return $templates->render('tooltip', [
'text'=>$name,
@@ -97,7 +97,7 @@ function displaySpecialDomesticInfo(?string $type):string{
$info = $class->getInfo();
$name = $class->getName();
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
return $templates->render('tooltip', [
'text'=>$name,
@@ -117,11 +117,11 @@ function allButton() {
$call = "설문조사";
}
- if(\file_exists(__dir__."/d_setting/templates/allButton.php")){
- $templates = new \League\Plates\Engine(__dir__.'/d_setting/templates');
+ if(\file_exists(__DIR__."/d_setting/templates/allButton.php")){
+ $templates = new \League\Plates\Engine(__DIR__.'/d_setting/templates');
}
else{
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
}
@@ -152,7 +152,7 @@ function commandButton() {
$bgColor = Util::array_get($nation['color'])?:'#000000';
$fgColor = newColor($bgColor);
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
$showSecret = false;
$permission = checkSecretPermission($me);
if($permission >= 1){
@@ -210,7 +210,7 @@ function formatName(string $name, int $npc): string{
}
function getMapHtml(?string $mapTheme=null){
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
if($mapTheme === null){
$db = DB::db();
@@ -224,7 +224,7 @@ function getMapHtml(?string $mapTheme=null){
}
function getInvitationList(array $nationList){
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
foreach($nationList as &$nation){
$nation['textColor'] = newColor($nation['color']);
diff --git a/hwe/j_autoreset.php b/hwe/j_autoreset.php
index 731d3481..23bc0999 100644
--- a/hwe/j_autoreset.php
+++ b/hwe/j_autoreset.php
@@ -44,7 +44,7 @@ if($lastTurn !== null){
if($lastTurn === null){
//이미 리셋된 상태임
}
-else if(file_exists(__dir__.'/.htaccess')){
+else if(file_exists(__DIR__.'/.htaccess')){
//일단 서버는 닫혀 있음
}
else if(
diff --git a/hwe/j_install.php b/hwe/j_install.php
index 90b23395..7b924e18 100644
--- a/hwe/j_install.php
+++ b/hwe/j_install.php
@@ -82,7 +82,7 @@ if($session->userGrade < 5 && !$allowFullReset){
//리셋 가능한 조건인지 테스트
$allowReset = false;
- if(file_exists(__dir__.'/.htaccess')){
+ if(file_exists(__DIR__.'/.htaccess')){
$allowReset = true;
}
else{
diff --git a/hwe/j_install_db.php b/hwe/j_install_db.php
index e9e13860..69700b9b 100644
--- a/hwe/j_install_db.php
+++ b/hwe/j_install_db.php
@@ -29,7 +29,7 @@ if(!$host || !$port || !$username || !$password || !$dbName){
if($fullReset && class_exists('\\sammo\\DB')){
$mysqli_obj = DB::db()->get();
- if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/reset.sql'))){
+ if($mysqli_obj->multi_query(file_get_contents(__DIR__.'/sql/reset.sql'))){
while(true){
if (!$mysqli_obj->more_results()) {
break;
@@ -41,13 +41,13 @@ if($fullReset && class_exists('\\sammo\\DB')){
}
}
if($fullReset){
- FileUtil::delInDir(__dir__."/logs");
- FileUtil::delInDir(__dir__."/data");
- if(file_exists(__dir__.'/d_setting/DB.php')){
- @unlink(__dir__.'/d_setting/DB.php');
+ FileUtil::delInDir(__DIR__."/logs");
+ FileUtil::delInDir(__DIR__."/data");
+ if(file_exists(__DIR__.'/d_setting/DB.php')){
+ @unlink(__DIR__.'/d_setting/DB.php');
}
- if(file_exists(__dir__.'/d_setting/UniqueConst.php')){
- @unlink(__dir__.'/d_setting/UniqueConst.php');
+ if(file_exists(__DIR__.'/d_setting/UniqueConst.php')){
+ @unlink(__DIR__.'/d_setting/UniqueConst.php');
}
}
diff --git a/hwe/j_server_basic_info.php b/hwe/j_server_basic_info.php
index dce05aad..213f5a0d 100644
--- a/hwe/j_server_basic_info.php
+++ b/hwe/j_server_basic_info.php
@@ -3,7 +3,7 @@ namespace sammo;
include "lib.php";
-$templates = new \League\Plates\Engine(__dir__.'/templates');
+$templates = new \League\Plates\Engine(__DIR__.'/templates');
function getAutorunInfo($autorunOption){
global $templates;
@@ -54,7 +54,7 @@ if(!class_exists('\\sammo\\DB')){
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
-if(file_exists(__dir__.'/.htaccess')){
+if(file_exists(__DIR__.'/.htaccess')){
$reserved = $db->queryFirstRow(
'SELECT * FROM reserved_open ORDER BY `date` ASC LIMIT 1'
);
diff --git a/hwe/lib.php b/hwe/lib.php
index 47a357ac..dd53daef 100644
--- a/hwe/lib.php
+++ b/hwe/lib.php
@@ -2,12 +2,12 @@
namespace sammo;
/** @var \Composer\Autoload\ClassLoader $loader */
-$loader = require __dir__.'/../vendor/autoload.php';
+$loader = require __DIR__.'/../vendor/autoload.php';
$loader->addPsr4('sammo\\', __DIR__.'/sammo', true);
$loader->addClassMap((function () {
$d_settingMap = [];
- foreach (glob(__dir__.'/d_setting/*.orig.php') as $filepath) {
+ foreach (glob(__DIR__.'/d_setting/*.orig.php') as $filepath) {
$filepath = str_replace('.orig.php', '.php', $filepath);
$filename = basename($filepath);
$classname = explode('.', $filename)[0];
@@ -36,7 +36,7 @@ function Error($message='', $url="")
$e = new \Exception();
logError("aux_err", $message, '', getExceptionTraceAsString($e));
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
ob_get_flush();
WebUtil::setHeaderNoCache();
diff --git a/hwe/process_war.php b/hwe/process_war.php
index 15fee786..52d74738 100644
--- a/hwe/process_war.php
+++ b/hwe/process_war.php
@@ -215,7 +215,7 @@ function processWar_NG(
WarUnitCity $city,
int $relYear
):bool{
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
$logger = $attacker->getLogger();
diff --git a/hwe/sammo/ActionLogger.php b/hwe/sammo/ActionLogger.php
index ebba3c88..419b930c 100644
--- a/hwe/sammo/ActionLogger.php
+++ b/hwe/sammo/ActionLogger.php
@@ -264,7 +264,7 @@ class ActionLogger{
return;
}
- $templates = new \League\Plates\Engine(__dir__.'/../templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/../templates');
$render_me = [
'crewtype' => $me->getCrewTypeShortName(),
diff --git a/hwe/sammo/ResetHelper.php b/hwe/sammo/ResetHelper.php
index f3316fb2..314db752 100644
--- a/hwe/sammo/ResetHelper.php
+++ b/hwe/sammo/ResetHelper.php
@@ -7,7 +7,7 @@ class ResetHelper{
}
static public function clearDB(){
- $servRoot = realpath(__dir__.'/../');
+ $servRoot = realpath(__DIR__.'/../');
if(!file_exists($servRoot.'/logs') || !file_exists($servRoot.'/data')){
if(!is_writable($servRoot)){
@@ -195,8 +195,8 @@ class ResetHelper{
];
}
Util::generateFileUsingSimpleTemplate(
- __dir__.'/../templates/base_map.orig.js',
- __dir__.'/../d_shared/base_map.js',
+ __DIR__.'/../templates/base_map.orig.js',
+ __DIR__.'/../d_shared/base_map.js',
[
'cityPosition'=>Json::encode($cityPositions),
'regionMap'=>Json::encode(CityConst::$regionMap),
diff --git a/hwe/sammo/Scenario.php b/hwe/sammo/Scenario.php
index 115d9f73..16780708 100644
--- a/hwe/sammo/Scenario.php
+++ b/hwe/sammo/Scenario.php
@@ -2,7 +2,7 @@
namespace sammo;
class Scenario{
- const SCENARIO_PATH = __dir__.'/../scenario';
+ const SCENARIO_PATH = __DIR__.'/../scenario';
private $scenarioIdx;
private $scenarioPath;
@@ -449,10 +449,10 @@ class Scenario{
}
public function buildConf(){
- $path = __dir__.'/../d_setting';
+ $path = __DIR__.'/../d_setting';
- $mapPath = __dir__.'/../scenario/map';
- $unitPath = __dir__.'/../scenario/unit';
+ $mapPath = __DIR__.'/../scenario/map';
+ $unitPath = __DIR__.'/../scenario/unit';
$mapName = $this->gameConf['mapName'];
$unitSet = $this->gameConf['unitSet'];
diff --git a/i_entrance/admin_userlist.php b/i_entrance/admin_userlist.php
index 2b53a7e2..6ed7902c 100644
--- a/i_entrance/admin_userlist.php
+++ b/i_entrance/admin_userlist.php
@@ -1,6 +1,6 @@
diff --git a/i_entrance/entrance.php b/i_entrance/entrance.php
index b5223c2b..7b5499bc 100644
--- a/i_entrance/entrance.php
+++ b/i_entrance/entrance.php
@@ -1,12 +1,12 @@
setReadOnly();
-$templates = new \League\Plates\Engine(__dir__.'/templates');
+$templates = new \League\Plates\Engine(__DIR__.'/templates');
$db = RootDB::db();
$notice = $db->queryFirstField('SELECT `NOTICE` FROM `system` WHERE `NO`=1');
diff --git a/i_entrance/j_change_password.php b/i_entrance/j_change_password.php
index c95622df..878443ab 100644
--- a/i_entrance/j_change_password.php
+++ b/i_entrance/j_change_password.php
@@ -1,7 +1,7 @@
setReadOnly();
$userID = Session::getUserID();
diff --git a/i_entrance/j_delete_me.php b/i_entrance/j_delete_me.php
index e7fbecdb..00a2a245 100644
--- a/i_entrance/j_delete_me.php
+++ b/i_entrance/j_delete_me.php
@@ -1,7 +1,7 @@
setReadOnly();
$userID = Session::getUserID();
diff --git a/i_entrance/j_get_user_info.php b/i_entrance/j_get_user_info.php
index 2c1bb432..45ff4a48 100644
--- a/i_entrance/j_get_user_info.php
+++ b/i_entrance/j_get_user_info.php
@@ -1,7 +1,7 @@
setReadOnly();
$userID = Session::getUserID();
diff --git a/i_entrance/j_get_userlist.php b/i_entrance/j_get_userlist.php
index 301d1222..505112f8 100644
--- a/i_entrance/j_get_userlist.php
+++ b/i_entrance/j_get_userlist.php
@@ -1,7 +1,7 @@
setReadOnly();
$db = RootDB::db();
diff --git a/i_entrance/j_icon_change.php b/i_entrance/j_icon_change.php
index 766c36d0..edcc7b8d 100644
--- a/i_entrance/j_icon_change.php
+++ b/i_entrance/j_icon_change.php
@@ -1,7 +1,7 @@
setReadOnly();
$userID = Session::getUserID();
diff --git a/i_entrance/j_icon_delete.php b/i_entrance/j_icon_delete.php
index 36307616..b11cad34 100644
--- a/i_entrance/j_icon_delete.php
+++ b/i_entrance/j_icon_delete.php
@@ -1,7 +1,7 @@
setReadOnly();
$userID = Session::getUserID();
diff --git a/i_entrance/j_logout.php b/i_entrance/j_logout.php
index bf56974f..1c9ed255 100644
--- a/i_entrance/j_logout.php
+++ b/i_entrance/j_logout.php
@@ -1,7 +1,7 @@
true,
diff --git a/i_entrance/j_server_change_status.php b/i_entrance/j_server_change_status.php
index 5a7f336b..146718a0 100644
--- a/i_entrance/j_server_change_status.php
+++ b/i_entrance/j_server_change_status.php
@@ -1,7 +1,7 @@
setReadOnly();
if($session->userGrade < 5 && !$session->acl){
diff --git a/i_entrance/j_server_get_status.php b/i_entrance/j_server_get_status.php
index b78448e9..c5b05bf2 100644
--- a/i_entrance/j_server_get_status.php
+++ b/i_entrance/j_server_get_status.php
@@ -1,7 +1,7 @@
setReadOnly();
diff --git a/i_entrance/user_info.php b/i_entrance/user_info.php
index 0b551792..93be244c 100644
--- a/i_entrance/user_info.php
+++ b/i_entrance/user_info.php
@@ -1,6 +1,6 @@
diff --git a/i_other/help.php b/i_other/help.php
index e925e2c3..7dc04287 100644
--- a/i_other/help.php
+++ b/i_other/help.php
@@ -1,7 +1,7 @@
setReadOnly();
diff --git a/src/sammo/Setting.php b/src/sammo/Setting.php
index c5c51903..9a8210f4 100644
--- a/src/sammo/Setting.php
+++ b/src/sammo/Setting.php
@@ -103,7 +103,7 @@ class Setting
if (!file_exists($this->basepath) || !is_dir($this->basepath)) {
return false;
}
- $templates = new \League\Plates\Engine(__dir__.'/templates');
+ $templates = new \League\Plates\Engine(__DIR__.'/templates');
//TODO: .htaccess가 서버 오픈에도 사용될 수 있으니 별도의 방법이 필요함
$allow_ip = Util::get_client_ip(false);
if (Util::starts_with($allow_ip, '192.168.') ||