<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml/DTD/XHTAML-Transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhml"> <head> <meta http-equiv="Content-Type" content="text/css" /> <title>Webboard</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" /> <script languge="javascript"> function checkNull () { if(document.frmReply.detail.value=="" || document.frmReply.detail.value==null) { alert(' Please insert detail !'); document.frmReply.detail.focus(); return false; } if(document.frmReply.name.value=="" || document.frmReply.name.value==null) { alert(' Please insert name !'); document.frmReply.name.focus(); return false; } document.frmReply.submit (); } </script> </head> <body> <center><br /> <?php include("connect.php"); include("function.php"); $sql = "update webboard_post set view=view+1 where question_id=".$_REQUEST['id']; $query = mysql_query($sql) or die(mysql_error() ); $sql = "SELECT * FROM webboard_post where question_id=".$_REQUEST['id']; $query = mysql_query($sql) or die(mysql_error() ); $row = mysql_fetch_array($query); ?> <table width="700" class="square" cellpadding="4" cellspacing="1"> <tr> <td width="20%" class="square" align="center">Subject</td> <td width="80%" class="square" align="left"><?php echo $row['subject']?></td> </tr> <tr> <td width="20%" class="square" align="center">Detail</td> <td width="80%" class="square" align="left"><?php echo $row['subject_detail']?> </td> </tr> <? if($row['attach_file']<>"") { ?> <tr> <td width="20%" class="square" align="center">Attach_file</td> <td width="80%" class="square" align="left"><?php echo showAttachfile($row['attach_file'])?> </td> </tr> <? } ?> <tr> <td width="20%" class="square" align="center">Name</td> <td width="80%" class="square" align="left"><?php echo $row['name']?></td> </tr> <tr> <td width=100% colspan="2" class="square" align="right"> Date : <?php echo dateShow($row['datadate'])?> IP : <?php echo showIP($row['ip_address'])?> View : <?php echo $row['view']?> reply : <?php echo $row['reply']?> </td> </tr> </table><br /> <?php $sql = "select * from webboard_reply where question_id=".$_REQUEST['id']; $query = mysql_query($sql) or die(mysql_error()); $num = mysql_num_rows($query); if($num>0) { for($i=0;$i<num;$i++) { $row = mysql_fetch_array($query); ?> <table width="700" class="square" cellpadding="4" cellspacing"1"> <tr> <td width="20%" class="square" align="center">Detail</td> <td width="80%" class="square" align="left"><?php echo badword($row['reply_detail'])?></td> </tr> <? if($row['attach_file']<>"") { ?> <tr> <td width="20%" class="square" align="center">Attach file</td> <td width="80%" class="square" align="left"><?php echo showAttachfile($row['attach_file'])?></td> <tr> <? } ?> <tr> <td width="20%" class="square" align="center">Name</td> <td width="80%" class="square" align="left"><?php echo $row['name']?></td> </tr> <tr> <td width="100%" class="square" align="right"> Date : <?php echo dateShow($row['datadate'])?> IP : <?php echo showIP($row['ip_address'])?> </td> </tr> </table><br /> <? } }?> <form id="frmReply" name="frmReply" enctype="multipart/form-data" method="post" action="insertreply.php" onsubmit="checkNull(); return false;"> <table width="700" class="square" cellpadding="4" cellspacing="1"> <tr> <td width="20%" class="square" align="center">Detail</td> <td width="80%" class="square" align="left"> <textarea name="detail" rows="4" class="verdana" id="detail" style="width:500px"></textarea> </td> </tr> <tr> <td width="20%" class="square" align="center">Attach File</td> <td width="80%" class="square" align="left"> <input type="file" id="attach" name="attach" class="verdana"> </td> </tr> <tr> <td width="20%" class="square" align="center">Name</td> <td width="80%" class="square" align="left"> <input type="text" id="name" name="name" style="width:444px" class="verdana"> <input type="hidden" id="id" name="id" value="<?php echo $_REQUEST['id']?>"> <input type="submit" value="post" class="verdana"> </td> </tr> </table> </form> </center> </body> </html>
<?php echo $row['name'];?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง