?
Path : /home/admin/domains/happytokorea.com/public_html/happyezystyle/ |
Current File : /home/admin/domains/happytokorea.com/public_html/happyezystyle/ShowThread.php |
<? include("header.php");?> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <!-- fwtable fwsrc="Untitled" fwbase="home.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" --> <tr> <td><img src="images/spacer.gif" width="423" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="16" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="225" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="315" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="21" height="1" border="0" alt=""></td> <td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <tr> <td colspan="5" bgcolor="#FFFFFF"><div align="center"> <table width="857" border="0" align="center" cellpadding="1" cellspacing="1"> <tr> <td width="671"> <?php $sql_1="select * from webboard where id = '$_GET[topicID]'"; $db_query=mysql_db_query($db,$sql_1); $result1=mysql_fetch_array($db_query); $idx=$result1[id]; $topic=$result1[topic]; $message=$result1[message]; $name=$result1[name]; $email=$result1[email]; $phone=$result1[phone]; $read1=$result1[read1]; $dateregist=$result1[dateregist]; $timeregist=$result1[timeregist]; ?> <strong><a href="index.php"><u>หน้าหลัก</u></a></strong> > <? echo "$topic"; ?></td> <td width="11"><img src="images/pencil.jpg" width="20" height="20"></td> <td width="165"><strong><a href="NewTopic.php">ตั้ง่หัวข้อใหม่</a></strong></td> </tr> <tr> <td colspan="3"><div align="center"> <table width="100%" border="2" cellpadding="2" cellspacing="0" bordercolor="#852A3B"> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td><? echo "<b>$topic</b>"; ?></td> </tr> <tr> <td> </td> </tr> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="4"> <tr> <td><? echo "$message"; ?></td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td><div align="right"><? echo "ผู้ตั้งกระทู้ <b>$name</b> วันที่ลงประกาศ $dateregist $timeregist จำนวนอ่าน : $read1"; ?></div></td> </tr> </table></td> </tr> </table> </div></td> </tr> <tr> <td colspan="3"><br> <? $numrep = 1; $sql = "select * From webboard_ans where idwb = '$_GET[topicID]' "; /* ตั้งค่า แสดงผลต่อหน้า $Per_Page */ $Per_Page = 2; if(!$Page) $Page=1; $Prev_Page = $Page-1; $Next_Page = $Page+1; $result1 = mysql_query($sql); $Page_start = ($Per_Page*$Page)-$Per_Page; $Num_Rows1 = mysql_num_rows($result1); if($Num_Rows1<=$Per_Page) $Num_Pages =1; else if(($Num_Rows % $Per_Page)==0) $Num_Pages =($Num_Rows1/$Per_Page) ; else $Num_Pages =($Num_Rows1/$Per_Page) +1; $Num_Pages = (int)$Num_Pages; if(($Page>$Num_Pages) || ($Page<0)) print "<center><b>จำนวน $Page มากกว่า $Num_Pages ยังไม่มีข้อความ<b></center>"; $sql .= " Where 1 Order by id Desc LIMIT $Page_start , $Per_Page"; //ส่วนแสดงผล $result = mysql_query($sql); While($row= mysql_fetch_array($result1)){ $idr = $row["id"]; $messager = $row["message"]; $namer = $row["name"]; $emailr = $row["email"]; $phoner = $row["phone"]; $dateregistr = $row["dateregist"]; $timeregistr = $row["timeregist"]; $bgcount=$bgcount+1; $bgmod=$bgcount%2; if($bgmod==0){ $bgcolor="#CCFFFF"; }else{ $bgcolor="#EDE9E9"; } ?> <table width="92%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#852A3B"> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td><strong>ความเห็นที่ #</strong> <? echo "$numrep"; ?></td> </tr> <tr> <td> </td> </tr> <tr> <td><? echo "$messager"; ?></td> </tr> <tr> <td> </td> </tr> <tr> <td><div align="right"><? echo "ผู้ตอบ <b>$namer</b> วันที่ตอบ $dateregistr $timeregistr"; ?></div></td> </tr> </table></td> </tr> </table> <br> <? $numrep = $numrep+1; } ?> </td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td colspan="3"><script language="JavaScript"> function checkpostrep() { var v1 = document.webForm.message.value; var v2 = document.webForm.name.value; var v3 = document.webForm.textcode.value; if ( v1.length==0) { alert("กรุณาระบุข้อความด้วยค่ะ"); document.webForm.message.focus(); return false; } else if ( v2.length==0) { alert("กรุณาระบุ ชื่อผู้ตั้งด้วยค่ะ"); document.webForm.name.focus(); return false; } else if ( v3.length==0) { alert("กรุณาระบุ Text Code ด้วยค่ะ"); document.webForm.textcode.focus(); return false; } else return true; } function chkEmail(){ if(document.webForm.email.value!=""){ if (document.webForm.email.value.match(/.+@.+\..+/) == null) { alert("กรุณากรอก E-Mail ให้ถูกต้อง"); document.webForm.email.focus(); } } } function check_number(ch){ var len, digit; if(ch == " "){ return false; len=0; }else{ len = ch.length; } for(var i=0 ; i<len ; i++) { digit = ch.charAt(i) if(digit >="0" && digit <="9"){ ; }else{ return false; } } return true; } function checkvalue() { if(!check_number(document.webForm.phone.value) || document.webForm.phone.value == "" ) { alert('กรุณากรอกหมายเลขโทรศัพท์เป็นตัวเลขเท่านั้นค่ะ'); document.webForm.phone.focus(); return false; } else{return true;} } </script> <table width="88%" border="0" align="center" cellpadding="1" cellspacing="1" class="taladcr"> <form method="post" action="Reply.php" name="webForm" onSubmit="return checkpostrep()" enctype="multipart/form-data"> <tr> <td colspan="2"><div align="center"></div></td> </tr> <tr> <td colspan="2" bgcolor="#003333"><strong> แ</strong></td> </tr> <tr> <td width="27%"><div align="right">ข้อความด</div></td> <td width="73%"> <textarea name="message" cols="65" rows="15" class="inputxx" id="textarea2"></textarea> <strong>*</strong> <input type=hidden name=id_wb value=<? echo "$idx"; ?>> </td> </tr> <tr> <td><div align="right">ชื่อผู้ตั้ง</div></td> <td> <input name="name" type=text class="inputxx" id="name" size="25"> <strong>*</strong> </td> </tr> <tr> <td><div align="right">Email </div></td> <td> <input name="email" type="text" id="email8" value="" size="30" / onblur="chkEmail()" class="inputxx"> </td> </tr> <tr> <td> </td> <td> <? require_once "token.php"; $code = randomToken(5); echo "<b>$code</b>"; ?> <input name="code" type="hidden" class="td3" id="code2" size="8" value=<? echo "$code"; ?>> <input name="textcode" type="text" class="inputxx" id="textcode2" size="8" maxlength="5"> <em>** กรุณากรอกรหัส ** </em><em><strong>*</strong></em></td> </tr> <tr> <td> </td> <td> <input name="submit" type="submit" class="submitxx" value="ส่งข้อความ"> </td> </tr> </form> </table> <script language="javascript1.2"> var config = new Object(); // create new config object config.width = "550px"; config.height = "500px"; config.bodyStyle = 'background-color: white; font-family: "Verdana"; font-size: x-small;'; config.debug = 0; // NOTE: You can remove any of these blocks and use the default config! config.toolbar = [ ['fontname'], ['fontsize'], ['fontstyle'], ['linebreak'], ['bold','italic','underline','separator'], // ['strikethrough','subscript','superscript','separator'], ['justifyleft','justifycenter','justifyright','separator'], ['OrderedList','UnOrderedList','Outdent','Indent','separator'], ['forecolor','backcolor','separator'], ['HorizontalRule','Createlink','InsertImage','htmlmode','separator'], ['about','help','popupeditor'], ]; config.fontnames = { "Arial": "arial, helvetica, sans-serif", "Tahoma": "Tahoma, courier, mono", "Georgia": "Georgia, Times New Roman, Times, Serif", "Tahoma": "Tahoma, Arial, Helvetica, sans-serif", "Times New Roman": "times new roman, times, serif", "Verdana": "Verdana, Arial, Helvetica, sans-serif", "impact": "impact", "WingDings": "WingDings" }; config.fontsizes = { "1 (12 pt)": "3", "2 (14 pt)": "4", "3 (18 pt)": "5", "4 (24 pt)": "6", "5 (36 pt)": "7" }; //config.stylesheet = "http://www.domain.com/sample.css"; config.fontstyles = [ // make sure classNames are defined in the page the content is being display as well in or they won't work! { name: "headline", className: "headline", classStyle: "font-family: arial black, arial; font-size: 28px; letter-spacing: -2px;" }, { name: "arial red", className: "headline2", classStyle: "font-family: arial black, arial; font-size: 12px; letter-spacing: -2px; color:red" }, { name: "verdana blue", className: "headline4", classStyle: "font-family: verdana; font-size: 18px; letter-spacing: -2px; color:blue" } // leave classStyle blank if it's defined in config.stylesheet (above), like this: // { name: "verdana blue", className: "headline4", classStyle: "" } ]; editor_generate('message',config); </script></td> </tr> </table> </div></td> <td><img src="images/spacer.gif" width="1" height="25" border="0" alt=""></td> </tr> </table><? include("footer.php");?> </body> </html>