KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
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 :  /home/queenjbs/www/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/queenjbs/www/admin/Image_add_modify.php
<?
	include $_SERVER['DOCUMENT_ROOT']."/conf/conf_dir.php";

		// echo"$new_img";
		//if($mode == "file_modify" && file_exists($conImg)){


	if(file_exists($new_img)){

				$save_dir 	= $_SERVER['DOCUMENT_ROOT']."/files/muti/gallery/";

				$file_name				      = $_FILES['new_img'][name];
				$file_tmp_name_new  = $_FILES['new_img'][tmp_name];
				$file_size_new      = $_FILES['new_img'][size];


				$file_name_new				  = time().$file_name;
				move_uploaded_file($file_tmp_name_new,$save_dir.$file_name_new);

				/*
				echo"idx_no : $idx <br>";
				echo"modify_img_no : $modify_img_no <br>";
				echo"mode : $mode<br>";
				echo"name : $file_name_new <br>";
				*/


				$query = mysql_query("UPDATE files SET original_name='$file_name',	file_name='$file_name_new' WHERE no='$modify_img_no'	AND module_name='gallery' AND module_no = '$idx'", $db_con) or die (mysql_error());


				echo"<script>
											alert('새창은 닫고 부모창은 새로고침합니다.');
											opener.location.href='Image.php';
											window.close();
								</script>
				";




	}else{


	$query 	= mysql_query("SELECT * FROM files where no = '$modify_img_no' AND module_no = '$idx' AND module_type='C'",$db_con) or die(mysql_error());
	$totals = mysql_affected_rows();
	$result = mysql_fetch_array ($query);

	/*
	echo"idx_no : $idx <br>";
	echo"modify_img_no : $modify_img_no <br>";
	echo"totals : $totals <br>";
	echo"mode : $mode<br>";
	*/

	if($totals > 0){

		//	<form name="frm" method="post" action="./Proc/Image_proc.php" onsubmit="return validate();" enctype="multipart/form-data">

				$IMG_MODDIFY = "<form name='frm' action='Image_add_modify.php?idx=$idx&modify_img_no=$modify_img_no&mode=file_modify'  enctype='multipart/form-data' method='post'>
																				<input type='hidden' name='mode' 									value='file_modify'>
																				<input type='hidden' name='ori_file_name' value='$result[original_name]'>
																				<input type='hidden'	name='idx'											value='$idx'>
																				<input type='hidden'	name='modify_img_no'	value='$modify_img_no'>
																				현재 등록 파일명 : $result[original_name]	<br>
																				<input type='file'		 name='new_img' size='30' />	&nbsp; <input type='submit' value=수정하기  class=btn_red/>
																				</form>";

	}else{

				$IMG_MODDIFY = "이미지 기본정보가 올바르지 않습니다.";

	}

}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/*From, Select , TextArea, Button*/

body,div,span,a,input,select,textarea{font-family:Verdana,Arial,'Helvetica Nenu','돋움','Dotum'; font-size:12px; color:#736357;}

#contents #content .btn {text-align:right;margin:10px 0;padding-right:45px;}
#contents #content .btn1 {width:240px;text-align:center;}
.btn_blue {background:#75c3cc;border:1px solid #549ba3;}
.btn_red {background:#eb008b;border:1px solid #cc0079;}
.btn_blue, .btn_red {height:21px;color:#fff !important;width:70px;vertical-align: middle;}
a.btn_blue,a.btn_red {display:inline-block;*display:inline;*zoom:1;height:20px;text-align: center;line-height: 20px;}

form {margin:auto 0;}
form .btn_blue,form .btn_red {min-width:50px;padding:0 8px;}
input, textarea{border:1px solid #ccc;}
input.title {width:400px;}
input[type=radio],input[type=checkbox]{border:none;}
input[type=file] {margin-right:7px;}
select {min-width:80px;height:21px;border:1px solid #ccc;margin:8px 8px 8px 3px}
table select {margin:0 3px 0 0;}


#popsize {padding:10px;}
</style>
<title>JYJ 추가이미지 수정</title>

<script language="javascript">
<!--

	function size_return(){

			or_width 	= document.all.popsize.style.width;
			or_height = document.all.popsize.style.height;

			len_width 	=	or_width.length-2;
			len_height =	or_height.length-2;

			or_width 	= or_width.substring(0,len_width);
			or_height =	or_height.substring(0,len_height);

			cu_width 	= (or_width-0) + 20;
			cu_height = (or_height-0) + 20;

			self.resizeTo(cu_width,cu_height)

			n_height = or_height - document.body.clientHeight;
			n_width		=	or_width	-	document.body.clientWidth;
			self.resizeTo((cu_width + n_width), (cu_height + n_height));

	}

-->
</script>
</head>
<body  marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" onLoad="size_return(); window.focus()">


<div id="popsize" style="width:600px; height:300px; text-align:left; margin:0px;">

	<strong>추가이미지 수정</strong><br /><br />

	<?

		echo"$IMG_MODDIFY";

	?>

</div>
</body>
</html>

Anon7 - 2021