?
Path : /home/admin/domains/happytokorea.com/public_html_bk/wordpress/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/wordpress/ShowThread.php |
<? @session_start(); ob_start(); $usermem = $_SESSION["usermem"]; require_once "include/connectdb.php"; require_once "include/connect.php"; require_once "include/tdate.php"; if(empty($usermem)) { $showmember = " <table width=100% border=0 align=center cellpadding=1 cellspacing=1> <form method=post action=SignIn.php><tr> <td width=32% align=right>ชื่อสมาชิก :</td> <td width=68%><input name=usermem type=text size=15></td> </tr> <tr> <td align=right>รหัสผ่าน :</td> <td><input name=passmem type=password size=15></td> </tr> <tr> <td> </td> <td><input name=submit type=submit class=submit value=เข้าสู่ระบบ!></td> </tr> <tr> <td> </td> <td>! <a href=ForgetPass.php>ลืมรหัสผ่าน</a></td> </tr></form> </table> "; }else{ $sql="select * from member where usermem='$usermem'"; $db_query=mysql_db_query($db,$sql); $result=mysql_fetch_array($db_query); $idxx=$result[id]; $usename=$result[name]; $user_mem=$result[usermem]; $pass_mem=$result[passmem]; $showmember = " <div align=center><img src=images/user.gif width=25 height=15>ยินดีต้อนรับ :$usename <br>[ <a href=CheckMyOrder.php>ประวัติสั่งซื้อสินค้า</a> ] <br>[ <a href=ChangePass.php>เปลี่ยนรหัสผ่าน</a> ] <br>[ <a href=Profiles.php>ข้อมูลส่วนตัว</a> ] <br>[<a href=Logout.php>ออกจากระบบ</a>] </div> "; $myorder = "<a href=CheckMyOrder.php><img src=images/myorder.gif border=0><a>"; } $sql="update webboard set `read1`=`read1`+1 where id=$_GET[topicID]"; $db_query=mysql_db_query($db,$sql) ?> <html> <head> <title><? echo "$headtxt_web"; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="css/instyle.css" rel="stylesheet" type="text/css"> <link href="css/style1.css" rel="stylesheet" type="text/css"> <link href="css/style.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <script src="css/jquery-latest.pack.js" type="text/javascript"></script> <script src="css/jquery.lightbox.js" type="text/javascript"></script> <script> $(document).ready(function(){ $(".lightbox").lightbox(); }); </script> <LINK href="css/contentslider2.css" type=text/css rel=stylesheet> <STYLE type=text/css>BODY { MARGIN-TOP: 0px; MARGIN-LEFT: 0px } </STYLE> <SCRIPT src="js/contentslider.js" type=text/javascript> </SCRIPT> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <style> .jc{ position:relative; } </style> <script language="JavaScript1.2"> var ns6=document.getElementById&&!document.all var ie=document.all var customcollect=new Array() var i=0 function jiggleit(num){ if ((!document.all&&!document.getElementById)) return; customcollect[num].style.left=(parseInt(customcollect[num].style.left)==-1)? customcollect[num].style.left=1 : customcollect[num].style.left=-1 } function init(){ if (ie){ while (eval("document.all.jiggle"+i)!=null){ customcollect[i]= eval("document.all.jiggle"+i) i++ } } else if (ns6){ while (document.getElementById("jiggle"+i)!=null){ customcollect[i]= document.getElementById("jiggle"+i) i++ } } if (customcollect.length==1) setInterval("jiggleit(0)",80) else if (customcollect.length>1) for (y=0;y<customcollect.length;y++){ var tempvariable='setInterval("jiggleit('+y+')",'+'100)' eval(tempvariable) } } window.onload=init </script> </head> <body> <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="http://www.thebridgesmagazine.com/Webboard.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">กรุณาใส่ให้ครบตามที่เครื่องหมาย <strong>*</strong> ระบุ</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>** ใส่อักษร 5 ตัวที่ท่านเห็น ** </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> <map name="home_r3_c1Map"> <area shape="rect" coords="13,20,79,50" href="index.php"> <area shape="rect" coords="99,20,193,52" href="Member.php"> <area shape="rect" coords="204,19,301,51" href="Products.php"> <area shape="rect" coords="326,17,425,51" href="Cart.php"> </map> <map name="home_r3_c3Map"> <area shape="rect" coords="15,16,109,52" href="Payment.php"> <area shape="rect" coords="125,16,237,53" href="ConfirmPayment.php"> <area shape="rect" coords="257,16,373,53" href="CheckRef.php"> <area shape="rect" coords="383,14,458,55" href="Webboard.php"> <area shape="rect" coords="472,13,547,51" href="Contact.php"> </map> <map name="home_r5_c1Map"> <area shape="rect" coords="10,5,84,33" href="index.php"> <area shape="rect" coords="98,2,189,49" href="Member.php"> <area shape="rect" coords="208,2,303,42" href="Products.php"> <area shape="rect" coords="324,2,423,44" href="Cart.php"> </map> <map name="home_r5_c3Map"> <area shape="rect" coords="12,-2,100,36" href="Payment.php"> <area shape="rect" coords="127,-6,235,36" href="ConfirmPayment.php"> <area shape="rect" coords="383,-1,453,37" href="Webboard.php"> <area shape="rect" coords="477,-12,546,37" href="Contact.php"> <area shape="rect" coords="256,1,365,57" href="CheckRef.php"> </map> </body> </html>