https 보안서버주소 해결중
This commit is contained in:
@ -9,18 +9,9 @@ $token = get_token();
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
// 쪽지보낼시 차감 포인트 필드 추가 : 061218
|
||||
sql_query(" ALTER TABLE {$g4['config_table']} ADD cf_memo_send_point INT NOT NULL AFTER cf_login_point ", FALSE);
|
||||
|
||||
// 개인정보보호정책 필드 추가 : 061121
|
||||
$sql = " ALTER TABLE {$g4['config_table']} ADD cf_privacy TEXT NOT NULL AFTER cf_stipulation ";
|
||||
sql_query($sql, FALSE);
|
||||
if (!trim($config['cf_privacy'])) {
|
||||
$config['cf_privacy'] = '해당 홈페이지에 맞는 개인정보취급방침을 입력합니다.';
|
||||
}
|
||||
|
||||
// 메일발송전용 이메일주소
|
||||
if (!isset($config['cf_email_admin'])) {
|
||||
sql_query(" ALTER TABLE {$g4['config_table']} ADD cf_email_admin VARCHAR(255) NOT NULL DEFAULT '' AFTER cf_email_use ", FALSE);
|
||||
sql_query(" ALTER TABLE {$g4['config_table']} ADD cf_email_admin VARCHAR(255) NOT NULL DEFAULT '' AFTER cf_email_use ", TRUE);
|
||||
}
|
||||
|
||||
$g4['title'] = '환경설정';
|
||||
@ -175,6 +166,13 @@ include_once ('./admin.head.php');
|
||||
<textarea id="cf_intercept_ip" name="cf_intercept_ip"><?=$config['cf_intercept_ip']?> </textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_https_url">보안서버주소</label></th>
|
||||
<td colspan="3">
|
||||
<?=help('회원가입, 글쓰기에 사용되는 https 로 시작되는 주소를 말합니다. 포트가 있다면 도메인 뒤에 :443 과 같이 입력하세요.<br>보안서버주소가 없다면 공란으로 두시면 되며 보안서버주소 뒤에 / 는 붙이지 않습니다.<br>입력 예)https://www.sir.co.kr:443')?>
|
||||
<input type="text" id="cf_https_url" name="cf_https_url" value="<?=$config['cf_https_url']?>" size="70">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ if ($url)
|
||||
else
|
||||
$urlencode = urlencode($_SERVER['REQUEST_URI']);
|
||||
|
||||
if ($g4['https_url']) {
|
||||
if ($config['cf_https_url']) {
|
||||
$login_url = $_GET['url'];
|
||||
if ($login_url) {
|
||||
if (preg_match("/^\.\.\//", $url)) {
|
||||
@ -44,16 +44,12 @@ if ($g4['https_url']) {
|
||||
$login_url = $urlencode;
|
||||
}
|
||||
|
||||
if (G4_HTTPS_URL)
|
||||
$login_action_url = G4_HTTPS_URL."/$g4[bbs]/login_check.php";
|
||||
else
|
||||
$login_action_url = G4_BBS_URL."/login_check.php";
|
||||
$login_action_url = G4_HTTPS_BBS_URL."/login_check.php";
|
||||
|
||||
// 로그인 스킨이 없는 경우 관리자 페이지 접속이 안되는 것을 막기 위하여 기본 스킨으로 대체
|
||||
$login_file = $member_skin_path.'/login.skin.php';
|
||||
if (!file_exists($login_file)) {
|
||||
$member_skin_path = G4_PATH.'/'.$g4['skin_dir'].'/member/basic';
|
||||
}
|
||||
if (!file_exists($login_file))
|
||||
$member_skin_path = G4_SKIN_PATH.'/member/basic';
|
||||
|
||||
include_once($member_skin_path.'/login.skin.php');
|
||||
|
||||
|
||||
@ -9,14 +9,11 @@ if ($is_member) {
|
||||
// 세션을 지웁니다.
|
||||
set_session("ss_mb_reg", "");
|
||||
|
||||
if (G4_HTTPS_URL) {
|
||||
$register_action_url = G4_HTTPS_URL.'/bbs/register_form.php';
|
||||
} else {
|
||||
$register_action_url = G4_BBS_URL.'/register_form.php';
|
||||
}
|
||||
|
||||
$g4['title'] = '회원가입약관';
|
||||
include_once('./_head.php');
|
||||
|
||||
$register_action_url = G4_HTTPS_BBS_URL.'/register_form.php';
|
||||
include_once($member_skin_path.'/register.skin.php');
|
||||
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
|
||||
@ -13,18 +13,18 @@ if ($w == "") {
|
||||
// 경고창이 뜨는것을 막기위해 아래의 코드로 대체
|
||||
// alert("이미 로그인중이므로 회원 가입 하실 수 없습니다.", "./");
|
||||
if ($is_member) {
|
||||
goto_url(G4_PATH);
|
||||
goto_url(G4_URL);
|
||||
}
|
||||
|
||||
// 리퍼러 체크
|
||||
referer_check();
|
||||
|
||||
if (!isset($_POST['agree']) || !$_POST['agree']) {
|
||||
alert('회원가입약관의 내용에 동의하셔야 회원가입 하실 수 있습니다.', './register.php');
|
||||
alert('회원가입약관의 내용에 동의하셔야 회원가입 하실 수 있습니다.', G4_BBS_URL.'/register.php');
|
||||
}
|
||||
|
||||
if (!isset($_POST['agree2']) || !$_POST['agree2']) {
|
||||
alert('개인정보수집이용안내의 내용에 동의하셔야 회원가입 하실 수 있습니다.', './register.php');
|
||||
alert('개인정보수집이용안내의 내용에 동의하셔야 회원가입 하실 수 있습니다.', G4_BBS_URL.'/register.php');
|
||||
}
|
||||
|
||||
$member['mb_birth'] = '';
|
||||
@ -100,25 +100,17 @@ if ($w == "") {
|
||||
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
$captcha_html = captcha_html();
|
||||
include_once('./_head.php');
|
||||
|
||||
// 회원아이콘 경로
|
||||
$mb_icon = G4_PATH.'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
|
||||
|
||||
include_once('./_head.php');
|
||||
|
||||
if ($g4['https_url'])
|
||||
//$register_action_url = "{$g4['https_url']}/{$g4['bbs']}/register_form_update.php";
|
||||
$register_action_url = G4_BBS_URL.'/register_form_update.php';
|
||||
else
|
||||
$register_action_url = G4_BBS_URL.'/register_form_update.php';
|
||||
|
||||
$register_action_url = G4_HTTPS_BBS_URL.'/register_form_update.php';
|
||||
$req_nick = !isset($member['mb_nick_date']) || (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", $g4['server_time'] - ($config['cf_nick_modify'] * 86400)));
|
||||
$required = ($w=='') ? 'required' : '';
|
||||
$readonly = ($w=='') ? 'readonly' : '';
|
||||
|
||||
$required = "";
|
||||
$readonly = "";
|
||||
if ($w == '') $required = "required";
|
||||
else if ($w == 'u') $readonly = "readonly";
|
||||
$captcha_html = captcha_html();
|
||||
|
||||
include_once($member_skin_path.'/register_form.skin.php');
|
||||
include_once('./_tail.php');
|
||||
|
||||
@ -130,6 +130,15 @@ ini_set("session.cookie_domain", $g4['cookie_domain']);
|
||||
|
||||
@session_start();
|
||||
|
||||
// 보안서버주소 설정
|
||||
if (G4_HTTPS_DOMAIN) {
|
||||
define('G4_HTTPS_URL', G4_HTTPS_DOMAIN);
|
||||
define('G4_HTTPS_BBS_URL', G4_HTTPS_DOMAIN.'/'.G4_BBS_DIR);
|
||||
} else {
|
||||
define('G4_HTTPS_URL', G4_URL);
|
||||
define('G4_HTTPS_BBS_URL', G4_BBS_URL);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// Mobile 모바일 설정
|
||||
// 쿠키에 저장된 값이 모바일이라면 브라우저 상관없이 모바일로 실행
|
||||
|
||||
12
config.php
12
config.php
@ -32,9 +32,12 @@ $g4_path = g4_path();
|
||||
define('_GNUBOARD_', true);
|
||||
|
||||
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
|
||||
define('G4_ADMIN_DIR', 'adm');
|
||||
define('G4_BBS_DIR', 'bbs');
|
||||
|
||||
define('G4_URL', $g4_path['url']);
|
||||
define('G4_ADMIN_URL', G4_URL.'/adm');
|
||||
define('G4_BBS_URL', G4_URL.'/bbs');
|
||||
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');
|
||||
define('G4_DATA_URL', G4_URL.'/data');
|
||||
define('G4_IMG_URL', G4_URL.'/img');
|
||||
@ -47,8 +50,8 @@ define('G4_CACHE_URL', G4_DATA_URL.'/cache');
|
||||
|
||||
// PATH 는 서버상에서의 절대경로
|
||||
define('G4_PATH', $g4_path['path']);
|
||||
define('G4_ADMIN_PATH', G4_PATH.'/adm');
|
||||
define('G4_BBS_PATH', G4_PATH.'/bbs');
|
||||
define('G4_ADMIN_PATH', G4_PATH.'/'.G4_ADMIN_DIR);
|
||||
define('G4_BBS_PATH', G4_PATH.'/'.G4_BBS_DIR);
|
||||
define('G4_DATA_PATH', G4_PATH.'/data');
|
||||
define('G4_EXTEND_PATH', G4_PATH.'/extend');
|
||||
define('G4_LIB_PATH', G4_PATH.'/lib');
|
||||
@ -136,7 +139,6 @@ define('G4_LINK_COUNT', 2);
|
||||
// 예) http://g4.sir.co.kr
|
||||
//$g4['url'] = '';
|
||||
$g4['https_url'] = '';
|
||||
define('G4_HTTPS_URL', '');
|
||||
// 입력예
|
||||
//$g4['url'] = "http://www.sir.co.kr";
|
||||
//$g4['https_url'] = "https://www.sir.co.kr";
|
||||
|
||||
@ -28,7 +28,7 @@ function outlogin($skin_dir='basic')
|
||||
$is_auth = true;
|
||||
}
|
||||
|
||||
if ($g4['https_url']) {
|
||||
if ($config['cf_https_url']) {
|
||||
$outlogin_url = $_GET['url'];
|
||||
if ($outlogin_url) {
|
||||
if (preg_match("/^\.\.\//", $outlogin_url)) {
|
||||
@ -51,11 +51,7 @@ function outlogin($skin_dir='basic')
|
||||
$outlogin_url = $urlencode;
|
||||
}
|
||||
|
||||
// 보안서버주소를 적용할 마땅한 방법이 나올때까지 이 코드로 사용한다.
|
||||
if ($g4['https_url'])
|
||||
$outlogin_action_url = G4_BBS_URL.'/login_check.php';
|
||||
else
|
||||
$outlogin_action_url = G4_BBS_URL.'/login_check.php';
|
||||
$outlogin_action_url = G4_HTTPS_BBS_URL.'/login_check.php';
|
||||
|
||||
ob_start();
|
||||
if ($is_member)
|
||||
|
||||
Reference in New Issue
Block a user