Merge branch 'master' of github.com:gnuboard/yc4s

This commit is contained in:
whitedot
2013-05-09 16:39:07 +09:00
24 changed files with 84 additions and 254 deletions

View File

@ -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 .= '</ul>';
</td>
</tr>
<tr>
<th scope="row"><label for="ca_mobile_list_mod">모바일 1줄당 이미지 수</label></th>
<th scope="row"><label for="ca_mobile_list_row">모바일 이미지 수</label></th>
<td>
<?php echo help("한 줄에 설정한 값만큼의 상품을 출력하지만 스킨에 따라 한 줄에 하나의 상품만 출력할 수도 있습니다."); ?>
<input type="text" name="ca_mobile_list_mod" size="3" value="<?php echo $ca['ca_mobile_list_mod']; ?>" id="ca_mobile_list_mod" required class="required frm_input">
</td>
</tr>
<tr>
<th scope="row"><label for="ca_mobile_list_row">모바일 이미지 줄 수</label></th>
<td>
<?php echo help("한 페이지에 출력할 이미지 줄 수를 설정합니다.\n한 페이지에서 표시하는 상품수는 (1줄당 이미지 수 x 줄 수) 입니다."); ?>
<input type="text" name="ca_mobile_list_row" value='<?php echo $ca['ca_mobile_list_row']; ?>' id="ca_mobile_list_row" required class="required frm_input" size="3"> 줄
<?php echo help("한 페이지에 출력할 이미지 수를 설정합니다."); ?>
<input type="text" name="ca_mobile_list_row" value='<?php echo $ca['ca_mobile_list_row']; ?>' id="ca_mobile_list_row" required class="required frm_input" size="3">
</td>
</tr>
<tr>

View File

@ -69,7 +69,6 @@ $sql_common = " ca_skin = '$ca_skin',
ca_list_row = '$ca_list_row',
ca_mobile_img_width = '$ca_mobile_img_width',
ca_mobile_img_height = '$ca_mobile_img_height',
ca_mobile_list_mod = '$ca_mobile_list_mod',
ca_mobile_list_row = '$ca_mobile_list_row',
ca_sell_email = '$ca_sell_email',
ca_use = '$ca_use',

View File

@ -818,6 +818,30 @@ $pg_anchor = '<ul class="anchor">
<?php } ?>
</td>
</tr>
<tr>
<th scope="row">모바일 로고이미지</th>
<td>
<?php echo help("모바일 쇼핑몰 로고를 직접 올릴 수 있습니다. 이미지 파일만 가능합니다."); ?>
<input type="file" name="mobile_logo_img" id="mobile_logo_img">
<?php
$mobile_logo_img = G4_DATA_PATH."/common/mobile_logo_img";
if (file_exists($mobile_logo_img))
{
$size = getimagesize($mobile_logo_img);
?>
<label for="mobile_logo_img_del"><span class="sound_only">모바일 로고이미지</span> 삭제</label>
<input type="checkbox" name="mobile_logo_img_del" value="1" id="mobile_logo_img_del">
<span class="scf_img_mobilelogoimg"></span>
<div id="mobilelogoimg" class="banner_or_img">
<img src="<?php echo G4_DATA_URL; ?>/common/mobile_logo_img" alt="">
<button type="button" class="sit_wimg_close">닫기</button>
</div>
<script>
$('<button type="button" id="cf_mobilelogoimg_view" class="btn_frmline scf_img_view">로고이미지 확인</button>').appendTo('.scf_img_mobilelogoimg');
</script>
<?php } ?>
</td>
</tr>
<tr>
<th scope="row"><label for="de_item_ps_use">사용후기</label></th>
<td>

View File

@ -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);

View File

@ -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.'&amp;url='.urlencode(G4_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&url='.urlencode(G4_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;'.$qstr));
}
if (!isset($page) || (isset($page) && $page == 0)) $page = 1;

View File

@ -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";
// 로그인 스킨이 없는 경우 관리자 페이지 접속이 안되는 것을 막기 위하여 기본 스킨으로 대체

View File

@ -74,8 +74,8 @@ for ($i=0; $i<count($member_list['id']); $i++) {
if ($member_list) {
$str_nick_list = implode(',', $member_list['nick']);
alert($str_nick_list." 님께 쪽지를 전달하였습니다.", "./memo.php?kind=send", false);
alert($str_nick_list." 님께 쪽지를 전달하였습니다.", G4_HTTP_BBS_URL."/memo.php?kind=send", false);
} else {
alert("회원아이디 오류 같습니다.", "./memo_form.php", false);
alert("회원아이디 오류 같습니다.", G4_HTTP_BBS_URL."/memo_form.php", false);
}
?>

View File

@ -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');

View File

@ -346,7 +346,7 @@ if ($msg)
echo '<script>alert(\''.$msg.'\');</script>';
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'];

View File

@ -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 '<!-- skin : '.$board_skin_path.' -->';
include_once ($board_skin_path.'/write.skin.php');

View File

@ -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.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr);
alert($file_upload_msg, G4_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr);
else
goto_url(G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
goto_url(G4_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
?>

View File

@ -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 모바일 설정

View File

@ -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);

View File

@ -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 '',

View File

@ -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;
}
?>

View File

@ -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();

View File

@ -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'];

View File

@ -1,6 +1,6 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// $list_mod 가로 나열
// $list_row 상품
for ($i=1; $row=sql_fetch_array($result); $i++)
{

View File

@ -1,10 +1,8 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 총몇개 = 한줄에 몇개 * 몇줄
$items = $list_mod * $list_row;
// <TD> 태그 폭
$td_width = (int)(100 / $list_mod);
// 상품수
$items = $list_row;
$sql = "select COUNT(*) as cnt $sql_common ";
$row = sql_fetch($sql);

View File

@ -12,11 +12,11 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
<div id="to_content"><a href="#container">본문 바로가기</a></div>
<div id="logo"><a href="<?php echo G4_MSHOP_URL; ?>/"><img src="<?php echo G4_DATA_URL; ?>/common/logo_img" alt="쇼핑몰 처음으로"></a></div>
<div id="logo"><a href="<?php echo G4_SHOP_URL; ?>/"><img src="<?php echo G4_DATA_URL; ?>/common/mobile_logo_img" alt="쇼핑몰 처음으로"></a></div>
<aside id="hd_ct">
<h2>쇼핑몰 카테고리</h2>
</aside>
<aside id="hd_aside">

View File

@ -13,7 +13,7 @@ $admin = get_admin("super");
<footer id="ft">
<h1><?php echo $config['cf_title']; ?> 정보</h1>
<div>
<a href="<?php echo G4_MSHOP_URL; ?>/" id="ft_logo"><img src="<?php echo G4_DATA_URL; ?>/common/logo_img" alt="처음으로"></a>
<a href="<?php echo G4_SHOP_URL; ?>/" id="ft_logo"><img src="<?php echo G4_DATA_URL; ?>/common/mobile_logo_img" alt="처음으로"></a>
<ul>
<li><a href="<?php echo G4_MSHOP_URL; ?>/content.php?co_id=company">회사소개</a></li>
<li><a href="<?php echo G4_MSHOP_URL; ?>/content.php?co_id=provision">서비스이용약관</a></li>

View File

@ -36,7 +36,7 @@ function editor_html($id, $content, $ckeditor=true, $class="")
}
$ckeditor_class = $ckeditor ? "ckeditor" : "";
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$ckeditor_class $class\" style=\"width:100%;\" maxlength=\"65536\">$content</textarea>";
$html .= "\n<textarea id=\"$id\" name=\"$id\" class=\"$ckeditor_class $class required\" style=\"width:100%;\" required maxlength=\"65536\">$content</textarea>";
$html .= "\n<span class=\"sound_only\">웹 에디터 끝</span>";
return $html;
}

View File

@ -1,148 +0,0 @@
<?php
include_once('./kcpcert_config.php');
// utf-8로 넘어돈 post 값을 euc-kr 로 변경
$_POST = array_map('iconv_euckr', $_POST);
// UTF-8 환경에서 해시 데이터 오류를 막기 위한 코드
$def_locale = setlocale(LC_CTYPE, 0);
$locale_change = false;
if(preg_match('/utf[\-]?8/i', $def_locale)) {
setlocale(LC_CTYPE, 'ko_KR.euc-kr');
$locale_change = true;
}
$req_tx = "";
$site_cd = "";
$ordr_idxx = "";
$year = "";
$month = "";
$day = "";
$user_name = "";
$sex_code = "";
$local_code = "";
$up_hash = "";
/*------------------------------------------------------------------------*/
/* :: 전체 파라미터 남기기 */
/*------------------------------------------------------------------------*/
$ct_cert = new C_CT_CLI;
$ct_cert->mf_clear();
// request 로 넘어온 값 처리
$key = array_keys($_POST);
$sbParam ="";
for($i=0; $i<count($key); $i++)
{
$nmParam = $key[$i];
$valParam = $_POST[$nmParam];
if ( $nmParam == "site_cd" )
{
$site_cd = f_get_parm_str ( $valParam );
}
if ( $nmParam == "req_tx" )
{
$req_tx = f_get_parm_str ( $valParam );
}
if ( $nmParam == "ordr_idxx" )
{
$ordr_idxx = f_get_parm_str ( $valParam );
}
if ( $nmParam == "user_name" )
{
$user_name = f_get_parm_str ( $valParam );
}
if ( $nmParam == "year" )
{
$year = f_get_parm_int ( $valParam );
}
if ( $nmParam == "month" )
{
$month = f_get_parm_int ( $valParam );
}
if ( $nmParam == "day" )
{
$day = f_get_parm_int ( $valParam );
}
if ( $nmParam == "sex_code" )
{
$sex_code = f_get_parm_str ( $valParam );
}
if ( $nmParam == "local_code" )
{
$local_code = f_get_parm_str ( $valParam );
}
// 인증창으로 넘기는 form 데이터 생성 필드
$sbParam .= "<input type='hidden' name='" . $nmParam . "' value='" . f_get_parm_str( $valParam ) . "'/>";
}
if ( $req_tx == "cert" )
{
// !!up_hash 데이터 생성시 주의 사항
// year , month , day 가 비어 있는 경우 "00" , "00" , "00" 으로 설정이 됩니다
// 그외의 값은 없을 경우 ""(null) 로 세팅하시면 됩니다.
// up_hash 데이터 생성시 site_cd 와 ordr_idxx 는 필수 값입니다.
$hash_data = $site_cd .
$ordr_idxx .
$user_name .
f_get_parm_int ( $year ) .
f_get_parm_int ( $month ) .
f_get_parm_int ( $day ) .
$sex_code .
$local_code;
$up_hash = $ct_cert->make_hash_data( $home_dir, $hash_data );
// 인증창으로 넘기는 form 데이터 생성 필드 ( up_hash )
$sbParam .= "<input type='hidden' name='up_hash' value='" . $up_hash . "'/>";
}
$ct_cert->mf_clear();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<title>*** KCP Online Payment System [PHP Version] ***</title>
<script type="text/javascript">
window.onload=function()
{
var frm = document.form_auth;
// 인증 요청 시 호출 함수
if ( frm.req_tx.value == "cert" )
{
opener.document.form_auth.veri_up_hash.value = frm.up_hash.value; // up_hash 데이터 검증을 위한 필드
frm.action="<?php echo $cert_url ?>";
frm.submit();
}
}
</script>
</head>
<body oncontextmenu="return false;" ondragstart="return false;" onselectstart="return false;">
<form name="form_auth" method="post">
<?php echo $sbParam ?>
</form>
</body>
</html>
<?php
if($locale_change)
setlocale(LC_CTYPE, $def_locale);
?>

View File

@ -13,7 +13,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
<li><a href="./memo_form.php">쪽지쓰기</a></li>
</ul>
<form name="fmemoform" action="./memo_form_update.php" onsubmit="return fmemoform_submit(this);" method="post" autocomplete="off">
<form name="fmemoform" action="<?php echo $memo_action_url; ?>" onsubmit="return fmemoform_submit(this);" method="post" autocomplete="off">
<div class="cbox">
<table class="frm_tbl">
<caption>쪽지쓰기</caption>