경로 수정중
This commit is contained in:
@ -24,7 +24,7 @@ if ($url)
|
||||
else
|
||||
$urlencode = urlencode($_SERVER['REQUEST_URI']);
|
||||
|
||||
if ($config['cf_https_url']) {
|
||||
if (G4_HTTPS_DOMAIN) {
|
||||
$login_url = $_GET['url'];
|
||||
if ($login_url) {
|
||||
if (preg_match("/^\.\.\//", $url)) {
|
||||
@ -35,10 +35,10 @@ if ($config['cf_https_url']) {
|
||||
$path = urlencode($purl['path']);
|
||||
$urlencode = preg_replace("/".$path."/", "", $urlencode);
|
||||
}
|
||||
$login_url = $g4[url].$urlencode;
|
||||
$login_url = G4_URL.$urlencode;
|
||||
}
|
||||
} else {
|
||||
$login_url = $g4[url];
|
||||
$login_url = G4_URL;
|
||||
}
|
||||
} else {
|
||||
$login_url = $urlencode;
|
||||
|
||||
@ -71,7 +71,7 @@ if ($url) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$link = G4_PATH;
|
||||
$link = G4_URL;
|
||||
}
|
||||
|
||||
goto_url($link);
|
||||
|
||||
@ -125,8 +125,8 @@ ini_set("session.gc_maxlifetime", 10800); // session data의 garbage collection
|
||||
ini_set("session.gc_probability", 1); // session.gc_probability는 session.gc_divisor와 연계하여 gc(쓰레기 수거) 루틴의 시작 확률을 관리합니다. 기본값은 1입니다. 자세한 내용은 session.gc_divisor를 참고하십시오.
|
||||
ini_set("session.gc_divisor", 100); // session.gc_divisor는 session.gc_probability와 결합하여 각 세션 초기화 시에 gc(쓰레기 수거) 프로세스를 시작할 확률을 정의합니다. 확률은 gc_probability/gc_divisor를 사용하여 계산합니다. 즉, 1/100은 각 요청시에 GC 프로세스를 시작할 확률이 1%입니다. session.gc_divisor의 기본값은 100입니다.
|
||||
|
||||
session_set_cookie_params(0, "/");
|
||||
ini_set("session.cookie_domain", $g4['cookie_domain']);
|
||||
session_set_cookie_params(0, '/');
|
||||
ini_set("session.cookie_domain", G4_COOKIE_DOMAIN);
|
||||
|
||||
@session_start();
|
||||
|
||||
|
||||
36
config.php
36
config.php
@ -23,19 +23,23 @@ function g4_path()
|
||||
return $result;
|
||||
}
|
||||
|
||||
$g4_path = g4_path();
|
||||
|
||||
//==============================================================================
|
||||
// 상수 선언
|
||||
//------------------------------------------------------------------------------
|
||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||
define('_GNUBOARD_', true);
|
||||
|
||||
$g4_path = g4_path();
|
||||
|
||||
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
|
||||
define('G4_ADMIN_DIR', 'adm');
|
||||
define('G4_BBS_DIR', 'bbs');
|
||||
|
||||
define('G4_URL', $g4_path['url']);
|
||||
if (G4_DOMAIN) {
|
||||
define('G4_URL', G4_DOMAIN);
|
||||
} else {
|
||||
define('G4_URL', $g4_path['url']);
|
||||
}
|
||||
define('G4_ADMIN_URL', G4_URL.'/'.G4_ADMIN_DIR);
|
||||
define('G4_BBS_URL', G4_URL.'/'.G4_BBS_DIR);
|
||||
define('G4_CSS_URL', G4_URL.'/css');
|
||||
@ -61,6 +65,9 @@ define('G4_CKEDITOR_PATH', G4_BBS_PATH.'/ckeditor');
|
||||
define('G4_CACHE_PATH', G4_DATA_PATH.'/cache');
|
||||
define('G4_EDITOR_PATH', G4_DATA_PATH.'/editor');
|
||||
|
||||
unset($g4_path);
|
||||
|
||||
|
||||
// 입력값 검사 상수 (숫자를 변경하시면 안됩니다.)
|
||||
define('G4_ALPHAUPPER', 1); // 영대문자
|
||||
define('G4_ALPHALOWER', 2); // 영소문자
|
||||
@ -121,31 +128,8 @@ $g4['token_table'] = $g4['table_prefix'] . 'token'; // 토큰
|
||||
// 기타
|
||||
//
|
||||
|
||||
// www.sir.co.kr 과 sir.co.kr 도메인은 서로 다른 도메인으로 인식합니다. 쿠키를 공유하려면 .sir.co.kr 과 같이 입력하세요.
|
||||
// 이곳에 입력이 없다면 www 붙은 도메인과 그렇지 않은 도메인은 쿠키를 공유하지 않으므로 로그인이 풀릴 수 있습니다.
|
||||
$g4['cookie_domain'] = '';
|
||||
define('G4_COOKIE_DOMAIN', '');
|
||||
|
||||
// 게시판에서 링크의 기본갯수를 말합니다.
|
||||
// 필드를 추가하면 이 숫자를 필드수에 맞게 늘려주십시오.
|
||||
//$g4['link_count'] = 2;
|
||||
define('G4_LINK_COUNT', 2);
|
||||
|
||||
//$g4['charset'] = 'utf-8';
|
||||
|
||||
//$g4['token_time'] = 3; // 토큰 유효시간
|
||||
|
||||
// config.php 가 있는곳의 웹경로. 뒤에 / 를 붙이지 마세요.
|
||||
// 예) http://g4.sir.co.kr
|
||||
//$g4['url'] = '';
|
||||
$g4['https_url'] = '';
|
||||
// 입력예
|
||||
//$g4['url'] = "http://www.sir.co.kr";
|
||||
//$g4['https_url'] = "https://www.sir.co.kr";
|
||||
|
||||
//$g4['dbconfig'] = 'data/dbconfig.php';
|
||||
|
||||
//$g4['js_file'] = array();
|
||||
|
||||
unset($g4_path);
|
||||
?>
|
||||
|
||||
@ -57,9 +57,10 @@ var g4_is_member = "<?=isset($is_member)?$is_member:'';?>";
|
||||
var g4_is_admin = "<?=isset($is_admin)?$is_admin:'';?>";
|
||||
var g4_bo_table = "<?=isset($bo_table)?$bo_table:'';?>";
|
||||
var g4_sca = "<?=isset($sca)?$sca:'';?>";
|
||||
var g4_charset = "<?=$g4['charset']?>";
|
||||
var g4_cookie_domain = "<?=$g4['cookie_domain']?>";
|
||||
var g4_cookie_domain = "<?=G4_COOKIE_DOMAIN?>";
|
||||
// 사라질 변수
|
||||
var g4_is_gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
|
||||
// 사라질 변수
|
||||
var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
|
||||
<? if ($is_admin) { echo 'var g4_admin_url = "'.G4_ADMIN_URL.'";'; }
|
||||
?>
|
||||
|
||||
@ -112,7 +112,7 @@ function set_cookie($cookie_name, $value, $expire)
|
||||
{
|
||||
global $g4;
|
||||
|
||||
setcookie(md5($cookie_name), base64_encode($value), $g4['server_time'] + $expire, '/', $g4['cookie_domain']);
|
||||
setcookie(md5($cookie_name), base64_encode($value), $g4['server_time'] + $expire, '/', G4_COOKIE_DOMAIN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ function outlogin($skin_dir='basic')
|
||||
$is_auth = true;
|
||||
}
|
||||
|
||||
if ($config['cf_https_url']) {
|
||||
if (G4_HTTPS_DOMAIN) {
|
||||
$outlogin_url = $_GET['url'];
|
||||
if ($outlogin_url) {
|
||||
if (preg_match("/^\.\.\//", $outlogin_url)) {
|
||||
@ -40,11 +40,11 @@ function outlogin($skin_dir='basic')
|
||||
$path = urlencode($purl['path']);
|
||||
$urlencode = preg_replace("/".$path."/", "", $urlencode);
|
||||
}
|
||||
$outlogin_url = $g4['url'].$urlencode;
|
||||
$outlogin_url = G4_URL.$urlencode;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$outlogin_url = $g4['url'];
|
||||
$outlogin_url = G4_URL;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user