phpuri 추가. root, shredIcon, gameIage 경로 계산 코드를 추가
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Deny from all
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace kakao;
|
||||
|
||||
class KakaoKey{
|
||||
const REST_KEY = '_tK_REST_API_KEY_';
|
||||
const ADMIN_KEY = '_tK_ADMIN_KEY_';
|
||||
const REDIRECT_URI = '_tK_REDIRECT_URI_';
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
class RootDB
|
||||
{
|
||||
private static $uDB = null;
|
||||
|
||||
private static $host = '_tK_host_';
|
||||
private static $user = '_tK_user_';
|
||||
private static $password = '_tK_password_';
|
||||
private static $dbName = '_tK_dbName_';
|
||||
private static $port = _tK_port_;
|
||||
private static $encoding = 'utf8mb4';
|
||||
|
||||
private static $globalSalt = '_tK_globalSalt_';
|
||||
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* DB 객체 생성
|
||||
*
|
||||
* @return \MeekroDB
|
||||
* @suppress PhanTypeMismatchProperty
|
||||
*/
|
||||
public static function db()
|
||||
{
|
||||
if (self::$uDB === null) {
|
||||
self::$uDB = new \MeekroDB(self::$host, self::$user, self::$password, self::$dbName, self::$port, self::$encoding);
|
||||
self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true;
|
||||
}
|
||||
return self::$uDB;
|
||||
}
|
||||
|
||||
/**
|
||||
* 비밀번호 해시용 전역 SALT 반환
|
||||
* 비밀번호는 sha512(usersalt|sha512(globalsalt|password|globalsalt)|usersalt); 순임
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getGlobalSalt()
|
||||
{
|
||||
return self::$globalSalt;
|
||||
}
|
||||
|
||||
/**
|
||||
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getServerBasepath()
|
||||
{
|
||||
//FIXME: 더 좋은 위치가 있을 것.
|
||||
return self::$globalSalt;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
class ServConfig
|
||||
{
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public static $serverWebPath = '_tK_serverBasePath_';
|
||||
public static $sharedIconPath = '_tK_sharedIconPath_';
|
||||
public static $gameImagePath = "_tK_gameImagePath_";
|
||||
|
||||
public static function getSharedIconPath() : string
|
||||
{
|
||||
static $path = '';
|
||||
if($path){
|
||||
$path;
|
||||
}
|
||||
|
||||
if (Util::starts_with('http', self::$sharedIconPath)
|
||||
|| Util::starts_with('//', self::$sharedIconPath))
|
||||
{
|
||||
$path = self::$sharedIconPath;
|
||||
}
|
||||
else{
|
||||
$path = self::$serverWebPath.'/'.self::$sharedIconPath;
|
||||
}
|
||||
return $path;
|
||||
}
|
||||
|
||||
public static function getUserIconPath() : string
|
||||
{
|
||||
return AppConf::getUserIconPathWeb();
|
||||
}
|
||||
|
||||
public static function getGameImagePath() : string
|
||||
{
|
||||
static $path = '';
|
||||
if($path){
|
||||
$path;
|
||||
}
|
||||
|
||||
if (Util::starts_with('http', self::$gameImagePath)
|
||||
|| Util::starts_with('//', self::$gameImagePath))
|
||||
{
|
||||
$path = self::$gameImagePath;
|
||||
}
|
||||
else{
|
||||
$path = self::$serverWebPath.'/'.self::$gameImagePath;
|
||||
}
|
||||
return $path;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getServerBasepath() : string
|
||||
{
|
||||
return self::$serverWebPath;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
@charset "utf-8";
|
||||
|
||||
.bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); }
|
||||
.bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); }
|
||||
.bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); }
|
||||
|
||||
.img_back {background-image:url('_tK_gameImagePath_/back.jpg'); }
|
||||
|
||||
/* 레거시. */
|
||||
#bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); }
|
||||
#bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); }
|
||||
#bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); }
|
||||
|
||||
.map_detail .map_title{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ltitle.jpg') no-repeat left,
|
||||
url('_tK_gameImagePath_/rtitle.jpg') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_spring .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/spring.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_summer .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/summer.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_fall .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/fall.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_detail.map_winter .map_title_text{
|
||||
background:
|
||||
url('_tK_gameImagePath_/ad.gif') no-repeat left,
|
||||
url('_tK_gameImagePath_/winter.gif') no-repeat right;
|
||||
}
|
||||
|
||||
.map_spring .map_body{
|
||||
background: url('_tK_gameImagePath_/map1.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_summer .map_body{
|
||||
background: url('_tK_gameImagePath_/map2.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_fall .map_body{
|
||||
background: url('_tK_gameImagePath_/map3.jpg') no-repeat;
|
||||
}
|
||||
|
||||
.map_winter .map_body{
|
||||
background: url('_tK_gameImagePath_/map4.jpg') no-repeat;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
window.pathConfig = {
|
||||
root:"_tK_serverBasePath_",
|
||||
sharedIcon:"_tK_sharedIconPath_",
|
||||
gameImage:"_tK_gameImagePath_"
|
||||
};
|
||||
Reference in New Issue
Block a user