ÿØÿà JFIF ` ` ÿþ
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 : |
<?php $sub_menu = "900800"; include_once $_SERVER['DOCUMENT_ROOT'].'/admin/_common.php'; include_once $_SERVER['DOCUMENT_ROOT'].'/admin/common_function.php'; //p($_SESSION); $g4['title'] = "탑승후기 관리"; include_once $_SERVER['DOCUMENT_ROOT'].'/admin/admin.head.php'; auth_check($sub_menu, $amenu, "r"); $token = get_token(); $tb_name = "g4_write_zip_after"; $table_file_id = "wr_id"; // 정렬 if (!$order_by_s) { $order_by_s = "{$table_file_id} DESC"; } // 정렬 설정 $sql_order=" {$order_by_s} "; //데이터 $data = array(); //조건 총 수 $sql = "SELECT count(*) AS cnt FROM {$tb_name} WHERE wr_is_comment = 0"; $result = sql_query($sql); $total = mysql_fetch_array($result); $total = $total['cnt']; $list_count_s = 30; // 페이지수 설정 if (!$page){ $page = 1; // 페이지 번호 } $line = $list_count_s; // 보여줄 갯수 $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); // Limit $limit = " $olds , $line "; // $sql = "SELECT * FROM {$tb_name} {$sqlWhere} ORDER BY {$table_file_id} DESC LIMIT {$limit}"; $sql = "SELECT * FROM {$tb_name} WHERE wr_is_comment = 0 ORDER BY {$table_file_id} DESC LIMIT {$limit}"; // p($sql); $data = array(); $result = sql_query($sql); while($dataRow = mysql_fetch_array($result)){ array_push($data, $dataRow); } ?> <link rel="stylesheet" href="/admin/css/boarding_agreement.css?ver=<?=time()?>" /> <link rel="stylesheet" href="/admin/css/boarding_agreement_srch.css?ver=<?=time()?>" /> <style> #notice_form select{width:90px;padding:5px 10px 5px 2px} #notice_form select:nth-child(2){margin-left:5px} #notice_form #srch_field_value{width:150px;padding:5px 3px;margin-left:5px} #notice_form #notice_submit_button{background:#434343;padding:6px 10px;border:none;border-radius:4px;color:#fff;margin-left:4px} #notice_reg_btn{float:right;background:#ff4c22;padding:6px 15px;border:none;border-radius:4px;color:#fff !important;} .comt_cnt{color:red;font-weight:bold} .notice_area{background:#E7F2F8 !important;} #notice_reg_btn {float: right;background: #4076df;padding: 6px 15px;border: none;border-radius: 4px;color: #fff !important;margin-bottom:20px;margin-right:2%;margin-top:30px} .notice_modify_btn{background:#A5A5A5;color:#fff !important;padding:2px 8px;border-radius:3px} .notice_del_btn{background:#4076df;color:#fff !important;padding:2px 8px;border-radius:3px;border:none;cursor:pointer} .link{color:#000} .link b{color:#4077df} </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 } ?> <div id="contentsWrap"> <section id="contents_tb_wrap"> <table class="contents_tb" > <thead> <tr> <th style="width:50px">순서</th> <th>제목</th> <th style="width:200px">등록일</th> <th style="width:70px">수정</th> <th style="width:70px">삭제</th> </tr> </thead> <tbody> <?php if(count($data) > 0){ foreach($data as $item){ ?> <tr> <td><?=$item['wr_id']?></td> <td style="text-align:left"> <a class="link" href="/admin/review_view.php?wr_id=<?=$item['wr_id']?>"><?=$item['wr_subject']?> <?php $wr_comment = (int) $item['wr_comment']; if($wr_comment > 0){ echo "<b>({$wr_comment})</b>"; } ?> </a> </td> <td> <?php $ins_dt = explode(" ",$item['wr_datetime']); echo $ins_dt[0]; ?> </td> <td> <a class="notice_modify_btn" href="/admin/review_form.php?mode=modify&wr_id=<?=$item['wr_id']?>">수정</a> </td> <td> <button class="notice_del_btn" wr_id="<?=$item['wr_id']?>">삭제</button> </td> </tr> <?php } }else{ ?> <tr> <td colspan="5">데이터가 없습니다.</td> </tr> <?php } ?> </tbody> </table> </section> <?php echo adm_get_paging($total_page, $page, $list, "?$rhref&page=", "") ?> </div> </section> <script> $(window).load(function(){ $('.notice_del_btn').click(function(){ wr_id = parseInt($(this).attr('wr_id')); if(confirm('정말로 삭제하시겠습니까?') && wr_id > 0){ location.href = '/admin/review_form_update.php?mode=del&wr_id='+wr_id; } }) }) </script> <?php include_once $_SERVER['DOCUMENT_ROOT'].'/admin/admin.tail.php'; ?>