Hacked By AnonymousFox
<html>
<head>
<title>อัพโหลดภาพ</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.wallform.js"></script>
<script>
//สร้าง function สำหรับการแสดงตัวอย่างภาพที่อัพโหลด
$(document).ready(function() {
$('#photoimg').die('click').live('change', function() {
//$("#preview").html('');
$("#imageform").ajaxForm({target: '#preview',
beforeSubmit:function(){
//เมื่ออัพโหลดภาพไปแล้วจะแสดงไฟล์ .gif loading
console.log('ttest');
$("#imageloadstatus").show();
$("#imageloadbutton").hide();
},
//อัพโหลดเสร็จแล้วซ่อนไฟล์ .gif loading
success:function(){
console.log('test');
$("#imageloadstatus").hide();
$("#imageloadbutton").show();
},
//error
error:function(){
console.log('xtest');
$("#imageloadstatus").hide();
$("#imageloadbutton").show();
} }).submit();
});
});
</script>
<style>
body
{
font-family:arial;
}
#preview
{
color:#cc0000;
font-size:12px
}
.imgList
{
max-height:150px;
margin-left:5px;
border:1px solid #dedede;
padding:4px;
float:left;
}
</style>
<body>
<?
include('../lib/config.php');
include('../lib/connect.php');
$namealbum=$_POST["namealbum"];
if($namealbum!=""){
$sql="insert into namealbum values (NULL,'$namealbum')";
$query=mysql_query($sql);
}
$sql="select * from namealbum order by Id desc";
$query=mysql_query($sql);
$row=mysql_fetch_array($query);
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<div align="center">
<h1>อัลบั้มภาพ : <?=$row[Name]?>
<br>
</h1>
<!-- ส่วนแสดงภาพที่อัพโหลดเข้าไป -->
<div id='preview'>
</div>
<form id="imageform" method="post" enctype="multipart/form-data" action='ajaxImageUpload.php' style="clear:both">
<input type="hidden" name="type" value="<?=$row[Id]?>">
<div id='imageloadstatus' style='display:none'>
<img src="loading.gif" alt="Uploading...."/></div>
<div id='imageloadbutton'>
<!-- เลือกได้หลายๆไฟล์ในครั้งเดียว name="photos[]" multiple="true" -->
<br>
เลือกไฟล์ภาพ :
<input type="file" name="photos[]" id="photoimg" multiple="true" />
<br>
<br>
แต่ละภาพขนาดไม่เกิน 2MB ชนิดภาพ ("jpg", "png", "gif", "bmp","jpeg")</div>
</form>
<a href="../albumst-view.php?Ids=<?=$row[Id]?>">ดูรูปภาพหน้าเว็บไซต์</a></div>
</div>
</td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td background="../footer.gif" height="153" bgcolor="#FFFFFF"><br />
<br />
<div align="center" class="style1">สำนักการแพทย์ กรุงเทพมหานคร เลขที่ 514 ถนนหลวง เขตป้อมปราบศัตรูพ่าย กรุงเทพฯ 10100 <br />
โทร. 0-2224-2954 , 0-2224-9711 , 0-2221-6020 , 0-2225-4966 โทรสาร 0-2226-1931 , 0-2221-6029 <br />
ติดต่อ Webmaster : webmaster@msdbangkok.go.th</div></td>
</tr>
</table>
</body>
</html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox