테마에서 마이페이지등을 지정할 수 있도록 수정

This commit is contained in:
chicpro
2015-09-22 15:43:52 +09:00
parent ced60631e4
commit a09aa36cd6
8 changed files with 88 additions and 34 deletions

View File

@ -1,8 +1,15 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
if (!$is_member) // 테마에 mypage.php 있으면 include
goto_url(G5_BBS_URL."/login.php?url=".urlencode(G5_SHOP_URL."/mypage.php")); if(defined('G5_THEME_SHOP_PATH')) {
$theme_mypage_file = G5_THEME_MSHOP_PATH.'/mypage.php';
if(is_file($theme_mypage_file)) {
include_once($theme_mypage_file);
return;
unset($theme_mypage_file);
}
}
$g5['title'] = '마이페이지'; $g5['title'] = '마이페이지';
include_once(G5_MSHOP_PATH.'/_head.php'); include_once(G5_MSHOP_PATH.'/_head.php');

View File

@ -2,6 +2,16 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가 if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가
// 테마에 orderinquiry.sub.php 있으면 include
if(defined('G5_THEME_SHOP_PATH')) {
$theme_inquiry_file = G5_THEME_MSHOP_PATH.'/orderinquiry.sub.php';
if(is_file($theme_inquiry_file)) {
include_once($theme_inquiry_file);
return;
unset($theme_inquiry_file);
}
}
?> ?>
<?php if (!$limit) { ?>총 <?php echo $cnt; ?> 건<?php } ?> <?php if (!$limit) { ?>총 <?php echo $cnt; ?> 건<?php } ?>

View File

@ -1,26 +1,16 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
// 불법접속을 할 수 없도록 세션에 아무값이나 저장하여 hidden 으로 넘겨서 다음 페이지에서 비교함 // 테마에 orderinquiryview.php 있으면 include
$token = md5(uniqid(rand(), true)); if(defined('G5_THEME_SHOP_PATH')) {
set_session("ss_token", $token); $theme_inquiryview_file = G5_THEME_MSHOP_PATH.'/orderinquiryview.php';
if(is_file($theme_inquiryview_file)) {
if (!$is_member) { include_once($theme_inquiryview_file);
if (get_session('ss_orderview_uid') != $_GET['uid']) return;
alert("직접 링크로는 주문서 조회가 불가합니다.\\n\\n주문조회 화면을 통하여 조회하시기 바랍니다.", G5_SHOP_URL); unset($theme_inquiryview_file);
}
} }
$sql = "select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
if($is_member && !$is_admin)
$sql .= " and mb_id = '{$member['mb_id']}' ";
$od = sql_fetch($sql);
if (!$od['od_id'] || (!$is_member && md5($od['od_id'].$od['od_time'].$od['od_ip']) != get_session('ss_orderview_uid'))) {
alert("조회하실 주문서가 없습니다.", G5_SHOP_URL);
}
// 결제방법
$settle_case = $od['od_settle_case'];
$g5['title'] = '주문상세내역'; $g5['title'] = '주문상세내역';
include_once(G5_MSHOP_PATH.'/_head.php'); include_once(G5_MSHOP_PATH.'/_head.php');

View File

@ -1,8 +1,15 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
if (!$is_member) // 테마에 wishlist.php 있으면 include
goto_url(G5_BBS_URL."/login.php?url=".urlencode(G5_SHOP_URL.'/wishlist.php')); if(defined('G5_THEME_SHOP_PATH')) {
$theme_wishlist_file = G5_THEME_MSHOP_PATH.'/wishlist.php';
if(is_file($theme_wishlist_file)) {
include_once($theme_wishlist_file);
return;
unset($theme_wishlist_file);
}
}
$g5['title'] = "위시리스트"; $g5['title'] = "위시리스트";
include_once(G5_MSHOP_PATH.'/_head.php'); include_once(G5_MSHOP_PATH.'/_head.php');

View File

@ -1,13 +1,23 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
if (!$is_member)
goto_url(G5_BBS_URL."/login.php?url=".urlencode(G5_SHOP_URL."/mypage.php"));
if (G5_IS_MOBILE) { if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'/mypage.php'); include_once(G5_MSHOP_PATH.'/mypage.php');
return; return;
} }
if (!$is_member) // 테마에 mypage.php 있으면 include
goto_url(G5_BBS_URL."/login.php?url=".urlencode(G5_SHOP_URL."/mypage.php")); if(defined('G5_THEME_SHOP_PATH')) {
$theme_mypage_file = G5_THEME_SHOP_PATH.'/mypage.php';
if(is_file($theme_mypage_file)) {
include_once($theme_mypage_file);
return;
unset($theme_mypage_file);
}
}
$g5['title'] = $member['mb_name'].'님 마이페이지'; $g5['title'] = $member['mb_name'].'님 마이페이지';
include_once('./_head.php'); include_once('./_head.php');

View File

@ -2,6 +2,16 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가 if (!defined("_ORDERINQUIRY_")) exit; // 개별 페이지 접근 불가
// 테마에 orderinquiry.sub.php 있으면 include
if(defined('G5_THEME_SHOP_PATH')) {
$theme_inquiry_file = G5_THEME_SHOP_PATH.'/orderinquiry.sub.php';
if(is_file($theme_inquiry_file)) {
include_once($theme_inquiry_file);
return;
unset($theme_inquiry_file);
}
}
?> ?>
<!-- 주문 내역 목록 시작 { --> <!-- 주문 내역 목록 시작 { -->

View File

@ -1,11 +1,6 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'/orderinquiryview.php');
return;
}
// 불법접속을 할 수 없도록 세션에 아무값이나 저장하여 hidden 으로 넘겨서 다음 페이지에서 비교함 // 불법접속을 할 수 없도록 세션에 아무값이나 저장하여 hidden 으로 넘겨서 다음 페이지에서 비교함
$token = md5(uniqid(rand(), true)); $token = md5(uniqid(rand(), true));
set_session("ss_token", $token); set_session("ss_token", $token);
@ -26,6 +21,21 @@ if (!$od['od_id'] || (!$is_member && md5($od['od_id'].$od['od_time'].$od['od_ip'
// 결제방법 // 결제방법
$settle_case = $od['od_settle_case']; $settle_case = $od['od_settle_case'];
if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'/orderinquiryview.php');
return;
}
// 테마에 orderinquiryview.php 있으면 include
if(defined('G5_THEME_SHOP_PATH')) {
$theme_inquiryview_file = G5_THEME_SHOP_PATH.'/orderinquiryview.php';
if(is_file($theme_inquiryview_file)) {
include_once($theme_inquiryview_file);
return;
unset($theme_inquiryview_file);
}
}
$g5['title'] = '주문상세내역'; $g5['title'] = '주문상세내역';
include_once('./_head.php'); include_once('./_head.php');

View File

@ -1,13 +1,23 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
if (!$is_member)
goto_url(G5_BBS_URL."/login.php?url=".urlencode(G5_SHOP_URL.'/wishlist.php'));
if (G5_IS_MOBILE) { if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'/wishlist.php'); include_once(G5_MSHOP_PATH.'/wishlist.php');
return; return;
} }
if (!$is_member) // 테마에 wishlist.php 있으면 include
goto_url(G5_BBS_URL."/login.php?url=".urlencode(G5_SHOP_URL.'/wishlist.php')); if(defined('G5_THEME_SHOP_PATH')) {
$theme_wishlist_file = G5_THEME_SHOP_PATH.'/wishlist.php';
if(is_file($theme_wishlist_file)) {
include_once($theme_wishlist_file);
return;
unset($theme_wishlist_file);
}
}
$g5['title'] = "위시리스트"; $g5['title'] = "위시리스트";
include_once('./_head.php'); include_once('./_head.php');