diff --git a/adm/shop_admin/categoryform.php b/adm/shop_admin/categoryform.php
index f3426c389..2f7075ce4 100644
--- a/adm/shop_admin/categoryform.php
+++ b/adm/shop_admin/categoryform.php
@@ -76,8 +76,7 @@ if (!isset($ca['ca_mobile_skin'])) {
ADD `ca_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `ca_skin`,
ADD `ca_mobile_img_width` INT(11) NOT NULL DEFAULT '0' AFTER `ca_list_row`,
ADD `ca_mobile_img_height` INT(11) NOT NULL DEFAULT '0' AFTER `ca_mobile_img_width`,
- ADD `ca_mobile_list_mod` INT(11) NOT NULL DEFAULT '0' AFTER `ca_mobile_img_height`,
- ADD `ca_mobile_list_row` INT(11) NOT NULL DEFAULT '0' AFTER `ca_mobile_list_mod`,
+ ADD `ca_mobile_list_row` INT(11) NOT NULL DEFAULT '0' AFTER `ca_mobile_img_height`,
ADD `ca_mobile_head_html` TEXT NOT NULL AFTER `ca_tail_html`,
ADD `ca_mobile_tail_html` TEXT NOT NULL AFTER `ca_mobile_head_html` ", false);
}
@@ -205,17 +204,10 @@ $pg_anchor .= '';
사용후기
diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php
index 6fa845a3f..4fc4e86a6 100644
--- a/adm/shop_admin/configformupdate.php
+++ b/adm/shop_admin/configformupdate.php
@@ -11,9 +11,11 @@ if (!$de_admin_company_owner) goto_url("./configform.php");
if ($logo_img_del) @unlink(G4_DATA_PATH."/common/logo_img");
if ($main_img_del) @unlink(G4_DATA_PATH."/common/main_img");
+if ($mobile_logo_img_del) @unlink(G4_DATA_PATH."/common/mobile_logo_img");
if ($_FILES['logo_img']['name']) upload_file($_FILES['logo_img']['tmp_name'], "logo_img", G4_DATA_PATH."/common");
if ($_FILES['main_img']['name']) upload_file($_FILES['main_img']['tmp_name'], "main_img", G4_DATA_PATH."/common");
+if ($_FILES['mobile_logo_img']['name']) upload_file($_FILES['mobile_logo_img']['tmp_name'], "mobile_logo_img", G4_DATA_PATH."/common");
$de_kcp_mid = substr($_POST['de_kcp_mid'],0,3);
diff --git a/bbs/board.php b/bbs/board.php
index 61034e624..ff0bc72b2 100644
--- a/bbs/board.php
+++ b/bbs/board.php
@@ -134,7 +134,7 @@ if (isset($wr_id) && $wr_id) {
if ($member['mb_id'])
alert('목록을 볼 권한이 없습니다.', G4_URL);
else
- alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G4_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
+ alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&url='.urlencode(G4_BBS_URL.'/board.php?bo_table='.$bo_table.'&'.$qstr));
}
if (!isset($page) || (isset($page) && $page == 0)) $page = 1;
diff --git a/bbs/login.php b/bbs/login.php
index 31f1ada32..390d2eb91 100644
--- a/bbs/login.php
+++ b/bbs/login.php
@@ -4,6 +4,8 @@ include_once('./_common.php');
$g4['title'] = '로그인';
include_once('./_head.sub.php');
+$url = $_GET['url'];
+
$p = parse_url($url);
if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) {
//print_r2($p);
@@ -19,31 +21,7 @@ if ($is_member) {
goto_url(G4_URL);
}
-if ($url)
- $urlencode = urlencode($url);
-else
- $urlencode = urlencode($_SERVER['REQUEST_URI']);
-
-if (G4_HTTPS_DOMAIN) {
- $login_url = $_GET['url'];
- if ($login_url) {
- if (preg_match("/^\.\.\//", $url)) {
- $login_url = urlencode(G4_URL."/".preg_replace("/^\.\.\//", "", $login_url));
- } else {
- $purl = parse_url(G4_URL);
- if ($purl['path']) {
- $path = urlencode($purl['path']);
- $urlencode = preg_replace("/".$path."/", "", $urlencode);
- }
- $login_url = $urlencode;
- }
- } else {
- $login_url = G4_URL;
- }
-} else {
- $login_url = $urlencode;
-}
-
+$login_url = login_url($url);
$login_action_url = G4_HTTPS_BBS_URL."/login_check.php";
// 로그인 스킨이 없는 경우 관리자 페이지 접속이 안되는 것을 막기 위하여 기본 스킨으로 대체
diff --git a/bbs/memo_form_update.php b/bbs/memo_form_update.php
index 6c587a064..20a38ce14 100644
--- a/bbs/memo_form_update.php
+++ b/bbs/memo_form_update.php
@@ -74,8 +74,8 @@ for ($i=0; $i
\ No newline at end of file
diff --git a/bbs/register.php b/bbs/register.php
index 5c17c6d6a..a6a9146dd 100644
--- a/bbs/register.php
+++ b/bbs/register.php
@@ -12,7 +12,7 @@ set_session("ss_mb_reg", "");
$g4['title'] = '회원가입약관';
include_once('./_head.php');
-$register_action_url = G4_HTTPS_BBS_URL.'/register_form.php';
+$register_action_url = G4_BBS_URL.'/register_form.php';
include_once($member_skin_path.'/register.skin.php');
include_once('./_tail.php');
diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php
index 278fc7264..48218b4a3 100644
--- a/bbs/register_form_update.php
+++ b/bbs/register_form_update.php
@@ -346,7 +346,7 @@ if ($msg)
echo '';
if ($w == "") {
- goto_url(G4_BBS_URL.'/register_result.php');
+ goto_url(G4_HTTP_BBS_URL.'/register_result.php');
} else if ($w == 'u') {
$row = sql_fetch(" select mb_password from {$g4['member_table']} where mb_id = '{$member['mb_id']}' ");
$tmp_password = $row['mb_password'];
diff --git a/bbs/write.php b/bbs/write.php
index 198e58be9..7a9e329b7 100644
--- a/bbs/write.php
+++ b/bbs/write.php
@@ -377,7 +377,7 @@ $editor_html = editor_html('wr_content', $content, $is_dhtml_editor);
include_once(G4_PATH.'/head.sub.php');
include_once('./board_head.php');
-$action_url = G4_HTTPS_BBS_URL."/write_update.php";
+$action_url = https_url(G4_BBS_DIR)."/write_update.php";
echo '';
include_once ($board_skin_path.'/write.skin.php');
diff --git a/bbs/write_update.php b/bbs/write_update.php
index 914e7bfe9..32831a68d 100644
--- a/bbs/write_update.php
+++ b/bbs/write_update.php
@@ -623,7 +623,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
delete_cache_latest($bo_table);
if ($file_upload_msg)
- alert($file_upload_msg, G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr);
+ alert($file_upload_msg, G4_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr);
else
- goto_url(G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
+ goto_url(G4_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
?>
diff --git a/common.php b/common.php
index 303b4be32..e2559c44e 100644
--- a/common.php
+++ b/common.php
@@ -163,14 +163,8 @@ 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);
-}
+define('G4_HTTP_BBS_URL', https_url(G4_BBS_DIR, false));
+define('G4_HTTPS_BBS_URL', https_url(G4_BBS_DIR, true));
//==============================================================================
// Mobile 모바일 설정
diff --git a/config.php b/config.php
index f006b663f..67c8e511c 100644
--- a/config.php
+++ b/config.php
@@ -24,7 +24,7 @@ if (PHP_VERSION >= '5.3.0') {
보안서버주소가 없다면 공란으로 두시면 되며 보안서버주소 뒤에 / 는 붙이지 않습니다.
입력예) https://www.domain.com:443/gnuboard4s
*/
-define('G4_DOMAIN', ''); // 사용하지 않습니다.
+define('G4_DOMAIN', '');
define('G4_HTTPS_DOMAIN', '');
/*
@@ -53,26 +53,13 @@ define('G4_SNS_DIR', 'sns');
define('G4_SYNDI_DIR', 'syndi');
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
+
if (G4_DOMAIN) {
define('G4_URL', G4_DOMAIN);
} else {
- if (isset($g4_path['url']))
- define('G4_URL', $g4_path['url']);
- else
- define('G4_URL', '');
-}
-
-if (G4_HTTPS_DOMAIN) {
- define('G4_URL', G4_HTTPS_DOMAIN);
-} else {
- define('G4_URL', G4_DOMAIN);
-}
-
-if (isset($g4_path['path'])) {
- define('G4_PATH', $g4_path['path']);
-} else {
- define('G4_PATH', '');
+ define('G4_URL', $g4_path['url']);
}
+define('G4_PATH', $g4_path['path']);
define('G4_ADMIN_URL', G4_URL.'/'.G4_ADMIN_DIR);
define('G4_BBS_URL', G4_URL.'/'.G4_BBS_DIR);
diff --git a/install/shop.sql b/install/shop.sql
index fc6292224..aef0a8d08 100644
--- a/install/shop.sql
+++ b/install/shop.sql
@@ -110,7 +110,6 @@ CREATE TABLE IF NOT EXISTS `shop_category` (
`ca_mobile_tail_html` text NOT NULL,
`ca_list_mod` int(11) NOT NULL DEFAULT '0',
`ca_list_row` int(11) NOT NULL DEFAULT '0',
- `ca_mobile_list_mod` int(11) NOT NULL DEFAULT '0',
`ca_mobile_list_row` int(11) NOT NULL DEFAULT '0',
`ca_include_head` varchar(255) NOT NULL DEFAULT '',
`ca_include_tail` varchar(255) NOT NULL DEFAULT '',
diff --git a/lib/common.lib.php b/lib/common.lib.php
index b4999e858..708774565 100644
--- a/lib/common.lib.php
+++ b/lib/common.lib.php
@@ -1981,4 +1981,32 @@ function hyphen_hp_number($hp)
$hp = preg_replace("/[^0-9]/", "", $hp);
return preg_replace("/([0-9]{3})([0-9]{3,4})([0-9]{4})$/", "\\1-\\2-\\3", $hp);
}
+
+
+function login_url($url='')
+{
+ if (!$url) $url = G4_URL;
+ $p = parse_url($url);
+ return $url.urldecode(preg_replace("/^".urlencode($p['path'])."/", "", urlencode($_SERVER['REQUEST_URI'])));
+}
+
+
+function https_url($dir, $https=true)
+{
+ if ($https) {
+ if (G4_HTTPS_DOMAIN) {
+ $url = G4_HTTPS_DOMAIN.'/'.$dir;
+ } else {
+ $url = G4_URL.'/'.$dir;
+ }
+ } else {
+ if (G4_DOMAIN) {
+ $url = G4_DOMAIN.'/'.$dir;
+ } else {
+ $url = G4_URL.'/'.$dir;
+ }
+ }
+
+ return $url;
+}
?>
\ No newline at end of file
diff --git a/lib/outlogin.lib.php b/lib/outlogin.lib.php
index f5621c13d..077a4bd5a 100644
--- a/lib/outlogin.lib.php
+++ b/lib/outlogin.lib.php
@@ -34,29 +34,7 @@ function outlogin($skin_dir='basic')
$is_auth = true;
}
- if (G4_HTTPS_DOMAIN) {
- $outlogin_url = $_GET['url'];
- if ($outlogin_url) {
- if (preg_match("/^\.\.\//", $outlogin_url)) {
- $outlogin_url = urlencode(G4_URL."/".preg_replace("/^\.\.\//", "", $outlogin_url));
- }
- else {
- $purl = parse_url(G4_URL);
- if ($purl['path']) {
- $path = urlencode($purl['path']);
- $urlencode = preg_replace("/".$path."/", "", $urlencode);
- }
- $outlogin_url = $urlencode;
- }
- }
- else {
- $outlogin_url = G4_URL;
- }
- }
- else {
- $outlogin_url = $urlencode;
- }
-
+ $outlogin_url = login_url();
$outlogin_action_url = G4_HTTPS_BBS_URL.'/login_check.php';
ob_start();
diff --git a/mobile/shop/list.php b/mobile/shop/list.php
index f8f90eeb4..4554fcd77 100644
--- a/mobile/shop/list.php
+++ b/mobile/shop/list.php
@@ -51,7 +51,6 @@ if ($is_admin)
// 리스트 유형별로 출력
$list_file = G4_MSHOP_PATH.'/'.$ca['ca_mobile_skin'];
if (file_exists($list_file)) {
- $list_mod = $ca['ca_mobile_list_mod'];
$list_row = $ca['ca_mobile_list_row'];
$img_width = $ca['ca_mobile_img_width'];
$img_height = $ca['ca_mobile_img_height'];
diff --git a/mobile/shop/list.skin.10.php b/mobile/shop/list.skin.10.php
index b154d9657..70a864f56 100644
--- a/mobile/shop/list.skin.10.php
+++ b/mobile/shop/list.skin.10.php
@@ -1,6 +1,6 @@
태그 폭
-$td_width = (int)(100 / $list_mod);
+// 상품수
+$items = $list_row;
$sql = "select COUNT(*) as cnt $sql_common ";
$row = sql_fetch($sql);
diff --git a/mobile/shop/shop.head.php b/mobile/shop/shop.head.php
index 195ee53c6..430dfb04f 100644
--- a/mobile/shop/shop.head.php
+++ b/mobile/shop/shop.head.php
@@ -12,11 +12,11 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
-
+
diff --git a/mobile/shop/shop.tail.php b/mobile/shop/shop.tail.php
index 470f9a9cd..763877bd6 100644
--- a/mobile/shop/shop.tail.php
+++ b/mobile/shop/shop.tail.php
@@ -13,7 +13,7 @@ $admin = get_admin("super");