Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab386ad965 | |||
| 002ea55bcf | |||
| 4479323b25 | |||
| 40c757ea36 |
@ -106,26 +106,55 @@ if(!sql_query(" SELECT mb_id FROM {$g5['g5_shop_order_delete_table']} LIMIT 1 ",
|
|||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
#container { height: unset;}
|
#container { height: unset;}
|
||||||
|
.search_and_export_wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.search_and_export_wrap form {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.export_btn_wrap {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
.export_btn_wrap button {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<form name="frmorderlist" class="local_sch01 local_sch">
|
<div class="search_and_export_wrap">
|
||||||
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
<form name="frmorderlist" class="local_sch01 local_sch">
|
||||||
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
<input type="hidden" name="doc" value="<?php echo $doc; ?>">
|
||||||
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||||
<input type="hidden" name="save_search" value="<?php echo $search; ?>">
|
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||||
|
<input type="hidden" name="save_search" value="<?php echo $search; ?>">
|
||||||
|
|
||||||
<label for="sel_field" class="sound_only">검색대상</label>
|
<label for="sel_field" class="sound_only">검색대상</label>
|
||||||
<select name="sel_field" id="sel_field">
|
<select name="sel_field" id="sel_field">
|
||||||
<option value="od_hp" <?php echo get_selected($sel_field, 'od_hp'); ?> selected>연락처</option>
|
<option value="od_hp" <?php echo get_selected($sel_field, 'od_hp'); ?> selected>연락처</option>
|
||||||
<option value="od_name" <?php echo get_selected($sel_field, 'od_name'); ?>>주문자</option>
|
<option value="od_name" <?php echo get_selected($sel_field, 'od_name'); ?>>주문자</option>
|
||||||
<option value="od_id" <?php echo get_selected($sel_field, 'od_id'); ?>>주문번호</option>
|
<option value="od_id" <?php echo get_selected($sel_field, 'od_id'); ?>>주문번호</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="search" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
<label for="search" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
<input type="text" name="search" value="<?php echo $search; ?>" id="search" class="frm_input" autocomplete="off">
|
<input type="text" name="search" value="<?php echo $search; ?>" id="search" class="frm_input" autocomplete="off">
|
||||||
<input type="submit" value="검색" class="btn_submit">
|
<input type="submit" value="검색" class="btn_submit">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<div class="export_btn_wrap">
|
||||||
|
<form method="post" action="orderlist_ticket_ex.php" target="_blank">
|
||||||
|
<input type="hidden" name="sql_common" value="<?php echo htmlspecialchars($sql_common); ?>">
|
||||||
|
<input type="hidden" name="sort1" value="<?php echo $sort1; ?>">
|
||||||
|
<input type="hidden" name="sort2" value="<?php echo $sort2; ?>">
|
||||||
|
<button type="submit" class="btn btn_submit" style="background-color: #4CAF50;">엑셀 다운로드</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!--
|
<!--
|
||||||
<form class="local_sch03 local_sch">
|
<form class="local_sch03 local_sch">
|
||||||
<div class="sch_last"">
|
<div class="sch_last"">
|
||||||
|
|||||||
@ -1,6 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth['998411'], "r");
|
||||||
|
|
||||||
|
// POST로 전달된 데이터 받기
|
||||||
|
$sql_common = isset($_POST['sql_common']) ? $_POST['sql_common'] : '';
|
||||||
|
$sort1 = isset($_POST['sort1']) ? $_POST['sort1'] : 'a.od_id';
|
||||||
|
$sort2 = isset($_POST['sort2']) ? $_POST['sort2'] : 'desc';
|
||||||
|
|
||||||
$file_name = "orderlist_".date("ymd")."_".date("His").".xls"; // 파일명지정
|
$file_name = "orderlist_".date("ymd")."_".date("His").".xls"; // 파일명지정
|
||||||
|
|
||||||
header("Content-Type: application/vnd.ms-excel");
|
header("Content-Type: application/vnd.ms-excel");
|
||||||
@ -14,7 +21,11 @@ $sql = " SELECT a.*,
|
|||||||
b.ct_qty,
|
b.ct_qty,
|
||||||
b.ct_price,
|
b.ct_price,
|
||||||
b.ct_option,
|
b.ct_option,
|
||||||
c.ca_id
|
b.io_id,
|
||||||
|
c.ca_id,
|
||||||
|
c.it_1,
|
||||||
|
c.it_2,
|
||||||
|
d.io_price
|
||||||
$sql_common
|
$sql_common
|
||||||
ORDER BY $sort1 $sort2
|
ORDER BY $sort1 $sort2
|
||||||
";
|
";
|
||||||
@ -25,188 +36,85 @@ $result = sql_query($sql);
|
|||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.tit {background-color:#C0C0C0; height:30px; }
|
table { border-collapse: collapse;}
|
||||||
.no-text {mso-number-format:'\@'; text-align:center;}
|
th, td { border: 1px solid #000; padding: 0px; text-align: center; }
|
||||||
|
th { background-color: #D3D3D3; font-weight: bold; text-align: center; }
|
||||||
|
tr.bg0 { background-color: #FFFFFF; }
|
||||||
|
tr.bg1 { background-color: #F0F0F0; }
|
||||||
|
.empty_table { text-align: center; }
|
||||||
|
tfoot tr { background-color: #E8E8E8; font-weight: bold; }
|
||||||
|
.number { mso-number-format:\#\,\#\#0; , text-align: right; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<table cellspacing="0" cellpadding="0" border="1">
|
<table cellspacing="0" cellpadding="0">
|
||||||
<caption>주문 내역 목록</caption>
|
<caption>주문 내역 목록</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th style="width: 120px;">주문일</th>
|
||||||
<label for="chkall" class="sound_only">주문 전체</label>
|
<th style="width: 100px;">주문자</th>
|
||||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
<th style="width: 200px;">주문자전화</th>
|
||||||
</th>
|
<th style="width: 400px;">상품명</th>
|
||||||
<!-- <th scope="col" id="th_ordnum" style="width:200px;"><a href="<?php echo title_sort("od_id", 1)."&$qstr1"; ?>">주문번호</a></th>-->
|
<th style="width: 150px;">옵션</th>
|
||||||
<th scope="col" id="th_odrer">주문일</th>
|
<th style="width: 100px;">단가</th>
|
||||||
<th scope="col" id="th_odrer" style="width:240px;">상품명</th>
|
<th style="width: 100px;">주문수량</th>
|
||||||
<th scope="col" id="th_odrer">옵션</th>
|
<th style="width: 200px;">총금액</th>
|
||||||
<th scope="col" id="th_odrer">주문자</th>
|
|
||||||
<th scope="col" id="th_odrertel">주문자전화</th>
|
|
||||||
<th scope="col" style="width:85px;">단가<br>(옵션가)</th>
|
|
||||||
<th scope="col" style="width:62px;">주문수량</th>
|
|
||||||
<th scope="col" style="width:85px;">합계</th>
|
|
||||||
<!-- <th scope="col">입금합계</th>-->
|
|
||||||
<th scope="col" style="width:62px;">사용처리</th>
|
|
||||||
<th scope="col" style="width:61px;">상세</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
$tot_ct_qty = 0;
|
||||||
{
|
$tot_orderprice = 0;
|
||||||
// '입금'인 것만 출력
|
$prev_od_id = '';
|
||||||
if ($row['od_status'] != '입금') continue;
|
$bg_class = 'bg0';
|
||||||
// 결제 수단
|
|
||||||
$s_receipt_way = $s_br = "";
|
|
||||||
if ($row['od_settle_case'])
|
|
||||||
{
|
|
||||||
$s_receipt_way = $row['od_settle_case'];
|
|
||||||
$s_br = '<br />';
|
|
||||||
|
|
||||||
// 간편결제
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
if($row['od_settle_case'] == '간편결제') {
|
// 같은 주문번호 중 첫 번째 행만 출력
|
||||||
switch($row['od_pg']) {
|
if ($row['od_id'] != $prev_od_id) {
|
||||||
case 'lg':
|
$order_date = substr($row['od_receipt_time'], 0, 10);
|
||||||
$s_receipt_way = 'PAYNOW';
|
$order_name = get_text($row['od_name']);
|
||||||
break;
|
$order_tel = add_hyphen(get_text($row['od_hp']));
|
||||||
case 'inicis':
|
// 주문번호가 바뀔 때마다 배경색 토글
|
||||||
$s_receipt_way = 'KPAY';
|
$bg_class = ($bg_class === 'bg0') ? 'bg1' : 'bg0';
|
||||||
break;
|
} else {
|
||||||
case 'kcp':
|
$order_date = '';
|
||||||
$s_receipt_way = 'PAYCO';
|
$order_name = '';
|
||||||
break;
|
$order_tel = '';
|
||||||
default:
|
|
||||||
$s_receipt_way = $row['od_settle_case'];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$s_receipt_way = '결제수단없음';
|
|
||||||
$s_br = '<br />';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['od_receipt_point'] > 0)
|
$it_name = $row['it_name'];
|
||||||
$s_receipt_way .= $s_br."포인트";
|
$io_id = isset($row['io_id']) ? $row['io_id'] : '';
|
||||||
|
$unit_price = $row['io_price'] ? ($row['ct_price'] + $row['io_price']) : $row['ct_price'];
|
||||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['od_name']), $row['od_email'], '');
|
$qty = $row['ct_qty'];
|
||||||
|
$total_price = $unit_price * $qty;
|
||||||
$od_cnt = 0;
|
|
||||||
if ($row['mb_id'])
|
|
||||||
{
|
|
||||||
$sql2 = " select count(*) as cnt from {$g5['g5_shop_order_table']} where mb_id = '{$row['mb_id']}' ";
|
|
||||||
$row2 = sql_fetch($sql2);
|
|
||||||
$od_cnt = $row2['cnt'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 주문 번호에 device 표시
|
|
||||||
$od_mobile = '';
|
|
||||||
if($row['od_mobile'])
|
|
||||||
$od_mobile = '(M)';
|
|
||||||
|
|
||||||
// 주문번호에 - 추가
|
|
||||||
switch(strlen($row['od_id'])) {
|
|
||||||
case 16:
|
|
||||||
$disp_od_id = substr($row['od_id'],0,8).'-'.substr($row['od_id'],8);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$disp_od_id = substr($row['od_id'],0,6).'-'.substr($row['od_id'],6);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 주문 번호에 에스크로 표시
|
|
||||||
$od_paytype = '';
|
|
||||||
if($row['od_test'])
|
|
||||||
$od_paytype .= '<span class="list_test">테스트</span>';
|
|
||||||
|
|
||||||
if($default['de_escrow_use'] && $row['od_escrow'])
|
|
||||||
$od_paytype .= '<span class="list_escrow">에스크로</span>';
|
|
||||||
|
|
||||||
$uid = md5($row['od_id'].$row['od_time'].$row['od_ip']);
|
|
||||||
|
|
||||||
$invoice_time = is_null_time($row['od_invoice_time']) ? G5_TIME_YMDHIS : $row['od_invoice_time'];
|
|
||||||
$delivery_company = $row['od_delivery_company'] ? $row['od_delivery_company'] : $default['de_delivery_company'];
|
|
||||||
|
|
||||||
$bg = 'bg'.($i%2);
|
|
||||||
$td_color = 0;
|
|
||||||
if($row['od_cancel_price'] > 0) {
|
|
||||||
$bg .= 'cancel';
|
|
||||||
$td_color = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$tot_ct_qty += $qty;
|
||||||
|
$tot_orderprice += $total_price;
|
||||||
|
$prev_od_id = $row['od_id'];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- 목록 내용 시작 -->
|
<tr class="<?php echo $bg_class; ?>">
|
||||||
<tr class="orderlist<?php echo ' '.$bg; ?>">
|
<td><?php echo $order_date; ?></td>
|
||||||
<td class="td_chk">
|
<td><?php echo $order_name; ?></td>
|
||||||
<input type="hidden" name="od_id[<?php echo $i ?>]" value="<?php echo $row['od_id'] ?>" id="od_id_<?php echo $i ?>">
|
<td><?php echo $order_tel; ?></td>
|
||||||
<label for="chk_<?php echo $i; ?>" class="sound_only">주문번호 <?php echo $row['od_id']; ?></label>
|
<td><?php echo $it_name; ?></td>
|
||||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
<td><?php echo $io_id; ?></td>
|
||||||
</td>
|
<td class="number"> <?php echo number_format($unit_price); ?></td>
|
||||||
<!--
|
<td style="text-align: center;"> <?php echo $qty; ?></td>
|
||||||
<td headers="th_ordnum" class="td_odrnum2">
|
<td class="number"> <?php echo number_format($total_price); ?></td>
|
||||||
<?php if ($is_admin == 'super'){ ?>
|
|
||||||
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>" class="orderitem"><?php echo $disp_od_id; ?></a>
|
|
||||||
<?php } else { echo $disp_od_id; }?>
|
|
||||||
<?php echo $od_mobile; ?>
|
|
||||||
<?php echo $od_paytype; ?>
|
|
||||||
</td>
|
|
||||||
-->
|
|
||||||
<td headers="th_ordnum" class="td_odrnum2"><?php echo substr($row['od_receipt_time'],0,10) ?></td>
|
|
||||||
<td headers="th_ordnum" class="td_odrnum2"><?php echo $row['it_name'] ?></td>
|
|
||||||
<td heardrs="th_ordnum" class="td_odrnum2"><?php echo ($row['io_id']) ? $row['io_id'] : '' ?> </td>
|
|
||||||
<td headers="th_odrer" class="td_name"><?php echo $mb_nick; ?></td>
|
|
||||||
<td headers="th_odrertel" class="td_tel" style="text-align:center;"><?php echo add_hyphen(get_text($row['od_tel'])); ?></td>
|
|
||||||
<td headers="th_odrcnt"><?php echo ($row['io_price']) ? number_format($row['ct_price']+$row['io_price']) : number_format($row['ct_price']) ?></td>
|
|
||||||
<td headers="th_odrcnt"><?php echo $row['ct_qty']; ?></td>
|
|
||||||
<td class="td_num td_numsum">
|
|
||||||
<?php echo number_format(($row['ct_price'] + $row['io_price']) * $row['ct_qty']); ?>
|
|
||||||
<?php // echo number_format($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']); // 같은 승인번호의 결제건 여러개가 있는 경우 금액이 알아보기 불편함 ?></td>
|
|
||||||
<!-- <td class="td_num_right"><?php echo number_format($row['od_receipt_price']); ?></td>-->
|
|
||||||
<td class="td_mng td_mng_s">
|
|
||||||
<?php
|
|
||||||
// 사용처리
|
|
||||||
// 사용처리 버튼 출력을 위한 부분
|
|
||||||
if ($row['it_2'] && (substr($row['od_receipt_time'],0,10) == date('Y-m-d'))) { // 당일주문 사용불가 대상 & 당일주문 체크
|
|
||||||
echo '사용불가<br>당일주문';
|
|
||||||
// 상태가 '입금' 이 아니면서 유효기간이 지났거나 주문 상태가 취소인 경우
|
|
||||||
} else if ($row['od_status'] != '입금' || $row['it_1'] < date("ymd") && !isset($row['it_1']) || $row['od_status'] == '취소') {
|
|
||||||
echo "사용불가<br>(";
|
|
||||||
if( $row['od_status'] == '취소' ) echo "취소)"; // 취소라면
|
|
||||||
else echo "유효일자:".$row['it_1'].")"; // 유효일자가 지났다면
|
|
||||||
} else { // 위 조건에 해당하지 않으면 사용처리 버튼 출력
|
|
||||||
?>
|
|
||||||
<a href="orderliveupdate.php?bo=u&od_id=<?php echo $row['od_id']; ?>&st=<?php echo $row['od_status'];?>" class="mng_mod btn btn_04"><span class="sound_only"><?php echo $row['od_id']; ?></span>사용</a>
|
|
||||||
<?php } //사용처리 버튼 끝 ?>
|
|
||||||
</td>
|
|
||||||
<td class="td_mng td_mng_s">
|
|
||||||
<a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>&<?php echo $qstr; ?>" class="mng_mod btn btn_02"><span class="sound_only"><?php echo $row['od_id']; ?> </span>보기</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$tot_itemcount += $row['od_cart_count'];
|
|
||||||
$tot_orderprice += (($row['ct_price'] + $row['io_price']) * $row['ct_qty']);
|
|
||||||
// $tot_orderprice += ($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']);
|
|
||||||
$tot_ordercancel += $row['od_cancel_price'];
|
|
||||||
$tot_receiptprice += $row['od_receipt_price'];
|
|
||||||
$tot_couponprice += $row['couponprice'];
|
|
||||||
$tot_ct_qty += $row['ct_qty'];
|
|
||||||
}
|
}
|
||||||
sql_free_result($result);
|
sql_free_result($result);
|
||||||
if ($i == 0)
|
if ($i == 0)
|
||||||
echo '<tr><td colspan="11" class="empty_table">자료가 없습니다.</td></tr>';
|
echo '<tr class="bg0"><td colspan="8" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr class="orderlist">
|
<tr>
|
||||||
<th scope="row" colspan="7">합 계</th>
|
<th colspan="6" style="text-align: center;">합 계</th>
|
||||||
<td><?php echo $tot_ct_qty //number_format($tot_itemcount); ?>건</td>
|
<th style="text-align: center;"><?php echo $tot_ct_qty; ?></th>
|
||||||
<td><?php echo number_format($tot_orderprice); ?></td>
|
<th class="number"><?php echo number_format($tot_orderprice); ?></th>
|
||||||
<!-- <td><?php echo number_format($tot_receiptprice); ?></td>-->
|
|
||||||
<td colspan="2"></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -29,6 +29,26 @@ if (!sql_query("SELECT bn_device FROM rb_banner LIMIT 0, 1")) {
|
|||||||
sql_query("UPDATE rb_banner SET bn_device = 'pc'", true);
|
sql_query("UPDATE rb_banner SET bn_device = 'pc'", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 콘텐츠 유형 필드 추가 (image/video/video_url/youtube/vimeo)
|
||||||
|
if (!sql_query("SELECT bn_content_type FROM rb_banner LIMIT 0, 1")) {
|
||||||
|
sql_query("ALTER TABLE `rb_banner` ADD `bn_content_type` varchar(20) NOT NULL DEFAULT 'image' AFTER `bn_device`", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 비디오 URL 필드 추가
|
||||||
|
if (!sql_query("SELECT bn_video_url FROM rb_banner LIMIT 0, 1")) {
|
||||||
|
sql_query("ALTER TABLE `rb_banner` ADD `bn_video_url` varchar(500) NOT NULL DEFAULT '' AFTER `bn_content_type`", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 유튜브 URL 필드 추가
|
||||||
|
if (!sql_query("SELECT bn_youtube_url FROM rb_banner LIMIT 0, 1")) {
|
||||||
|
sql_query("ALTER TABLE `rb_banner` ADD `bn_youtube_url` varchar(500) NOT NULL DEFAULT '' AFTER `bn_video_url`", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 비메오 URL 필드 추가
|
||||||
|
if (!sql_query("SELECT bn_vimeo_url FROM rb_banner LIMIT 0, 1")) {
|
||||||
|
sql_query("ALTER TABLE `rb_banner` ADD `bn_vimeo_url` varchar(500) NOT NULL DEFAULT '' AFTER `bn_youtube_url`", true);
|
||||||
|
}
|
||||||
|
|
||||||
include_once(G5_ADMIN_PATH . '/admin.head.php');
|
include_once(G5_ADMIN_PATH . '/admin.head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -45,9 +65,23 @@ include_once(G5_ADMIN_PATH . '/admin.head.php');
|
|||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th scope="row"><label for="bn_content_type">콘텐츠 유형</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("배너의 콘텐츠 유형을 선택하세요."); ?>
|
||||||
|
<?php $bn_content_type = isset($bn['bn_content_type']) ? $bn['bn_content_type'] : 'image'; ?>
|
||||||
|
<select name="bn_content_type" id="bn_content_type" onchange="toggleContentInputs()">
|
||||||
|
<option value="image" <?php echo get_selected($bn_content_type, 'image', true); ?>>이미지</option>
|
||||||
|
<option value="video" <?php echo get_selected($bn_content_type, 'video', true); ?>>동영상 파일 (로컬 업로드)</option>
|
||||||
|
<option value="video_url" <?php echo get_selected($bn_content_type, 'video_url', true); ?>>비디오 URL (MP4, M3U8 등)</option>
|
||||||
|
<option value="youtube" <?php echo get_selected($bn_content_type, 'youtube', true); ?>>유튜브</option>
|
||||||
|
<option value="vimeo" <?php echo get_selected($bn_content_type, 'vimeo', true); ?>>비메오</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="image_row">
|
||||||
<th scope="row">이미지</th>
|
<th scope="row">이미지</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="file" name="bn_bimg">
|
<input type="file" name="bn_bimg" accept="image/*">
|
||||||
<?php
|
<?php
|
||||||
$bimg_str = "";
|
$bimg_str = "";
|
||||||
$bimg = G5_DATA_PATH . "/banners/" . $bn['bn_id'];
|
$bimg = G5_DATA_PATH . "/banners/" . $bn['bn_id'];
|
||||||
@ -66,6 +100,43 @@ include_once(G5_ADMIN_PATH . '/admin.head.php');
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr id="video_row" style="display:none;">
|
||||||
|
<th scope="row">동영상 파일</th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("MP4, MKV, MOV, WebM 등의 동영상 파일을 업로드하세요."); ?>
|
||||||
|
<input type="file" name="bn_video_file" accept="video/*">
|
||||||
|
<?php
|
||||||
|
if (isset($bn['bn_id']) && $bn['bn_id'] && $bn_content_type === 'video') {
|
||||||
|
$video_file = G5_DATA_PATH . "/banners/" . $bn['bn_id'];
|
||||||
|
if (file_exists($video_file)) {
|
||||||
|
echo '<div><p>업로드된 파일: ' . basename($video_file) . '</p>';
|
||||||
|
echo '<input type="checkbox" name="bn_video_del" value="1" id="bn_video_del"> <label for="bn_video_del">삭제</label></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="video_url_row" style="display:none;">
|
||||||
|
<th scope="row">비디오 URL</th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("MP4, M3U8, DASH 등의 비디오 파일 직접 URL을 입력하세요."); ?>
|
||||||
|
<input type="text" name="bn_video_url" value="<?php echo isset($bn['bn_video_url']) ? htmlspecialchars($bn['bn_video_url']) : ''; ?>" class="frm_input" size="80" placeholder="https://example.com/video.mp4">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="youtube_row" style="display:none;">
|
||||||
|
<th scope="row">유튜브</th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("유튜브 URL을 입력하세요. (예: https://www.youtube.com/watch?v=xxxxx 또는 https://youtu.be/xxxxx)"); ?>
|
||||||
|
<input type="text" name="bn_youtube_url" value="<?php echo isset($bn['bn_youtube_url']) ? htmlspecialchars($bn['bn_youtube_url']) : ''; ?>" class="frm_input" size="80" placeholder="https://www.youtube.com/watch?v=...">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="vimeo_row" style="display:none;">
|
||||||
|
<th scope="row">비메오</th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("비메오 URL을 입력하세요. (예: https://vimeo.com/xxxxx)"); ?>
|
||||||
|
<input type="text" name="bn_vimeo_url" value="<?php echo isset($bn['bn_vimeo_url']) ? htmlspecialchars($bn['bn_vimeo_url']) : ''; ?>" class="frm_input" size="80" placeholder="https://vimeo.com/...">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="bn_alt">메인타이틀</label></th>
|
<th scope="row"><label for="bn_alt">메인타이틀</label></th>
|
||||||
<td>
|
<td>
|
||||||
@ -205,6 +276,20 @@ include_once(G5_ADMIN_PATH . '/admin.head.php');
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function toggleContentInputs() {
|
||||||
|
const contentType = document.getElementById('bn_content_type').value;
|
||||||
|
document.getElementById('image_row').style.display = (contentType === 'image') ? 'table-row' : 'none';
|
||||||
|
document.getElementById('video_row').style.display = (contentType === 'video') ? 'table-row' : 'none';
|
||||||
|
document.getElementById('video_url_row').style.display = (contentType === 'video_url') ? 'table-row' : 'none';
|
||||||
|
document.getElementById('youtube_row').style.display = (contentType === 'youtube') ? 'table-row' : 'none';
|
||||||
|
document.getElementById('vimeo_row').style.display = (contentType === 'vimeo') ? 'table-row' : 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 페이지 로드 시 초기화
|
||||||
|
document.addEventListener('DOMContentLoaded', toggleContentInputs);
|
||||||
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once(G5_ADMIN_PATH . '/admin.tail.php');
|
include_once(G5_ADMIN_PATH . '/admin.tail.php');
|
||||||
?>
|
?>
|
||||||
@ -16,17 +16,30 @@ check_admin_token();
|
|||||||
|
|
||||||
$bn_bimg = isset($_FILES['bn_bimg']['tmp_name']) ? $_FILES['bn_bimg']['tmp_name'] : null;
|
$bn_bimg = isset($_FILES['bn_bimg']['tmp_name']) ? $_FILES['bn_bimg']['tmp_name'] : null;
|
||||||
$bn_bimg_name = isset($_FILES['bn_bimg']['name']) ? $_FILES['bn_bimg']['name'] : null;
|
$bn_bimg_name = isset($_FILES['bn_bimg']['name']) ? $_FILES['bn_bimg']['name'] : null;
|
||||||
|
$bn_video_file = isset($_FILES['bn_video_file']['tmp_name']) ? $_FILES['bn_video_file']['tmp_name'] : null;
|
||||||
|
$bn_video_name = isset($_FILES['bn_video_file']['name']) ? $_FILES['bn_video_file']['name'] : null;
|
||||||
|
$bn_content_type = isset($bn_content_type) ? $bn_content_type : 'image';
|
||||||
|
$bn_video_url = isset($bn_video_url) ? clean_xss_tags($bn_video_url) : '';
|
||||||
|
$bn_youtube_url = isset($bn_youtube_url) ? clean_xss_tags($bn_youtube_url) : '';
|
||||||
|
$bn_vimeo_url = isset($bn_vimeo_url) ? clean_xss_tags($bn_vimeo_url) : '';
|
||||||
|
|
||||||
$bn_id = isset($bn_id) ? (int) $bn_id : 0;
|
$bn_id = isset($bn_id) ? (int) $bn_id : 0;
|
||||||
|
|
||||||
$bn_bimg_del = isset($bn_bimg_del) ? $bn_bimg_del : null;
|
$bn_bimg_del = isset($bn_bimg_del) ? $bn_bimg_del : null;
|
||||||
|
$bn_video_del = isset($bn_video_del) ? $bn_video_del : null;
|
||||||
|
|
||||||
if ($bn_bimg_del) {
|
if ($bn_bimg_del) {
|
||||||
@unlink(G5_DATA_PATH."/banners/$bn_id");
|
@unlink(G5_DATA_PATH."/banners/$bn_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 파일이 이미지인지 체크합니다.
|
if ($bn_video_del) {
|
||||||
if ($bn_bimg || $bn_bimg_name) {
|
@unlink(G5_DATA_PATH."/banners/$bn_id");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 콘텐츠 유형에 따른 검증
|
||||||
|
if ($bn_content_type === 'image') {
|
||||||
|
// 파일이 이미지인지 체크합니다.
|
||||||
|
if ($bn_bimg || $bn_bimg_name) {
|
||||||
if (!preg_match('/\.(gif|jpe?g|bmp|png)$/i', $bn_bimg_name)) {
|
if (!preg_match('/\.(gif|jpe?g|bmp|png)$/i', $bn_bimg_name)) {
|
||||||
alert("이미지 파일만 업로드 할 수 있습니다.");
|
alert("이미지 파일만 업로드 할 수 있습니다.");
|
||||||
}
|
}
|
||||||
@ -35,6 +48,29 @@ if ($bn_bimg || $bn_bimg_name) {
|
|||||||
if ($timg === false || $timg[2] < 1 || $timg[2] > 16) {
|
if ($timg === false || $timg[2] < 1 || $timg[2] > 16) {
|
||||||
alert("이미지 파일만 업로드 할 수 있습니다.");
|
alert("이미지 파일만 업로드 할 수 있습니다.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} elseif ($bn_content_type === 'video') {
|
||||||
|
// 동영상 파일 검증
|
||||||
|
if ($bn_video_file || $bn_video_name) {
|
||||||
|
if (!preg_match('/\.(mp4|mkv|mov|avi|webm|flv|wmv|m4v)$/i', $bn_video_name)) {
|
||||||
|
alert("동영상 파일(MP4, MKV, MOV, AVI, WebM, FLV, WMV, M4V)만 업로드 할 수 있습니다.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} elseif ($bn_content_type === 'video_url') {
|
||||||
|
// URL 검증
|
||||||
|
if (!$bn_video_url) {
|
||||||
|
alert("비디오 URL을 입력하세요.");
|
||||||
|
}
|
||||||
|
} elseif ($bn_content_type === 'youtube') {
|
||||||
|
// 유튜브 URL 검증
|
||||||
|
if (!$bn_youtube_url) {
|
||||||
|
alert("유튜브 URL을 입력하세요.");
|
||||||
|
}
|
||||||
|
} elseif ($bn_content_type === 'vimeo') {
|
||||||
|
// 비메오 URL 검증
|
||||||
|
if (!$bn_vimeo_url) {
|
||||||
|
alert("비메오 URL을 입력하세요.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$bn_url = isset($bn_url) ? clean_xss_tags($bn_url) : '';
|
$bn_url = isset($bn_url) ? clean_xss_tags($bn_url) : '';
|
||||||
@ -50,7 +86,22 @@ if(isset($_POST['bn_position_use']) && $_POST['bn_position_use']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($w == "") {
|
if ($w == "") {
|
||||||
if (!$bn_bimg_name) alert('배너 이미지를 업로드 하세요.');
|
// 콘텐츠 유형별 필수 검사
|
||||||
|
if ($bn_content_type === 'image' && !$bn_bimg_name) {
|
||||||
|
alert('배너 이미지를 업로드 하세요.');
|
||||||
|
}
|
||||||
|
if ($bn_content_type === 'video' && !$bn_video_name) {
|
||||||
|
alert('동영상 파일을 업로드 하세요.');
|
||||||
|
}
|
||||||
|
if ($bn_content_type === 'video_url' && !$bn_video_url) {
|
||||||
|
alert('비디오 URL을 입력하세요.');
|
||||||
|
}
|
||||||
|
if ($bn_content_type === 'youtube' && !$bn_youtube_url) {
|
||||||
|
alert('유튜브 URL을 입력하세요.');
|
||||||
|
}
|
||||||
|
if ($bn_content_type === 'vimeo' && !$bn_vimeo_url) {
|
||||||
|
alert('비메오 URL을 입력하세요.');
|
||||||
|
}
|
||||||
|
|
||||||
sql_query("ALTER TABLE rb_banner AUTO_INCREMENT=1");
|
sql_query("ALTER TABLE rb_banner AUTO_INCREMENT=1");
|
||||||
|
|
||||||
@ -61,6 +112,10 @@ if ($w == "") {
|
|||||||
bn_alt4 = '$bn_alt4',
|
bn_alt4 = '$bn_alt4',
|
||||||
bn_url = '$bn_url',
|
bn_url = '$bn_url',
|
||||||
bn_device = '$bn_device',
|
bn_device = '$bn_device',
|
||||||
|
bn_content_type = '$bn_content_type',
|
||||||
|
bn_video_url = '$bn_video_url',
|
||||||
|
bn_youtube_url = '$bn_youtube_url',
|
||||||
|
bn_vimeo_url = '$bn_vimeo_url',
|
||||||
bn_position = '$bn_position',
|
bn_position = '$bn_position',
|
||||||
bn_border = '$bn_border',
|
bn_border = '$bn_border',
|
||||||
bn_radius = '$bn_radius',
|
bn_radius = '$bn_radius',
|
||||||
@ -82,6 +137,10 @@ if ($w == "") {
|
|||||||
bn_alt4 = '$bn_alt4',
|
bn_alt4 = '$bn_alt4',
|
||||||
bn_url = '$bn_url',
|
bn_url = '$bn_url',
|
||||||
bn_device = '$bn_device',
|
bn_device = '$bn_device',
|
||||||
|
bn_content_type = '$bn_content_type',
|
||||||
|
bn_video_url = '$bn_video_url',
|
||||||
|
bn_youtube_url = '$bn_youtube_url',
|
||||||
|
bn_vimeo_url = '$bn_vimeo_url',
|
||||||
bn_position = '$bn_position',
|
bn_position = '$bn_position',
|
||||||
bn_border = '$bn_border',
|
bn_border = '$bn_border',
|
||||||
bn_radius = '$bn_radius',
|
bn_radius = '$bn_radius',
|
||||||
@ -100,9 +159,17 @@ if ($w == "") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($w == "" || $w == "u") {
|
if ($w == "" || $w == "u") {
|
||||||
|
// 콘텐츠 유형에 따라 파일 업로드
|
||||||
|
if ($bn_content_type === 'image') {
|
||||||
if (isset($_FILES['bn_bimg']['name']) && $_FILES['bn_bimg']['name']) {
|
if (isset($_FILES['bn_bimg']['name']) && $_FILES['bn_bimg']['name']) {
|
||||||
rb_upload_files($_FILES['bn_bimg']['tmp_name'], $bn_id, G5_DATA_PATH."/banners");
|
rb_upload_files($_FILES['bn_bimg']['tmp_name'], $bn_id, G5_DATA_PATH."/banners");
|
||||||
}
|
}
|
||||||
|
} elseif ($bn_content_type === 'video') {
|
||||||
|
if (isset($_FILES['bn_video_file']['name']) && $_FILES['bn_video_file']['name']) {
|
||||||
|
rb_upload_files($_FILES['bn_video_file']['tmp_name'], $bn_id, G5_DATA_PATH."/banners");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 나머지 타입(video_url, youtube, vimeo)은 파일 업로드 필요 없음 (URL만 저장)
|
||||||
|
|
||||||
goto_url("./banner_form.php?w=u&bn_id=$bn_id");
|
goto_url("./banner_form.php?w=u&bn_id=$bn_id");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ define('FG_MANAGER_PATH', G5_PATH.'/'.FG_MANAGER_DIR);
|
|||||||
// define('FG_MANAGER_PATH', G5_ADMIN_PATH.'/'.FG_MANAGER_DIR);
|
// define('FG_MANAGER_PATH', G5_ADMIN_PATH.'/'.FG_MANAGER_DIR);
|
||||||
|
|
||||||
// 퍼스트가든 caf24 CDN 경로
|
// 퍼스트가든 caf24 CDN 경로
|
||||||
include_once G5_PATH.'/fg_config.php';
|
// include_once G5_PATH.'/fg_config.php';
|
||||||
// define('CDN_URL', G5_URL.'/image');
|
// define('CDN_URL', G5_URL.'/image');
|
||||||
// define('CDN_URL', 'https://firstgarden.cdn3.cafe24.com');
|
// define('CDN_URL', 'https://firstgarden.cdn3.cafe24.com');
|
||||||
|
|
||||||
@ -42,6 +42,11 @@ if(! function_exists('add_admin_menu_update') ) {
|
|||||||
add_replace('admin_menu', 'add_admin_menu_update', 1, 1);
|
add_replace('admin_menu', 'add_admin_menu_update', 1, 1);
|
||||||
function add_admin_menu_update($menu) {
|
function add_admin_menu_update($menu) {
|
||||||
$menu['menu998'] = array();
|
$menu['menu998'] = array();
|
||||||
|
|
||||||
|
array_push($menu['menu400'],
|
||||||
|
array('400411', '매표소주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_ticket.php', 'firstgarden')
|
||||||
|
);
|
||||||
|
|
||||||
array_push($menu['menu998'],
|
array_push($menu['menu998'],
|
||||||
array('998000', '퍼스트가든', G5_ADMIN_URL . '/fg_admin/orderlist_ticket.php', 'firstgarden'),
|
array('998000', '퍼스트가든', G5_ADMIN_URL . '/fg_admin/orderlist_ticket.php', 'firstgarden'),
|
||||||
//array('998010', '베이커리 재고관리', G5_ADMIN_URL . '/fg_admin/bakery/bakery_stock_adm.php', 'firstgarden'),
|
//array('998010', '베이커리 재고관리', G5_ADMIN_URL . '/fg_admin/bakery/bakery_stock_adm.php', 'firstgarden'),
|
||||||
@ -53,7 +58,7 @@ if(! function_exists('add_admin_menu_update') ) {
|
|||||||
array('998411', '매표소주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_ticket.php', 'firstgarden'),
|
array('998411', '매표소주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_ticket.php', 'firstgarden'),
|
||||||
//array('998421', '혜윰주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_hy.php', 'firstgarden'),
|
//array('998421', '혜윰주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_hy.php', 'firstgarden'),
|
||||||
//array('998431', 'B2B주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_b2b.php', 'firstgarden'),
|
//array('998431', 'B2B주문확인', G5_ADMIN_URL.'/fg_admin/orderlist_b2b.php', 'firstgarden'),
|
||||||
array('998412', '관리자주문확인', G5_ADMIN_URL . '/fg_admin/orderlist_admin.php', 'firstgarden'),
|
//array('998412', '관리자주문확인', G5_ADMIN_URL . '/fg_admin/orderlist_admin.php', 'firstgarden'),
|
||||||
array('998413', '관리자월정산용', G5_ADMIN_URL . '/fg_admin/orderlist_admin_sum.php', 'firstgarden'),
|
array('998413', '관리자월정산용', G5_ADMIN_URL . '/fg_admin/orderlist_admin_sum.php', 'firstgarden'),
|
||||||
);
|
);
|
||||||
return $menu;
|
return $menu;
|
||||||
|
|||||||
9195
firstgarden.sql
9195
firstgarden.sql
File diff suppressed because one or more lines are too long
@ -49,21 +49,85 @@ while ($row = sql_fetch_array($result)) {
|
|||||||
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
|
$bn_border = isset($row['bn_border']) && $row['bn_border'] ? ' bn_border' : '';
|
||||||
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
|
$bn_radius = isset($row['bn_radius']) && $row['bn_radius'] ? ' bn_radius' : '';
|
||||||
$bn_image = G5_DATA_URL.'/banners/'.$row['bn_id'];
|
$bn_image = G5_DATA_URL.'/banners/'.$row['bn_id'];
|
||||||
|
$bn_content_type = isset($row['bn_content_type']) ? $row['bn_content_type'] : 'image';
|
||||||
|
$bn_video_url = isset($row['bn_video_url']) ? $row['bn_video_url'] : '';
|
||||||
|
$bn_youtube_url = isset($row['bn_youtube_url']) ? $row['bn_youtube_url'] : '';
|
||||||
|
$bn_vimeo_url = isset($row['bn_vimeo_url']) ? $row['bn_vimeo_url'] : '';
|
||||||
|
|
||||||
// 새창 옵션
|
// 새창 옵션
|
||||||
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
|
$bn_new_win = isset($row['bn_new_win']) && $row['bn_new_win'] ? ' target="_blank"' : '';
|
||||||
|
|
||||||
|
// 콘텐츠 파일 존재 여부 확인
|
||||||
|
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
|
||||||
|
$file_exists = file_exists($bimg);
|
||||||
|
|
||||||
|
// 콘텐츠 유형별 출력 가능 여부 확인
|
||||||
|
$can_display = false;
|
||||||
|
if ($bn_content_type === 'image' && $file_exists) {
|
||||||
|
$can_display = true;
|
||||||
|
} elseif ($bn_content_type === 'video' && $file_exists) {
|
||||||
|
$can_display = true;
|
||||||
|
} elseif ($bn_content_type === 'video_url' && !empty($bn_video_url)) {
|
||||||
|
$can_display = true;
|
||||||
|
} elseif ($bn_content_type === 'youtube' && !empty($bn_youtube_url)) {
|
||||||
|
$can_display = true;
|
||||||
|
} elseif ($bn_content_type === 'vimeo' && !empty($bn_vimeo_url)) {
|
||||||
|
$can_display = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 출력 가능한 배너만 처리
|
||||||
|
if ($can_display) {
|
||||||
if ($i == 0) echo '<div class="mod_bn_wrap rb_wide_bn_wrap rb_wide_bn_'.$row_mod['md_id'].'" style="background-color:'.$md_banner_bg.'"><div class="swiper-container swiper-container-slide_wide_bn_'.$row_mod['md_id'].'"><ul class="swiper-wrapper swiper-wrapper-slide_wide_bn swiper-wrapper-slide_wide_bn_'.$row_mod['md_id'].'">'.PHP_EOL;
|
if ($i == 0) echo '<div class="mod_bn_wrap rb_wide_bn_wrap rb_wide_bn_'.$row_mod['md_id'].'" style="background-color:'.$md_banner_bg.'"><div class="swiper-container swiper-container-slide_wide_bn_'.$row_mod['md_id'].'"><ul class="swiper-wrapper swiper-wrapper-slide_wide_bn swiper-wrapper-slide_wide_bn_'.$row_mod['md_id'].'">'.PHP_EOL;
|
||||||
|
|
||||||
$bimg = G5_DATA_PATH.'/banners/'.$row['bn_id'];
|
|
||||||
if (file_exists($bimg)) {
|
|
||||||
$banner = '';
|
|
||||||
$size = getimagesize($bimg);
|
|
||||||
$img_width = $size[0];
|
|
||||||
echo '<div class="swiper-slide swiper-slide-slide_wide_bn_'.$row_mod['md_id'].' slide_item top_ad">'.PHP_EOL;
|
echo '<div class="swiper-slide swiper-slide-slide_wide_bn_'.$row_mod['md_id'].' slide_item top_ad">'.PHP_EOL;
|
||||||
|
|
||||||
echo '<div class="sl_bn_inner">'.PHP_EOL;
|
echo '<div class="sl_bn_inner">'.PHP_EOL;
|
||||||
|
|
||||||
|
// 콘텐츠 유형별 렌더링
|
||||||
|
if ($bn_content_type === 'image') {
|
||||||
echo '<img src="'.$bn_image.'" class="image_roll">'.PHP_EOL;
|
echo '<img src="'.$bn_image.'" class="image_roll">'.PHP_EOL;
|
||||||
|
} elseif ($bn_content_type === 'video') {
|
||||||
|
// 로컬 업로드 동영상
|
||||||
|
echo '<video class="image_roll" autoplay muted playsinline loop controls style="width: 100%; height: 100%; object-fit: cover;">'.PHP_EOL;
|
||||||
|
echo ' <source src="'.$bn_image.'" type="video/mp4">'.PHP_EOL;
|
||||||
|
echo ' Your browser does not support the video tag.'.PHP_EOL;
|
||||||
|
echo '</video>'.PHP_EOL;
|
||||||
|
} elseif ($bn_content_type === 'video_url') {
|
||||||
|
// 외부 비디오 URL (MP4, M3U8 등)
|
||||||
|
echo '<video class="image_roll" autoplay muted playsinline loop controls style="width: 100%; height: 100%; object-fit: cover;">'.PHP_EOL;
|
||||||
|
echo ' <source src="'.$bn_video_url.'" type="application/x-mpegURL">'.PHP_EOL;
|
||||||
|
echo ' <source src="'.$bn_video_url.'" type="video/mp4">'.PHP_EOL;
|
||||||
|
echo ' Your browser does not support the video tag.'.PHP_EOL;
|
||||||
|
echo '</video>'.PHP_EOL;
|
||||||
|
} elseif ($bn_content_type === 'youtube') {
|
||||||
|
// 유튜브 embed URL 변환
|
||||||
|
$youtube_embed_url = '';
|
||||||
|
if (preg_match('/youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/', $bn_youtube_url, $match)) {
|
||||||
|
$youtube_embed_url = 'https://www.youtube.com/embed/' . $match[1];
|
||||||
|
} elseif (preg_match('/youtu\.be\/([a-zA-Z0-9_-]+)/', $bn_youtube_url, $match)) {
|
||||||
|
$youtube_embed_url = 'https://www.youtube.com/embed/' . $match[1];
|
||||||
|
} else {
|
||||||
|
$youtube_embed_url = $bn_youtube_url;
|
||||||
|
}
|
||||||
|
echo '<iframe class="image_roll" style="width: 100%; height: 100%; border: none;" src="'.$youtube_embed_url.'" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'.PHP_EOL;
|
||||||
|
} elseif ($bn_content_type === 'vimeo') {
|
||||||
|
// 비메오 embed URL 변환
|
||||||
|
$vimeo_embed_url = '';
|
||||||
|
if (preg_match('/vimeo\.com\/(\d+)/', $bn_vimeo_url, $match)) {
|
||||||
|
$vimeo_embed_url = 'https://player.vimeo.com/video/' . $match[1];
|
||||||
|
} else {
|
||||||
|
$vimeo_embed_url = $bn_vimeo_url;
|
||||||
|
}
|
||||||
|
echo '<iframe class="image_roll" style="width: 100%; height: 100%; border: none;" src="'.$vimeo_embed_url.'" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>'.PHP_EOL;
|
||||||
|
} elseif ($bn_content_type === 'link') {
|
||||||
|
// 외부 영상 링크 (MP4, M3U8, 스트리밍 URL 등)
|
||||||
|
echo '<video class="image_roll" autoplay muted playsinline loop controls style="width: 100%; height: 100%; object-fit: cover;">'.PHP_EOL;
|
||||||
|
echo ' <source src="'.$bn_video_url.'" type="application/x-mpegURL">'.PHP_EOL;
|
||||||
|
echo ' <source src="'.$bn_video_url.'" type="video/mp4">'.PHP_EOL;
|
||||||
|
echo ' Your browser does not support the video tag.'.PHP_EOL;
|
||||||
|
echo '</video>'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
echo '<div class="sl_overlay"></div>'.PHP_EOL;
|
echo '<div class="sl_overlay"></div>'.PHP_EOL;
|
||||||
echo '<div class="sl_content" style="width:'.$rb_core['main_width'].'px">'.PHP_EOL;
|
echo '<div class="sl_content" style="width:'.$rb_core['main_width'].'px">'.PHP_EOL;
|
||||||
|
|
||||||
@ -93,6 +157,8 @@ while ($row = sql_fetch_array($result)) {
|
|||||||
echo '<div class="sl_alt2 font-R"><span>'.$row['bn_alt2'].'</span></div>'.PHP_EOL;
|
echo '<div class="sl_alt2 font-R"><span>'.$row['bn_alt2'].'</span></div>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 배너 링크 처리
|
||||||
|
$banner = '';
|
||||||
if(isset($row['bn_url']) && $row['bn_url']) {
|
if(isset($row['bn_url']) && $row['bn_url']) {
|
||||||
if ($row['bn_url'][0] == '#') {
|
if ($row['bn_url'][0] == '#') {
|
||||||
$banner .= '<a href="'.$row['bn_url'].'" class="sl_a_links font-B">';
|
$banner .= '<a href="'.$row['bn_url'].'" class="sl_a_links font-B">';
|
||||||
@ -111,10 +177,10 @@ while ($row = sql_fetch_array($result)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$banner .= '<div class="cb"></div>'.PHP_EOL;
|
if($banner) {
|
||||||
|
|
||||||
|
|
||||||
echo $banner;
|
echo $banner;
|
||||||
|
echo '<div class="cb"></div>'.PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
echo '<div class="ico_j"><ul class="ico_j_ul1">'.PHP_EOL;
|
echo '<div class="ico_j"><ul class="ico_j_ul1">'.PHP_EOL;
|
||||||
|
|
||||||
@ -128,18 +194,9 @@ while ($row = sql_fetch_array($result)) {
|
|||||||
echo '</ul><ul class="ico_j_ul2"><img src="'.G5_THEME_URL.'/rb.img/ico_j.svg"></ul></div>'.PHP_EOL;
|
echo '</ul><ul class="ico_j_ul2"><img src="'.G5_THEME_URL.'/rb.img/ico_j.svg"></ul></div>'.PHP_EOL;
|
||||||
|
|
||||||
|
|
||||||
echo '</div><div class="cb"></div>'.PHP_EOL;
|
echo '</div>'.PHP_EOL; // sl_content 닫기
|
||||||
|
echo '</div>'.PHP_EOL; // sl_bn_inner 닫기
|
||||||
|
echo '</div>'.PHP_EOL; // swiper-slide 닫기
|
||||||
echo '</div>'.PHP_EOL;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (isset($row['bn_ad_ico']) && $row['bn_ad_ico']) {
|
|
||||||
echo '<span class="ico_ad">AD</span>'.PHP_EOL;
|
|
||||||
}
|
|
||||||
echo '</div>'.PHP_EOL;
|
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,27 @@
|
|||||||
<!-- 주문 내역 목록 시작 { -->
|
<!-- 주문 내역 목록 시작 { -->
|
||||||
<?php if (!$limit) { ?>총 <?php echo $cnt; ?> 건<?php } ?>
|
<?php if (!$limit) { ?>총 <?php echo $cnt; ?> 건<?php } ?>
|
||||||
|
<?php
|
||||||
|
function get_item_name($od_id) {
|
||||||
|
global $g5;
|
||||||
|
$sql = " select *
|
||||||
|
from {$g5['g5_shop_cart_table']}
|
||||||
|
where od_id = {$od_id}
|
||||||
|
group by it_id
|
||||||
|
order by ct_id ";
|
||||||
|
|
||||||
|
//$result = sql_query($sql);
|
||||||
|
$result = sql_fetch($sql);
|
||||||
|
|
||||||
|
return $result['it_name'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="tbl_head03 tbl_wrap">
|
<div class="tbl_head03 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">주문번호</th>
|
<th scope="col">주문번호</th>
|
||||||
<th scope="col">주문일시</th>
|
<th scope="col">주문일시</th>
|
||||||
|
<th scope="col">상품명</th>
|
||||||
<th scope="col">상품수</th>
|
<th scope="col">상품수</th>
|
||||||
<th scope="col">주문금액</th>
|
<th scope="col">주문금액</th>
|
||||||
<!--
|
<!--
|
||||||
@ -48,13 +63,14 @@
|
|||||||
$od_status = '<span class="status_06">주문취소</span>';
|
$od_status = '<span class="status_06">주문취소</span>';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>" class="font-B"><?php echo $row['od_id']; ?></a>
|
<a href="<?php echo G5_SHOP_URL; ?>/orderinquiryview.php?od_id=<?php echo $row['od_id']; ?>&uid=<?php echo $uid; ?>" class="font-B"><?php echo $row['od_id']; ?></a>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center"><?php echo substr($row['od_time'],2,14); ?> (<?php echo get_yoil($row['od_time']); ?>)</td>
|
<td class="text-center"><?php echo substr($row['od_time'],2,14); ?> (<?php echo get_yoil($row['od_time']); ?>)</td>
|
||||||
|
<td class="td_name"><?php echo get_item_name($row['od_id']); ?></td>
|
||||||
<td class="td_numbig"><?php echo $row['od_cart_count']; ?></td>
|
<td class="td_numbig"><?php echo $row['od_cart_count']; ?></td>
|
||||||
<td class="td_numbig text_right"><?php echo display_price($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']); ?></td>
|
<td class="td_numbig text_right"><?php echo display_price($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']); ?></td>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
Reference in New Issue
Block a user