ÿØÿà 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/setting/ |
Upload File : |
<? include "../include/top.html"; include "_common.php"; $upload = "/FileData/upfile/";//업로드경로 // 테이블명 $table = " TB_UPFILE "; // 검색 설정 $sql_where = " "; // 리스트 수 가져옴 $sql = "select count(*) as total from {$table} where 0=0 {$sql_where} "; $row = db_fetch($sql); $total = $row[total]; // 페이지수 설정 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); // 정렬 설정 $sql_order=""; //배열에 저장 $data = array(); //$data = hotel_fetch($sql_where,$sql_order,$olds,$line); $sql = " select * from {$table} where 0=0 {$where} {$sql_order} limit $olds , $line"; $rs = db_query($sql); $i = 0; while($rows=db_fetch_array($rs)){ $data[$i] = $rows; $data[$i]['link'] = $upload.$rows['upfile']; $i++; } ?> <form name="list_frm"> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title">이미지 관리</div> <div class="contents_detail"> <div class="setting_wrap"> <ul class="btn_check"> <li class="btn01"><a href="javascript:;" onClick="to_dialog.iframe('uploadfile_write.html','이미지 등록','500','300',true,false,'no');">등록</a></li> </ul> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_list"> <caption>추천 수정 및 관리</caption> <colgroup> <col style="width:45px" /> <col style="width:200px" /> <col /> <col style="width:120px" /> <col style="width:120px" /> <col style="width:160px" /> <col style="width:120px" /> </colgroup> <thead> <tr> <td colspan="8" class="t_top_line"></td> </tr> <tr> <th width="45">No.</th> <th>파일명</th> <th width="300">메모</th> <th width="120">링크</th> <th width="120">다운로드</th> <th width="160">저장일시</th> <th width="120">삭제</th> </tr> </thead> <tbody> <? for($i=0 ; $i < count($data) ; $i++){ $row = $data[$i]; $id = $total-$i ?> <tr> <td><?=$id?></td> <td class="memo"><?=$row['upfile_org']?></td> <td class="memo"><?=$row['memo']?></td> <td><input type="button" name="" value="보기" class="btn_green_left" onclick="window.open('<?=$row['link']?>','new_<?=$row['seq']?>');"><span class="btn_green_right"></span> <input type="button" name="" value="복사" class="btn_gray_left" onclick="copy_clip('fn_<?=$row['seq']?>');"><span class="btn_gray_right"></span> <input type="text" name="fn_<?=$row['seq']?>" id="fn_<?=$row['seq']?>" value="<?=$row['link']?>" size="1" style="color:#FFFFFF;border:0px;" readonly> </td> <td><input type="button" name="" value="다운로드" class="btn_gray_left" onclick="document.location.href='uploadfile_down.html?seq=<?=$row['seq']?>';"><span class="btn_gray_right"></span> </td> <td><?=$row["insdt"]?></td> <td> <input type="button" name="" value="수정" class="btn_orange_left" onclick="to_dialog.iframe('uploadfile_write.html?seq=<?=$row['seq']?>','이미지 수정','500','300',true,false,'no');"><span class="btn_orange_right"></span> <input type="button" name="" value="삭제" class="btn_gray_left" onclick="delete_item('<?=$row['seq']?>');"><span class="btn_gray_right"></span> </td> </tr> <? } ?> </tbody> </table> </div> <?=adm_get_paging($total_page, $page, $list, "?$href&page=", "")?> </div> </div> </div> </form> <!-- /폼 --> <? include "../include/footer.html" ?> <script type="text/javascript"> function copy_clip(v) { var obj = eval("document.list_frm."+v); obj2 = obj.createTextRange(); obj2.execCommand("Copy"); alert("경로를 복사했습니다."); } function delete_item(seq) { if(!confirm('정말 삭제하시겠습니까?')) return false; ajax_loader('uploadfile_proc.php?SqlType=delete&seq='+seq); } </script>