<? include "connect.php"; include "function.php"; $sql="select * from tb_question order by id_ques desc"; $result = mysql_db_query($dbname,$sql); mysql_query("SET NAMES TIS620") ; echo " <h3>Webboard ¡ÃзÙé ¶ÒÁ - µÍº </h3> <a href ='question_form.php' > µÑ駤ӶÒÁãËÁè</a><p> <table width='100%' border='1'> <tr bgcolor='#d2e9ff'> <td width='8%'><center><b><font size='2' face='ms sans serif'>ÃËÑÊ</font></b></center></td> <td width='61%'><center><b><font size='2' face='ms sans serif'>ËÑÇ¢éͤӶÒÁ</font></b></center></td> <td width='15%'><center><b><font size='2' face='ms sans serif'>¼ÙéµÑ駤ӶÒÁ</font></b></center></td> <td width='16%'><center><b><font size='2' face='ms sans serif'>µÑé§àÁ×èÍÇѹ·Õè</font></b></center></td> </tr> "; while ($record=mysql_fetch_array($result)) { $id_ques=$record [id_ques]; $title_ques=$record[title_ques]; $detail_ques=$record[detail_ques]; $name_ques=$record[name_ques]; $email_ques=$record[email_ques]; $date_ques=$record[date_ques]; $title_ques=htmlspecialchars ($title_ques); $name_ques=htmlspecialchars ($name_ques); $detail_ques=nl2br(htmlspecialchars ($detail_ques)); $date_ques =displaydate ($date_ques); echo " <tr bgcolor='#ffffff'> <td width='8%'><center><font size='2' face='ms sans serif'>#$id_ques</font></center></td> <td width='61%'><font size='2' face='ms sans serif'><a href ='answer_view.php?id_ques=$id_ques'>$title_ques</a></font></td> <td width='15%'><center><font size='2' face='ms sans serif'>$name_ques</font></center></td> <td width='16%'><center><font size='2' face='ms sans serif'>$date_ques</font></center></td> </tr>"; } //end while echo "</table>"; ?>
<? include "connect.php"; include "function.php"; $id_ques=$_GET[id_ques]; /////////////Êèǹ·Õè˹Öè§//////////////////// $sql="select * from tb_question where id_ques='$id_ques' "; $result=mysql_db_query($dbname,$sql); $record=mysql_fetch_array($result); $id_ques=$record[id_ques]; $title_ques=$record[title_ques]; $detail_ques=$record[detail_ques]; $name_ques=$record[name_ques]; $email_ques=$record[email_ques]; $date_ques=$record[date_ques]; $title_ques=htmlspecialchars ($title_ques); $detail_ques=nl2br(htmlspecialchars ($detail_ques)); $name_ques=htmlspecialchars ($name_ques); $email_ques=htmlspecialchars ($email_ques); $date_ques =displaydate ($date_ques); echo " <h2>$title_ques</h2> <table width='65%' border='1'> <tr> <td bgcolor='#d2e9ff'> <font size='2' face='MS Sans Serif'>$detail_ques <p><b>â´Â :</b> $name_ques <b>e-mail :</b> $email_ques <b>àÁ×èÍ :</b> $date_ques <a href='question_del.php?id_ques=$id_ques'> [ Delete ] </a></p></font></td> </tr> </table><BR>"; /////// Êèǹ·ÕèÊͧ ////////////////////////// $sql="select * from tb_answer where ref_id='$id_ques' order by id_ans"; $result=mysql_db_query($dbname,$sql); while($record=mysql_fetch_array($result)) { $id_ans=$record[id_ans]; $detail_ans=$record[detail_ans]; $name_ans=$record[name_ans]; $email_ans=$record[email_ans]; $date_ans=$record[date_ans]; $ref_id=$record[ref_id]; $detail_ans=nl2br(htmlspecialchars ($detail_ans)); $name_ans=htmlspecialchars ($name_ans); $email_ans=htmlspecialchars ($email_ans); $date_ans =displaydate ($date_ans); echo " <table width='65%' border='1'> <tr> <td bgcolor='#FFFFFF'><font size='2' face='MS Sans Serif'>$detail_ans</font></td> </tr> <tr> <td bgcolor='#d2e99f'><font size='2' face='MS Sans Serif'> <b>â´Â : </b> $name_ans <b>e-mail : </b> $email_ans <b> àÁ×èÍ : </b>$date_ans<a href='answer_del.php?&id_ques=$id_ques&id_ans=$id_ans'> [ Delete ] </a></font></td> </tr> </table><BR>"; }//end while mysql_close($c); ?> <h3> ÃèÇÁµÍº¤Ó¶ÒÁ </h3> <FORM METHOD=POST ACTION="answer_save.php"> <TABLE BGCOLOR="#d2e9ff" BORDER="0"> <TR> <TD>ÃÒÂÅÐàÍÕ´ : </TD> <TD><TEXTAREA NAME="detail_ans" ROWS="5" COLS="35"></TEXTAREA><font color="red"> *</font></TD> </TR> <TR> <TD>ª×èͼÙéµÍº: </TD> <TD><INPUT TYPE="text" NAME="name_ans"><font color="red"> * </font></TD> </TR> <TR> <TD>e-mail:</TD> <TD><INPUT TYPE="text" NAME="email_ans"><font color="red"> *</font></TD> </TR> </TABLE><BR> <INPUT TYPE="hidden" NAME="ref_id" VALUE="<? echo $id_ques;?>"> <INPUT TYPE="submit" VALUE="Submit"> <INPUT TYPE="reset" VALUE="Reset"> </FORM> รบกวนหน่อยนะคับ ขอบคุณล่วงหน้าคับ
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง