?
Path : /home/admin/domains/happytokorea.com/public_html_bk/promice/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/promice/ShowThread.php |
<? include("header.php");?> <style type="text/css"> <!-- a:link { color: #666666; } a:visited { color: #666666; } a:hover { color: #666666; } a:active { color: #666666; } .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:12px; } .style2 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:9px; } body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; } a { font-family: Verdana, Arial, Helvetica, sans-serif; } --> </style> <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="698"> <?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]; $images=$result1[productsphoto]; $name=$result1[name]; $email=$result1[email]; $phone=$result1[phone]; $read1=$result1[read1]; $dateregist=$result1[dateregist]; $timeregist=$result1[timeregist]; ?> <strong><a href="Webboard.php"><span class="style1" style="color: #666666">게시판</span></a></strong> > <span class="style1" style="color: #666666"><? echo "$topic"; ?></span></td> <td width="152"><table width="223" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="16%" background="images/bg.jpg"><div align="center"><a href="Webboard.php"><img src="alltopic.jpg" alt="" width="49" height="31" border="0" /></a></div></td> <td width="27%" background="images/bg.jpg"><div align="center"><a href="NewTopic.php"><img src="newstopic.jpg" alt="" width="78" height="31" border="0" /></a></div></td> <td width="15%" background="images/bg.jpg"><a href="editwebboard.php?id=<? echo"$idx"; ?>"><img src="edit.jpg" width="48" height="29" border="0" /></a></td> <td width="42%" background="images/bg.jpg"><a href="DelWebboard.php?id=<? echo"$idx"; ?>"><img src="delete.jpg" width="48" height="30" border="0" /></a></td> </tr> </table></td> </tr> <tr> <td colspan="2"><div align="center"> <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF"> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td><span style="color: #666666"><? echo "<b>$topic</b>"; ?></span></td> </tr> <tr> <td> <? if ($images != "") { echo "<a href=IMG/$images ><img src='IMG/$images' WIDTH=400 BORDER=0> </a>"; }else{ echo ""; } ?> </td> </tr> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="4"> <tr> <td><span class="style2" style="color: #666666"><? echo "$message"; ?></span></td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td><div align="right"><span class="style2" style="color: #666666"><? echo "작성자<b>$name</b> At date $dateregist $timeregist Read : $read1"; ?></span></div></td> </tr> </table></td> </tr> </table> </div></td> </tr> <tr> <td colspan="2"><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>Number $Page more $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"]; $imagers = $row["photo1"]; $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="#FFFFFF"> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td><strong><span class="style1" style="color: #666666">Comment #</span></strong><span class="style1" style="color: #666666"> <? echo "$numrep"; ?></span></td> </tr> <tr> <td><? if ($imagers != "") { echo "<a href=IMG/$imagers ><img src='IMG/$imagers' WIDTH=400 BORDER=0> </a>"; }else{ echo ""; } ?> </td> </tr> <tr> <td><span class="style2" style="color: #666666"><? echo "$messager"; ?></span></td> </tr> <tr> <td> </td> </tr> <tr> <td><div align="right"><span class="style2" style="color: #666666"><? echo "Answer by <b>$namer</b> At date $dateregistr $timeregistr"; ?></span></div></td> </tr> </table></td> </tr> </table> <br> <? $numrep = $numrep+1; } ?> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><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) { } 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" bgcolor="#FFFFFF" 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 width="15%"><div align="right"><span class="style1" style="color: #666666">내용</span></div></td> <td width="85%"> <textarea name="message" cols="65" rows="15" id="message"></textarea> <strong>*</strong> <input type=hidden name=id_wb value=<? echo "$idx"; ?>> </td> </tr> <tr> <td><div align="right"><span class="style1" style="color: #666666">Image</span></div></td> <td><input name="productsphoto" type="file" class="input" id="productsphoto" size="40" /></td> </tr> <tr> <td><div align="right"><span class="style1" style="color: #666666">작성자 이름</span></div></td> <td> <input name="name" type=text class="inputxx" id="name" size="25"> <strong>*</strong> </td> </tr> <tr> <td><div align="right"><span class="style1" style="color: #666666">Email </span> </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><span class="style1" style="color: #666666">** 코드5자리를 입력하세요 **</span> </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>