<?php echo $arrcom['detail']; ?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <link href="css/styles.css" rel="stylesheet" type="text/css"> <table width="100%" border="0" cellpadding="5" cellspacing="0" class="box3"> <? $idtopic=$_GET['idtopic']; $sql="select * from topic where t_id=$idtopic"; $query=mysql_query($sql); $arr=mysql_fetch_array($query); $sqluser="select * from user where id_mem=$id_mem"; $queryuser=mysql_query($sqluser); $arruser=mysql_fetch_array($queryuser); ?> <title><?=$arr['title'];?></title> <tr> <td ><h1><font color="#FFCC00"><?=$arr['title'];?></font></h1></td> </tr> <tr> <td><h3><p><?=$arr['detail'];?></p></h3></td> </tr> <tr> <td> <font color="#FFCC66"><b><? if($arr['id_mem']==$arruser['id_mem']){ echo $arruser['username']; }?></b></font> - <?=dateTimeDiff($arr['date']);?></td> </tr> </table> <br> <? $sqlcom="select * from comment where t_id=$idtopic order by c_id desc"; $querycom=mysql_query($sqlcom); while($arrcom=mysql_fetch_array($querycom)){ ?> <table width="100%" border="0" cellpadding="5" cellspacing="0" class="box"> <tr> <td colspan="2"></td> </tr> <tr> <td colspan="2"><p> <? echo $arrcom['detail']; ?></p></td> </tr> <tr> <td width="90%"> <font color="#FFCC00"><b><? if($arrcom['id_mem']==$arruser['id_mem']){ echo $arruser['username']; } ?></b></font> - <?=dateTimeDiff($arrcom['date']);?></td> <td align="right" valign="bottom"><table width="100%" border="0" align="right" cellpadding="1" cellspacing="0"> <tr> <td width="37%" align="right" valign="bottom"><img src="img/toggle-small-expand.png" width="16" height="16" border="0"></td> <td width="63%" align="left" valign="top"><a href="#">ตอบกลับ</a></td> </tr> </table></td> </tr> </table> <br> <? } ?> <? if($_SESSION){ ?> <form action="index.php?home=insercomment" method="post" name="form1"> <table width="100%" border="0" cellpadding="5" cellspacing="0" class="box"> <tr> <td colspan="3"> <div> <textarea name="detail" cols="150" rows="15" class="tetfilddetail" id="detail" ></textarea> <div id="toolbar"> </div> </div> </td> </tr> <tr> <td width="12%"><input type="submit" class="classname" name="Submit" value="แสดงความคิดเห็น"></td> <td width="3%"><img src="MyResize/<?=$arruser['File']; ?>" width="31" height="31" border="0" class="pic" /></td> <td width="85%"><strong>สมาชิกหมายเลข :</strong> <?=$arruser['id_mem']; ?> | <?=$arruser['username']; ?> <input name="id_mem" type="hidden" id="id_mem" value="<?=$arruser['id_mem']; ?>"> <input name="t_id" type="hidden" id="t_id" value="<?=$idtopic;?>"></td> </tr> </table> </form> <? } ?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <? $detail=$_POST['detail']; $date=date("Y-m-d H:i:s"); $id_mem=$_POST['id_mem']; $t_id=$_POST['t_id']; $sqlpost= "insert into comment values('','$detail','$date','$id_mem','$t_id')"; if(mysql_query($sqlpost)){ echo "<script>alert('แสดงความคิดเห็นเสร็จสิ้นสมบูรณ์');window.location='index.php?home=detail_from&idtopic=$t_id';</script>"; }else{ echo "<script>alert('ไม่สามารถแสดงความคิดเห็นได้!!!');history.back();</script>"; } ?>
<? $idtopic=$_GET['idtopic']; $sql="select * from topic where t_id='".$idTopic."'"; $query=mysql_query($sql); $arr=mysql_fetch_array($query); $sqluser="select * from user where id_mem=$id_mem"; $queryuser=mysql_query($sqluser); $arruser=mysql_fetch_array($queryuser); ?> <title><?=$arr['title'];?></title> <tr> <td ><h1><font color="#FFCC00"><?=$arr['title'];?></font></h1></td> </tr> <tr> <td><h3><p><?=$arr['detail'];?></p></h3></td> </tr> <tr> <td> <font color="#FFCC66"><b><? if($arr['id_mem']==$arruser['id_mem']){ echo $arruser['username']; }?></b></font> - <?=dateTimeDiff($arr['date']);?></td> </tr> </table> <br> <? $sqlcom="select * from comment where t_id='".$idTopic."' order by c_id desc"; $querycom=mysql_query($sqlcom); while($arrcom=mysql_fetch_array($querycom)){ ?> <table width="100%" border="0" cellpadding="5" cellspacing="0" class="box"> <tr> <td colspan="2"></td> </tr> <tr> <td colspan="2"><p> <? echo $arrcom['detail']; ?></p></td> </tr> <tr> <td width="90%"> <font color="#FFCC00"><b><? if($arrcom['id_mem']==$arruser['id_mem']){ echo $arruser['username']; } ?></b></font> - <?=dateTimeDiff($arrcom['date']);?></td> <td align="right" valign="bottom"><table width="100%" border="0" align="right" cellpadding="1" cellspacing="0"> <tr> <td width="37%" align="right" valign="bottom"><img src="img/toggle-small-expand.png" width="16" height="16" border="0"></td> <td width="63%" align="left" valign="top"><a href="#">ตอบกลับ</a></td> </tr> </table></td> </tr> </table> <br> <? } ?>
https://www.thaicreate.com/php/forum/071001.html
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง