|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21572/root/home/queenjbs/yuchun/admin/ |
Upload File : |
<?
include $_SERVER['DOCUMENT_ROOT']."/admin/adminTopMenu.html";
//echo"$del_img_no";
//echo"$idx";
if($del_img_no){
//echo"삭제";
$fileName = get_db("select file_name from files where no = '$del_img_no'");
$del_file=$_SERVER['DOCUMENT_ROOT']."/files/muti/thump/".$fileName;
if($fileName && is_file($del_file)) unlink($del_file);
$query = mysql_query("DELETE FROM files WHERE no = '$del_img_no'",$db_con) or die (mysql_error());
}
?>
<script type="text/javascript">
function validate()
{
if(!chkBlank(frm.title,"타이틀을 입력하여 주십시요.")) {return false;}
return true;
}
</script>
<script type="text/javascript">
function goLang(lang_code) {
var f = document.form;
f.lang_code.value = lang_code;
f.action = 'Image_view.php';
f.submit();
}
function go_View(mediano) {
var f = document.form;
f.idx.value = mediano;
f.action = 'Image_view.php';
f.submit();
}
function go_FileDel(mediano) {
if(confirm("해당 파일이 삭제 됩니다.\n삭제하시겠습니까?")) {
/*
var f = document.form;
f.mediano.value = mediano;
f.fd.value = 'fdel';
f.fileno.value = fileno;
f.action = './proc/Image_proc.php';
f.submit();
*/
var del_img_no = mediano;
location.href="Image_edit.php?idx=<?=$idx?>&del_img_no="+del_img_no;
}
}
/* 추가 이미지 꿘쓰 20131120 시작 --------------------------------------------------------------------*/
function makeInput(strNum){
var tempInput = "";
for(var i=1;i <= strNum; i++) {
if(i < 0) {
x = "0"
} else {
x = ""
}
tempInput += x+i+". 이미지 <input type='file' name='conImg_new_add[]' size='30' /><br><br>\n";
}
document.getElementById("make").innerHTML = tempInput;
}
/* 추가 이미지 꿘쓰 20131120 끝 --------------------------------------------------------------------*/
/* 추가 이미지 수정 꿘쓰 20131125 시작 ---------------------------------------------------*/
function go_FileModify(modify_no){
var modify_img_no = modify_no
var modify_url = "Image_add_modify.php?idx=<?=$idx?>&modify_img_no="+modify_img_no;
window.open( modify_url,"_blank","");
}
/* 추가 이미지 수정 꿘쓰 20131125 끝 ---------------------------------------------------*/
</script>
<div id="contents">
<?
$tableName="gallery";
if($idx){
$qry = "SELECT * FROM photo_$tableName where no='$idx'";
$result = mysql_query($qry,$db_con);
$row = mysql_fetch_array($result);
$loginDate = substr($row[logindate],0,10);
$regDate = substr($row[cdate],0,10);
$subject = stripslashes($row[subject]);
$contents = stripslashes($row[contents]);
$naviChkName = "수정";
$mode = "proc";
}else{
$naviChkName = "등록";
$mode = "";
}
?>
<h2>Multimedia Image</h2>
<div id="content">
<form name="form" method="post" target="_self" onsubmit="return false;">
<input type="hidden" name="page" value="1">
<input type="hidden" name="totalRow" value="22" >
<input type="hidden" name="searchType" value="">
<input type="hidden" name="searchStr" value="">
<input type="hidden" name="searchGroup" value="">
<input type="hidden" name="fd" value="">
<input type="hidden" name="lang_code" value="KO">
<input type="hidden" name="category" value="Image">
<input type="hidden" name="idx" value="">
<input type="hidden" name="seq" value="">
<input type="hidden" name="fileno" value="">
</form>
<form name="frm" method="post" action="./Proc/Image_proc.php" onsubmit="return validate();" enctype="multipart/form-data">
<input type="hidden" name="mode" value="proc">
<input type="hidden" name="lang_code" value="KO">
<input type="hidden" name="category" value="gallery">
<input type="hidden" name="idx" value="<?=$idx?>">
<table class="write" summary="관리자모드 게시판입니다" cellspacing="0">
<colgroup>
<col width="120" />
<col />
</colgroup>
<tbody>
<tr>
<th>is_secret</th>
<td><input type="checkbox" id="is_secret" name="is_secret" class="input_box" value="Y" <?if($row[is_secret] == "Y") echo"checked";?>/><b>secret check</b></td>
</tr>
<tr>
<th>Main Title</th>
<td><input type="text" name="subject" value="<?=$subject?>" class="title" /></td>
</tr>
<tr>
<th>thumnail Img</th>
<td>
<input type="file" name="thumnail"> 첨부파일 :
<?
$imgName = get_db("select original_name from files where module_no = '$idx' and module_name='$tableName' and order_by='1'");
if($imgName){
echo $imgName." ";
}
?>
</td>
</tr>
<tr>
<th>thumnail 좌표</th>
<td>
<input type="text" name="general_setting" value="<?=$row[general_setting]?>"/> ex) 60% 50%
</td>
</tr>
<tr>
<th>Date</th>
<td><input type="text" value="<?=$row[start_date]?>" name="usedate"/></td>
</tr>
<tr>
<th>Contents</th>
<td><textarea cols="100" style="height:100px;" name="mediasource"><?=$contents?></textarea></td>
</tr>
<tr>
<th>Images Count</th>
<td><input type="text" name="filecnt_new_add" onkeyup="javascript:makeInput(this.value)" /> 추가이미지 개수입력</td>
</tr>
<tr>
<th>Images Attach</th>
<td>
<div id="make"></div><br />
<?
//첨부파일 개수를 구해서 0이 아니면 리스트
if($row[files_count]){
$QUERY_PAGE = "SELECT * FROM files where module_no = '$idx' and module_name='$tableName' and module_type='C' order by no";
$results= mysql_query($QUERY_PAGE,$db_con);
$totals = mysql_affected_rows();
for($i=0; $i<$totals; $i++) {
$rows = mysql_fetch_array($results);
$Nums = $i +1;
echo $Nums.". <input type='file' name='conImg' size='30' /> 파일 : ".$rows[original_name]." <a href='javascript:go_FileModify(".$rows[no].");' title='수정'><img src='/admin/images/check.png'></a>"." <a href='javascript:go_FileDel(".$rows[no].");' title='삭제'><img src='/admin/images/out.png'></a>";
echo "<br><br>";
//echo"$QUERY_PAGE";
}
}
?>
<!--div id="file_make"><input type="button" value="추가" class="btn_red" /></div -->
</td>
</tr>
</tbody>
</table>
<div class="btn">
<input type="submit" value="수정하기" class="btn_red" />
<a href="javascript:go_View(<?=$idx?>);" class="btn_blue">취소하기</a>
</div>
</form>
</div>
</div>
<!--script type="text/javascript">
;(function($){
$(document).ready(function(){
var imgs = $('input[name=conImg]').length;
$('div#file_make input').bind('click',function(){
imgs = (imgs+1);
$(this).before( imgs + '. <input type="file" name="conImg" size="30" /><br /><br />');
return false;
});
});
})(jQuery);
</script -->
<p></p>
</body>
</html>