ÿØÿà 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/toadmin/design/ |
Upload File : |
<? include "../include/top.html"; include "_common.php"; // 접근권한 관리 //to_access_menu("mail_template"); $table = "TB_MAIL_TEMPLATE"; // 검색조건 $sql_where = "1=1"; if($mt_lang_s) $sql_where .= " AND mt_lang='{$mt_lang_s}' "; if($mt_status_s) $sql_where .= " AND mt_status='{$mt_status_s}'"; if($search_word) $sql_where .= " AND mt_title LIKE '%{$search_word}%'"; $sql_order = "seq DESC"; // 총 갯수 $result = db_query("select count(*) from {$table} WHERE {$sql_where}"); $rs = db_fetch_row($result); $total = $rs[0]; // 페이지수 설정 if (!$page) $page = 1; // 페이지 번호 $line = 20; // 보여줄 갯수 $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); //if(devCookie()){ // p($total_page); // p($start_page); // p($page); // p($next_list); // p($list); //} //리스트불러오기 $sql="SELECT *, IF(mt_status='Y','사용중','사용중지') as status_str FROM {$table} WHERE {$sql_where}"; if($sql_order) $sql .= " ORDER BY ".$sql_order; if($olds!=='') $sql .= " LIMIT $olds , $line "; $data = array(); $rs = db_query($sql); //파라메터 $href = "mt_lang_s=$mt_lang_s"; $href .= "&search_word_s=".$search_word_s; $param = $href."&page=$page"; ?> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title">메일<span class="arrow">></span><strong>템플릿 관리</strong></div> <div class="contents_detail"> <div id="Content_box"> <form name="frm_list" id="frm_list" method="get"> <div class="c_top_bar_search" style="padding:8px 0px;"> <table width="100%" style="box-shadow: 3px 3px 10px #ccc;;border-top:3px solid #555" border="0" cellpadding="0" cellspacing="0" summary="메일 템플릿 관리 통합검색입니다." class="c_top_table"> <caption>메일 템플릿 통합검색</caption> <colgroup> <col width="150px"> <col> </colgroup> <tbody> <tr> <td> <ul class="form_list" style="float:left"> <li class="pt5"> <select name="mt_lang_s" id="mt_lang_s"> <option value="">언어</option> <?php foreach($memberLangList as $k=>$v) { ?> <option value="<?=$v?>" <?=($mt_lang_s==$v)?"selected":""?>><?=$k?></option> <?php } ?> </select> </li> <li class="pt5"> <select name="mt_status_s" id="mt_status_s"> <option value="">사용여부</option> <option value="Y" <?=($mt_status_s == 'Y')?"selected":""?>>사용</option> <option value="N" <?=($mt_status_s == 'N')?"selected":""?>>사용중지</option> </select> </li> <li class="pt5"> <label for="mb_nm" class="v_none2">검색어 입력</label> <input class="search_box" id="search_word" name="search_word" type="text" value="<?=$search_word?>" onfocus="this.style.background='#ffffff url(none)'" onblur="if(this.value.length == 0) {this.style.background='#ffffff url(../image/common/search_txtbg03.gif)';this.style.backgroundRepeat='no-repeat';this.style.backgroundPosition='5px 1px';}" placeholder="제목을 입력하세요." /><input type="image" src="../image/btn/btn_search.gif" align="top" alt="검색" class="input_btn_search" /> </li> <li class="pt5"> <a href="mail_template_list.html" class="reload_btn" align="top" style="border-radius: 3px;padding:5px 5px">초기화</a> </li> </ul> </td> </tr> </tbody> </table> </div> <div class="top_txt_s"> <div class="bar_wrap"> <p class="search_result_txt"><span>Total : <?=number_format($total)?></span> </p> <ul class="search_rt_btn"> <li><a class="Tbtn red" href="mail_template_write.html">등록</a></li> </ul> </div> </div> <input type="hidden" name="SqlType" id="SqlType" value="" /> <table width="100%" border="0" cellspacing="0" cellpadding="0" id="mail_template_list_tbl" class="t_list"> <caption>템플릿 확인</caption> <colgroup> <col style=" width:60px" /> <col /> <col style=" width:150px" /> <col style=" width:100px" /> <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> </tr> </thead> <tbody> <? $i = 0; while($row = db_fetch_array($rs)){ $num = $total - ($page - 1) * $line - $i; $i++; switch($row['mt_lang']){ case "KO" : $lang = "한국(KO)"; break; case "TC" : $lang = "번체(HK)"; break; case "EN" : $lang = "영어(EN)"; break; case "SC" : $lang = "간체(CN)"; break; } $bg_color = ($row['mt_status'] == 'N')?"style='background-color:#f9d7f0'":""; ?> <tr <?=$bg_color?>> <td><?=$num?></td> <td class="t_title"> <a href="mail_template_write.html?<?=$param?>&mt_id=<?=$row['seq']?>"><?=$row['mt_title']?></a> </td> <td><?=$lang?></td> <td><?=$row['status_str']?></td> <td><img src="/image/icons/application_view_gallery.png" alt="미리보기" onclick="window.open('mail_template_layout.html?mt_id='+<?=$row['seq']?>);" style="cursor:pointer;"/></td> <td><a href="#" onclick="mail_del('<?=$row['seq']?>'); return false;"><input type="image" src="../image/btn/btn_delete.gif" align="top" alt="삭제" /></a></td> </tr> <?}?> <? if($total == 0){ ?> <tr> <td colspan="6">등록된 메일 템플릿이 없습니다.</td> </tr> <? } ?> </tbody> </table> </form> <?=adm_get_paging($total_page, $page, $list, "?$href&page=", "")?> </div> </div> </div> </div> </div> <div id="ajax_proc"></div> <script type="text/javascript"> $(document).ready(function(){ //언어 선택 $('#mt_lang_s').on('change',function(){ $('#mt_lang_s').val($(this).val()); document.frm_list.submit(); }); //사용여부 선택 $('#mt_status_s').on('change',function(){ $('#mt_status_s').val($(this).val()); document.frm_list.submit(); }); }); function mail_del(mt_id){ if(!mt_id) return; if(confirm('삭제후 복원할 수 없습니다. 삭제하시겠습니까?')){ ajax_loader("mail_template_proc.php?SqlType=delete&mt_id="+mt_id); } } </script> <? include "../include/footer.html" ?>