Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -41,7 +41,8 @@ if($error) {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
alert("<? echo $msg; ?>");
|
alert("<? echo $msg; ?>");
|
||||||
document.location.href = "<? echo $url; ?>";
|
//document.location.href = "<? echo $url; ?>";
|
||||||
|
document.location.replace("<? echo $url; ?>");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|||||||
@ -24,7 +24,7 @@ if ($url)
|
|||||||
else
|
else
|
||||||
$urlencode = urlencode($_SERVER['REQUEST_URI']);
|
$urlencode = urlencode($_SERVER['REQUEST_URI']);
|
||||||
|
|
||||||
if ($config['cf_https_url']) {
|
if (G4_HTTPS_DOMAIN) {
|
||||||
$login_url = $_GET['url'];
|
$login_url = $_GET['url'];
|
||||||
if ($login_url) {
|
if ($login_url) {
|
||||||
if (preg_match("/^\.\.\//", $url)) {
|
if (preg_match("/^\.\.\//", $url)) {
|
||||||
@ -35,10 +35,10 @@ if ($config['cf_https_url']) {
|
|||||||
$path = urlencode($purl['path']);
|
$path = urlencode($purl['path']);
|
||||||
$urlencode = preg_replace("/".$path."/", "", $urlencode);
|
$urlencode = preg_replace("/".$path."/", "", $urlencode);
|
||||||
}
|
}
|
||||||
$login_url = $g4[url].$urlencode;
|
$login_url = $urlencode;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$login_url = $g4[url];
|
$login_url = G4_URL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$login_url = $urlencode;
|
$login_url = $urlencode;
|
||||||
|
|||||||
@ -71,7 +71,7 @@ if ($url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$link = G4_PATH;
|
$link = G4_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
goto_url($link);
|
goto_url($link);
|
||||||
|
|||||||
@ -35,11 +35,7 @@ if ($me_recv_mb_id)
|
|||||||
$g4['title'] = '쪽지 보내기';
|
$g4['title'] = '쪽지 보내기';
|
||||||
include_once(G4_PATH.'/head.sub.php');
|
include_once(G4_PATH.'/head.sub.php');
|
||||||
|
|
||||||
if ($g4['https_url'])
|
$memo_action_url = G4_HTTPS_BBS_URL."/memo_form_update.php";
|
||||||
$memo_action_url = "{$g4['https_url']}/{$g4['bbs']}/memo_form_update.php";
|
|
||||||
else
|
|
||||||
$memo_action_url = "{$g4['url']}/{$g4['bbs']}/memo_form_update.php";
|
|
||||||
|
|
||||||
include_once($member_skin_path.'/memo_form.skin.php');
|
include_once($member_skin_path.'/memo_form.skin.php');
|
||||||
|
|
||||||
include_once(G4_PATH.'/tail.sub.php');
|
include_once(G4_PATH.'/tail.sub.php');
|
||||||
|
|||||||
@ -9,12 +9,7 @@ if ($is_member) {
|
|||||||
$g4['title'] = '회원아이디/패스워드 찾기';
|
$g4['title'] = '회원아이디/패스워드 찾기';
|
||||||
include_once(G4_PATH.'/head.sub.php');
|
include_once(G4_PATH.'/head.sub.php');
|
||||||
|
|
||||||
if ($g4['https_url'])
|
$action_url = G4_HTTPS_BBS_URL."/password_lost2.php";
|
||||||
//$action_url = "{$g4['https_url']}/{$g4['bbs']}/password_lost2.php";
|
|
||||||
$action_url = G4_BBS_URL."/password_lost2.php";
|
|
||||||
else
|
|
||||||
$action_url = G4_BBS_URL."/password_lost2.php";
|
|
||||||
|
|
||||||
include_once($member_skin_path.'/password_lost.skin.php');
|
include_once($member_skin_path.'/password_lost.skin.php');
|
||||||
|
|
||||||
include_once(G4_PATH.'/tail.sub.php');
|
include_once(G4_PATH.'/tail.sub.php');
|
||||||
|
|||||||
@ -349,10 +349,7 @@ if ($is_guest) {
|
|||||||
include_once(G4_PATH.'/head.sub.php');
|
include_once(G4_PATH.'/head.sub.php');
|
||||||
include_once('./board_head.php');
|
include_once('./board_head.php');
|
||||||
|
|
||||||
if ($g4['https_url'])
|
$action_url = G4_HTTPS_BBS_URL."/write_update.php";
|
||||||
$action_url = "{$g4['https_url']}/{$g4['bbs']}/write_update.php";
|
|
||||||
else
|
|
||||||
$action_url = G4_BBS_URL."/write_update.php";
|
|
||||||
|
|
||||||
include_once ($board_skin_path.'/write.skin.php');
|
include_once ($board_skin_path.'/write.skin.php');
|
||||||
|
|
||||||
|
|||||||
@ -605,13 +605,9 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
|
|||||||
@include_once ($board_skin_path.'/write_update.skin.php');
|
@include_once ($board_skin_path.'/write_update.skin.php');
|
||||||
|
|
||||||
@include_once($board_skin_path.'/write_update.tail.skin.php');
|
@include_once($board_skin_path.'/write_update.tail.skin.php');
|
||||||
if ($g4['https_url'])
|
|
||||||
$https_url = $g4['url'].'/'.$g4['bbs'];
|
|
||||||
else
|
|
||||||
$https_url = '.';
|
|
||||||
|
|
||||||
if ($file_upload_msg)
|
if ($file_upload_msg)
|
||||||
alert($file_upload_msg, $https_url.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr);
|
alert($file_upload_msg, G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr);
|
||||||
else
|
else
|
||||||
goto_url($https_url.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr);
|
goto_url(G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr);
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -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_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입니다.
|
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, "/");
|
session_set_cookie_params(0, '/');
|
||||||
ini_set("session.cookie_domain", $g4['cookie_domain']);
|
ini_set("session.cookie_domain", G4_COOKIE_DOMAIN);
|
||||||
|
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
|
|||||||
36
config.php
36
config.php
@ -23,19 +23,23 @@ function g4_path()
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
$g4_path = g4_path();
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// 상수 선언
|
// 상수 선언
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||||
define('_GNUBOARD_', true);
|
define('_GNUBOARD_', true);
|
||||||
|
|
||||||
|
$g4_path = g4_path();
|
||||||
|
|
||||||
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
|
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
|
||||||
define('G4_ADMIN_DIR', 'adm');
|
define('G4_ADMIN_DIR', 'adm');
|
||||||
define('G4_BBS_DIR', 'bbs');
|
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_ADMIN_URL', G4_URL.'/'.G4_ADMIN_DIR);
|
||||||
define('G4_BBS_URL', G4_URL.'/'.G4_BBS_DIR);
|
define('G4_BBS_URL', G4_URL.'/'.G4_BBS_DIR);
|
||||||
define('G4_CSS_URL', G4_URL.'/css');
|
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_CACHE_PATH', G4_DATA_PATH.'/cache');
|
||||||
define('G4_EDITOR_PATH', G4_DATA_PATH.'/editor');
|
define('G4_EDITOR_PATH', G4_DATA_PATH.'/editor');
|
||||||
|
|
||||||
|
unset($g4_path);
|
||||||
|
|
||||||
|
|
||||||
// 입력값 검사 상수 (숫자를 변경하시면 안됩니다.)
|
// 입력값 검사 상수 (숫자를 변경하시면 안됩니다.)
|
||||||
define('G4_ALPHAUPPER', 1); // 영대문자
|
define('G4_ALPHAUPPER', 1); // 영대문자
|
||||||
define('G4_ALPHALOWER', 2); // 영소문자
|
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;
|
//$g4['link_count'] = 2;
|
||||||
define('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);
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,66 +0,0 @@
|
|||||||
<?
|
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
|
||||||
|
|
||||||
//===================================================================================
|
|
||||||
// g4s 디렉토리 경로
|
|
||||||
//-----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
$g4['https_bbs_url'] = $g4['bbs_url'];
|
|
||||||
if ($g4['https_url']) {
|
|
||||||
$g4['https_bbs_url'] = $g4['https_url'].'/'.$g4['bbs'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$g4['extend_dir'] = 'extend';
|
|
||||||
$g4['extend_path'] = $g4['path'].'/'.$g4['extend_dir'];
|
|
||||||
|
|
||||||
$g4['data_dir'] = 'data';
|
|
||||||
$g4['data_url'] = $g4['url'].'/'.$g4['data_dir'];
|
|
||||||
$g4['data_path'] = $g4['path'].'/'.$g4['data_dir'];
|
|
||||||
|
|
||||||
$g4['cache_dir'] = 'cache';
|
|
||||||
$g4['cache_path'] = $g4['data_path'].'/'.$g4['cache_dir'];
|
|
||||||
|
|
||||||
$g4['session_dir'] = 'session';
|
|
||||||
$g4['session_path'] = $g4['data_path'].'/'.$g4['session_dir'];
|
|
||||||
|
|
||||||
$g4['cache_latest_dir'] = $g4['cache_dir'].'/latest';
|
|
||||||
$g4['cache_member_dir'] = $g4['cache_dir'].'/member';
|
|
||||||
$g4['cache_captcha_dir'] = $g4['cache_dir'].'/captcha';
|
|
||||||
|
|
||||||
$g4['cache_latest_path'] = $g4['data_path'].'/'.$g4['cache_latest_dir'];
|
|
||||||
$g4['cache_member_path'] = $g4['data_path'].'/'.$g4['cache_member_dir'];
|
|
||||||
$g4['cache_captcha_path'] = $g4['data_path'].'/'.$g4['cache_captcha_dir'];
|
|
||||||
|
|
||||||
// g4s 기본 DHTML EDITOR
|
|
||||||
if (!defined('G4_EDITOR')) define('G4_EDITOR', 0);
|
|
||||||
if (G4_EDITOR) {
|
|
||||||
$g4['ckeditor_dir'] = 'ckeditor';
|
|
||||||
$g4['ckeditor_url'] = $g4['bbs_url'].'/'.$g4['ckeditor_dir'];
|
|
||||||
$g4['ckeditor_path'] = $g4['bbs_path'].'/'.$g4['ckeditor_dir'];
|
|
||||||
$g4['ckeditor_data_path'] = $g4['data_path'].'/editor';
|
|
||||||
$g4['ckeditor_data_url'] = $g4['data_url'].'/editor';
|
|
||||||
|
|
||||||
include_once($g4['ckeditor_path']."/ckeditor.lib.php");
|
|
||||||
|
|
||||||
$g4['js_code'][] = "var g4_ckeditor_path = \"{$g4['ckeditor_path']}\";";
|
|
||||||
$g4['js_file'][] = $g4['ckeditor_url']."/ckeditor.js";
|
|
||||||
$g4['js_file'][] = $g4['ckeditor_url']."/config.js";
|
|
||||||
}
|
|
||||||
|
|
||||||
// g4s 기본 CAPTCHA
|
|
||||||
if (!defined('G4_CAPTCHA')) define('G4_CAPTCHA', 0);
|
|
||||||
if (G4_CAPTCHA) {
|
|
||||||
$g4['gcaptcha_dir'] = 'gcaptcha';
|
|
||||||
$g4['gcaptcha_url'] = $g4['bbs_url'].'/'.$g4['gcaptcha_dir'];
|
|
||||||
$g4['gcaptcha_path'] = $g4['bbs_path'].'/'.$g4['gcaptcha_dir'];
|
|
||||||
$g4['gcaptcha_fonts'] = $g4['gcaptcha_path'].'/fonts';
|
|
||||||
$g4['gcaptcha_wavs'] = $g4['gcaptcha_path'].'/wavs';
|
|
||||||
|
|
||||||
include_once($g4['gcaptcha_path']."/gcaptcha.lib.php");
|
|
||||||
|
|
||||||
$g4['js_code'][] = "var g4_gcaptcha_path = \"{$g4['gcaptcha_path']}\";";
|
|
||||||
$g4['js_file'][] = $g4['gcaptcha_url']."/gcaptcha.js";
|
|
||||||
|
|
||||||
}
|
|
||||||
//===================================================================================
|
|
||||||
?>
|
|
||||||
@ -57,9 +57,10 @@ var g4_is_member = "<?=isset($is_member)?$is_member:'';?>";
|
|||||||
var g4_is_admin = "<?=isset($is_admin)?$is_admin:'';?>";
|
var g4_is_admin = "<?=isset($is_admin)?$is_admin:'';?>";
|
||||||
var g4_bo_table = "<?=isset($bo_table)?$bo_table:'';?>";
|
var g4_bo_table = "<?=isset($bo_table)?$bo_table:'';?>";
|
||||||
var g4_sca = "<?=isset($sca)?$sca:'';?>";
|
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_gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
|
||||||
|
// 사라질 변수
|
||||||
var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
|
var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
|
||||||
<? if ($is_admin) { echo 'var g4_admin_url = "'.G4_ADMIN_URL.'";'; }
|
<? if ($is_admin) { echo 'var g4_admin_url = "'.G4_ADMIN_URL.'";'; }
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -112,7 +112,7 @@ function set_cookie($cookie_name, $value, $expire)
|
|||||||
{
|
{
|
||||||
global $g4;
|
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;
|
$is_auth = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config['cf_https_url']) {
|
if (G4_HTTPS_DOMAIN) {
|
||||||
$outlogin_url = $_GET['url'];
|
$outlogin_url = $_GET['url'];
|
||||||
if ($outlogin_url) {
|
if ($outlogin_url) {
|
||||||
if (preg_match("/^\.\.\//", $outlogin_url)) {
|
if (preg_match("/^\.\.\//", $outlogin_url)) {
|
||||||
@ -40,11 +40,11 @@ function outlogin($skin_dir='basic')
|
|||||||
$path = urlencode($purl['path']);
|
$path = urlencode($purl['path']);
|
||||||
$urlencode = preg_replace("/".$path."/", "", $urlencode);
|
$urlencode = preg_replace("/".$path."/", "", $urlencode);
|
||||||
}
|
}
|
||||||
$outlogin_url = $g4['url'].$urlencode;
|
$outlogin_url = G4_URL.$urlencode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$outlogin_url = $g4['url'];
|
$outlogin_url = G4_URL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -31,7 +31,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="btn_confirm">
|
<div class="btn_confirm">
|
||||||
<a href="<?=$g4['url']?>/">메인으로 돌아가기</a>
|
<a href="<?=G4_URL?>/">메인으로 돌아가기</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user