<meta http-equiv="content-type" content="text/html" charset="utf-8"> <script src="jquery-1.11.0.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function(){ $('.PICSQL').click(function(){ var image = $('.PICSQL').attr('name'); alert(image); var url = "GalleryShow1.php"; var dataSet = "image="+image; $.post(url,dataSet,function(data){ $('#youimage').html(data); }); }); }); </script> <!--<img src="../BF4 embled.jpg" id="name" > <input type="button" id="PUSH" value="PUSH"> <span id="mySpan"></span> --> <? include('connectserver.php'); $qr1 = mysql_query("Select * From gallery Order by GalleryID ASC "); echo"<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><tr>"; $intRows = 0; while ($rs1 = mysql_fetch_array($qr1)){ $intRows++; echo "<td>";?> <a class="PICSQL" name="<?=$rs1['GalleryID'];?>"> <img src="uploads/<?=$rs1['GalleryName'];?>" width="230" height="150" ></a><br> <? echo"</td>"; if(($intRows)%2==0) { echo"</tr>"; } else { echo "<td>"; } } echo"</tr></table>"; ?> <span id="youimage"></span> <span id="gallery"></span> <? mysql_close($con);?>
<? include ('connectserver.php'); $STd=$_POST['image']; $strSQL = "Select * from gallery Where GalleryID = '".$STd."'"; $qr = mysql_query($strSQL); while($rs = mysql_fetch_array($qr)){ echo "<img src='uploads/$rs[GalleryName]' width='150' height='100'>"; } mysql_close($con); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง