ÿØÿà 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/design/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

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

// 검색조건
$sql_where = "1=1";
if($event_lang) $sql_where .= "and event_lang='{$event_lang}' ";

$sql_order = "e_idx DESC";

// 페이지수 설정
if (!$page) $page = 1; // 페이지 번호
$line = ($BOARD_INFO[BD_PS])?$BOARD_INFO[BD_PS]:20; // 보여줄 갯수
$list = ($BOARD_INFO[BD_PM])?$BOARD_INFO[BD_PM]: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);

// 총 갯수
$result = db_query("select count(*) from TB_EVENT WHERE {$sql_where}");
$rs = db_fetch_row($result);
$total = $rs[0];

//리스트불러오기
$sql="
	SELECT *, 
	IF(event_status='Y','사용중','행사종료') as status_str 
	FROM TB_EVENT WHERE {$sql_where}
";
if($sql_order) $sql .= " ORDER BY ".$sql_order;
if($olds!=='') $sql .= " LIMIT $olds , $line ";

$data = array();
$rs = db_query($sql);

//파라메터
$href = "event_lang=$event_lang";
$param = $href."&page=$page";
?>

<div class="contents_wrap">
<div class="contents_wrap_in">
	<div class="title">이벤트<span class="arrow">&gt;</span><strong>이벤트 관리</strong></div>
	<div class="contents_detail">

		<div id="Content_box">
		<div class="top_txt_s">
			<div class="bar_wrap">
				<p class="search_result_txt"><span>Total : <?=$total?></span> </p>
				<ul class="search_rt_btn">
					<li><a class="Tbtn red" href="event_edit.html">등록</a></li>
				</ul>
				</div>
			</div>

			<form name="event_List" id="event_List" method="POST">
			<input type="hidden" name="SqlType" id="SqlType" value="" />
			<table width="100%" border="0" cellspacing="0" cellpadding="0" id="event_List_tbl" class="t_list">
				<caption>이벤트 확인</caption>
				<colgroup>
					<col style=" width:60px" />
					<col />
					<col style=" width:150px" />
					<col style=" width:150px" />
					<col style=" width:220px" />
					<col style=" width:100px" />
					<col style=" width:100px" />
					<col style=" width:80px" />
					<col style=" width:80px" />
					<col style=" width:80px" />
				</colgroup>
				<thead>
				<tr>
					<th scope="col">No</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>
					<th scope="col">삭제</th>
				</tr>
				</thead>
				<tbody>
				<?
				$i = 0;
				while($row = db_fetch_array($rs)){
					$num = $total - ($page - 1) * $line - $i;
					$i++;

					switch($row['event_lang']){
						case "ko" :
							$lang = "한국(KO)";
							$url = "https://tourboss.co.kr/event/?code=";
							break;
						case "hk" :
							$lang = "번체(HK)";
							$url = "https://tktravelkorea.com/event/?code=";
							break;
						case "en" :
							$lang = "영어(EN)";
							$url = "https://en.tktravelkorea.com/event/?code=";
							break;
						case "cn" :
							$lang = "간체(CN)";
							$url = "https://cn.tktravelkorea.com/event/?code=";
							break;
					}

					$arr = db_fetch("select count(*) as cnt from TB_EVENT_GOOD where e_idx = '{$row['e_idx']}'");
					$good_count = $arr['cnt'];
				?>
				<tr>
					<td><?=$num?></td>
					<td class="t_title">
						<a href="event_edit.html?<?=$param?>&e_idx=<?=$row['e_idx']?>"><?=$row[event_title]?></a>
					</td>
					<td><?=$row['event_code']?></td>
					<td><?=$lang?></td>
					<td>
						<?=substr($row[event_start], 0, 16)?> ~ 
						<?=substr($row[event_end], 0, 16)?>
					</td>
					<td><?=number_format($good_count)?></td>
					<td><?=$row['status_str']?></td>
				    <td><img src="/image/icons/application_view_gallery.png" alt="미리보기" onclick="window.open('<?=$url?><?=$row[event_code]?>'); return false;" style="cursor:pointer;"/></td>
				    <td><a href="#" onclick="copy_url('<?=$url?><?=$row[event_code]?>'); return false;"><input type="image" src="/image/icons/page_paste.png" align="top" alt="링크복사" /></a></td>
					<td><a href="#" onclick="event_del('<?=$row[e_idx]?>'); return false;"><input type="image" src="../image/btn/btn_delete.gif" align="top" alt="삭제" /></a></td>
				</tr>
				<?}?>
				</tbody>
			</table>
			</form>

			<?=adm_get_paging($total_page, $page, $list, "?$href&page=", "")?>
		</div>
		</div>
	</div>
</div>
</div>

<script type="text/javascript">
$(document).ready(function(){

});

function copy_url(url){
	var temp_elem = document.createElement("textarea");
	document.body.appendChild(temp_elem);

	temp_elem.value = url;
	temp_elem.select()
	temp_elem.setSelectionRange(0, 99999); /*For mobile devices*/

	document.execCommand("copy");
	document.body.removeChild(temp_elem);

	alert("클립보드에 링크 주소를 복사했습니다. 원하는 곳에 붙여넣기 하세요.\n\n" + url);

	return false;
}

function event_del(e_idx){
	if(!e_idx) return;

	if(confirm('삭제후 복원할 수 없습니다. 삭제하시겠습니까?')){
		location.href = "event_proc.php?SqlType=delete&e_idx="+e_idx+"&<?=$param?>";
	}
}

</script>

<? include "../include/footer.html" ?>


Anon7 - 2021