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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/admin/group_consult_list.php
<?
$sub_menu = "300200";
include_once("./_common.php");

$g4['title'] = "단체문의/견적";
include_once $_SERVER['DOCUMENT_ROOT'].'/admin/admin.head.php';


auth_check($sub_menu, $amenu, "r");
$token = get_token();

/* 검색바 설정 */
$tbName = "g4_group_consult";

// 정렬
if (!$order_by_s)	{
	$order_by_c = "con_id";
	$order_by_s = "desc";
}
$sql_order = "order by {$order_by_c} {$order_by_s}";

//서치필드
$sqlWhere = "";
$rhref = "";

$sql_search = " where con_del = 'N' "; // START : 검색조건

// END : 검색조건

//리스트 총갯수
$sql = " select count(*) as cnt from $tbName $sql_search $sql_order ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];

$list_count = $config['cf_page_rows'];

$total_page  = ceil($total_count / $list_count);  // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$olds = ($page - 1) * $list_count; // 시작 열을 구함

// 검색결과
$sql = " select * from $tbName $sql_search $sql_order limit $olds, $list_count ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
	$data[] = $row;
}

// 단체분류
$group_type_list = explode("|", $config['cf_group_type']);
?>

<link rel="stylesheet" href="/admin/css/boarding_agreement.css?ver=<?=time()?>" />
<style>
    #searchResultArea {margin-bottom:10px;}
    #reg_btn_wrap{clear:both; position:relative; width:100%; margin-bottom:10px;}
    .reg_btn{display:block; width:100px; margin-bottom:10px; text-align:center; color:#fff !important; background:#ff4c22; padding:5px 0; border-radius:4px; float:right;}


    .small_btn{min-width:38px;color:#fff;padding:4px 6px 3px;border-radius:3px;cursor:pointer}

    .small_btn_gray_deep{background:#535353}
    .small_btn_gray{background:#a5a5a5}
    .small_btn_red{background:#ff4c22}
    .small_btn_yellow{background:#FFC700}
    .small_btn_blue{background:#4076df}

    .contents_tb .cmt_cnt {display:inline-block; color:#E43232; font-weight:bold;}

	#consult_write{background:#4076df}

</style>

<section id="contents_area">

	<?php
	if($g4['title']){
		?>
		<div id="page_title_area">
			<h1><?=$g4['title']?></h1>
		</div>
		<div id="page_title_area_shadow"></div>
		<?php
	}
	?>

	<form name="consult_form" action="reserve_group_list.php" type="GET">
		<input type="hidden" id="sql_search" value="<?=base64_encode($sql_search)?>" />

		<div id="reg_btn_wrap">
			<a id="consult_write" class="reg_btn" href="#">등록하기</a>
		</div>
	<div id="contentsWrap">
		<section id="contents_tb_wrap">

			<table class="contents_tb" >
				<thead>
				<tr>
					<th style="width:50px;">No</th>
					<th style="width:88px;">등록일</th>
					<th style="">단체명</th>
					<th style="width:150px;">신청자</th>
					<th style="width:120px;">전화번호</th>
					<th style="width:220px;">이메일</th>
					<th style="width:50px;">지점</th>
					<th style="width:100px;">탑승일</th>
					<th style="width:60px;">인원</th>
					<th style="width:80px;">확인여부</th>
					<th style="width:50px;">보기/수정</th>
					<th style="width:50px;">삭제</th>
				</tr>
				</thead>
				<tbody>
				<?php
				if(count($data) > 0){
					foreach($data as $k => $row){
						$con_id = $row['con_id'];

						// 댓글 수
						$data_cmt = sql_fetch("select count(*) as cmt_cnt from g4_group_consult_cmt where con_id = {$con_id}");
						$cmt_cnt = $data_cmt['cmt_cnt'];
						?>
						<tr>
							<td><?=$row['con_id']?></td>
							<td><?=substr($row['con_write_dt'], 0, 10)?></td>
							<td>
								<?=$row['con_group_name']?>
								<? if($cmt_cnt > 0){ ?>
									<span class="cmt_cnt"> (<?=$cmt_cnt?>)</span>
								<? } ?>
							</td>
							<td><p class="con_name"><?=$row['con_name']?></p></td>
							<td><?=$row['con_hp']?></td>
							<td><?=$row['con_email']?></td>
							<td><?=$branch_list[$row['con_branch']]['name']?></td>
							<td><?=$row['con_date']?></td>
							<td><?=$row['con_inwon']?></td>
							<td>
								<?if($row['con_confirm'] == 'Y'){ ?>
									<span con_id="<?=$row['con_id']?>" class="consult_confirm small_btn small_btn_blue">확인</span>
								<? } else { ?>
									<span con_id="<?=$row['con_id']?>" class="consult_confirm small_btn small_btn_yellow">미확인</span>
								<? } ?>
							</td>
							<td><span con_id="<?=$row['con_id']?>" class="consult_edit small_btn small_btn_gray">수정</span></td>
							<td><span con_id="<?=$row['con_id']?>" class="consult_del small_btn small_btn_gray_deep">삭제</span></td>
						</tr>
					<?		}
				} else {
					?>
					<tr>
						<td colspan="12">데이터가 없습니다.</td>
					</tr>
					<?php
				}
				?>
				</tbody>
			</table>


		</section>
	</div>
	</form>

	<form name="consultForm" action="group_consult_action.php" method="post" style="display:none;">
		<input type="hidden" name="mode" value="">
		<input type="hidden" name="con_id" value="">
	</form>

	<?php
	$query_string = adm_get_query_string();
	echo adm_get_paging($total_page, $page, 10, "?".$query_string."&page={PAGE}");
	?>

</section>

<script type="text/javascript">
	$(window).load(function(){

		// 등록
		$('#consult_write').on('click', function(){
			window.open('group_consult_form.php', 'consult_form', 'resizable=yes,menubar=no,scrollbars=yes,scrolling=auto,width=600,height=560');
		})

		// 수정
		$('.consult_edit').on('click', function(){
			var con_id = $(this).attr('con_id');
			window.open('group_consult_form.php?con_id='+con_id, 'consult_form', 'resizable=yes,menubar=no,scrollbars=yes,scrolling=auto,width=600,height=600');
		})

		// 삭제
		$('.consult_del').on('click', function(){
			var form = document.forms['consultForm'];
			var con_id = $(this).attr('con_id');
			var consult_name = $(this).parent().parent().find('.con_name').text();

			if(confirm(consult_name + " 님의 문의를 삭제하시겠습니까?")){
				form.elements['con_id'].value = con_id;
				form.elements['mode'].value = "CONSULT_DELETE";
				form.submit();
			}
		})

		// 상태변경
		$('.consult_confirm').on('click', function(){
			var form = document.forms['consultForm'];
			var con_id = $(this).attr('con_id');
			var btn_obj = $(this);

			var param = {
				'mode' : 'CONSULT_CONFIRM',
				'con_id' : con_id,
			}

			jQuery.ajax({
				type : "POST",
				url : '/admin/group_consult_action.php',
				data : param,
				dataType : "JSON",
				success : function(d) {
					var data = d;
					if(data['status'] == '200'){
						var con_confirm = data['con_confirm'];
						if(con_confirm == 'Y') {
							$(btn_obj).removeClass('small_btn_yellow').addClass('small_btn_red');
							$(btn_obj).text('확인');
						} else {
							$(btn_obj).removeClass('small_btn_red').addClass('small_btn_yellow');
							$(btn_obj).text('미확인');
						}
					} else {
						alert(data['status_message']);
					}
				},
			})
		});

	})
</script>

<?php
	include_once $_SERVER['DOCUMENT_ROOT'].'/admin/admin.tail.php';
?>


Anon7 - 2021