?
Path : /home/admin/domains/happytokorea.com/public_html_bk/promice/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/promice/Webboard.php |
<? include("header.php");?> <title><? echo "$headtxt_web"; ?></title> <!-- jQuery library (served from Google) --> <script type="text/JavaScript"> <!-- 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_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_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 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><body onLoad="MM_preloadImages('images/menu2_03.jpg','images/menu2_04.jpg','images/menu2_05.jpg','images/menu2_06.jpg','images/menu2_07.jpg','images/menu2_09.jpg','images/menu2_10.jpg','images/menu2_11.jpg','images/menu2_12.jpg','images/menu2_13.jpg','images/menu2_15.jpg','images/menu2_16.jpg')"><td colspan="5" bgcolor="#FFFFFF"><div align="center"> <table width="1024" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td width="117" align="left" valign="top"><table id="Table_01" width="180" height="329" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="images/menu1_01.jpg" width="180" height="39" alt="" /></td> </tr> <tr> <td><img src="images/menu1_02.jpg" width="180" height="22" alt="" /></td> </tr> <tr> <td><a href="ceo.php"><img src="images/menu1_03.jpg" alt="" width="180" height="19" border="0" id="Image1" onMouseOver="MM_swapImage('Image1','','images/menu2_03.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><a href="company.php"><img src="images/menu1_04.jpg" alt="" width="180" height="15" border="0" id="Image2" onMouseOver="MM_swapImage('Image2','','images/menu2_04.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><a href="subdiary.php"><img src="images/menu1_05.jpg" alt="" width="180" height="15" border="0" id="Image3" onMouseOver="MM_swapImage('Image3','','images/menu2_05.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><a href="organiz.php"><img src="images/menu1_06.jpg" alt="" width="180" height="15" border="0" id="Image4" onMouseOver="MM_swapImage('Image4','','images/menu2_06.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><a href="map.php"><img src="images/menu1_07.jpg" alt="" width="180" height="16" border="0" id="Image5" onMouseOver="MM_swapImage('Image5','','images/menu2_07.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><img src="images/menu1_08.jpg" width="180" height="29" alt="" /></td> </tr> <tr> <td><a href="mice1.php"><img src="images/menu1_09.jpg" alt="" width="180" height="16" border="0" id="Image6" onMouseOver="MM_swapImage('Image6','','images/menu2_09.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><a href="prpromo.php"><img src="images/menu1_10.jpg" alt="" width="180" height="15" border="0" id="Image7" onMouseOver="MM_swapImage('Image7','','images/menu2_10.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><a href="mice2.php"><img src="images/menu1_11.jpg" alt="" width="180" height="16" border="0" id="Image8" onMouseOver="MM_swapImage('Image8','','images/menu2_11.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><a href="event.php"><img src="images/menu1_12.jpg" alt="" width="180" height="14" border="0" id="Image9" onMouseOver="MM_swapImage('Image9','','images/menu2_12.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><a href="tran.php"><img src="images/menu1_13.jpg" alt="" width="180" height="19" border="0" id="Image10" onMouseOver="MM_swapImage('Image10','','images/menu2_13.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><img src="images/menu1_14.jpg" width="180" height="9" alt="" /></td> </tr> <tr> <td><a href="port.php"><img src="images/menu1_15.jpg" alt="" width="180" height="18" border="0" id="Image11" onMouseOver="MM_swapImage('Image11','','images/menu2_15.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><a href="Webboard.php"><img src="images/menu1_16.jpg" alt="" width="180" height="22" border="0" id="Image12" onMouseOver="MM_swapImage('Image12','','images/menu2_16.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a></td> </tr> <tr> <td><img src="images/menu1_17.jpg" width="180" height="30" alt="" /></td> </tr> </table></td> <td width="907" align="left" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><img src="images/ba_01.jpg" width="127" height="25" alt=""></td> </tr> <tr> <td><table width="99%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><table width="100%" border="0" cellspacing="4" cellpadding="4"> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><div align="right"> <table width="17%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="38%" 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="62%" 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> </tr> </table> </div></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td bgcolor="#FFFFFF"><img src="webmenu.jpg" width="726" height="27"></td> </tr> </table> <? $select_type_ans ="select * from webboard_ans where idwb = '$id'"; $query_select2=mysql_query($select_type_ans); $num_rows_ans=mysql_num_rows($query_select2); if ($num_rows_ans >= 15) { $img_icon = "hot.gif"; }else{ $img_icon = "icon_board_default.gif"; } $page = $_GET['page']; $select_type="select * from webboard order by id desc"; $query_select=mysql_query($select_type); $num_rows=mysql_num_rows($query_select); if($num_rows<1){ echo "<br><br><center><b>ไม่พบข้อมูลใด ๆ ในฐานข้อมูลค่ะ</b></center>"; }else{ $select="select * from webboard order by id desc"; $q_ry = mysql_query($select); $num_rows=mysql_num_rows($q_ry); $pagesize=25; $rt=$num_rows%$pagesize; if($rt!=0) { $totalpage=floor($num_rows/$pagesize)+1; } else { $totalpage=floor($num_rows/$pagesize); $toppic_id=1; } if(empty($page)) { $page=1; } mysql_free_result($q_ry); $goto=($page-1)*$pagesize; $sql_select_mem="Select * From webboard order by id desc limit $goto,$pagesize"; $fect=mysql_query($sql_select_mem); if(!$fect) { ("ติดต่อฐานข้อมูลไม่ได้".mysql_error()); exit; } $bgcount=0; while($rows=mysql_fetch_array($fect)) { $id =$rows['id']; $topic =$rows['topic']; $name =$rows['name']; $images =$rows['productsphoto']; $read1 =$rows['read1']; $dateregist =$rows['dateregist']; $update_time = time(); $nameshow = substr($name,0,20); $bgcount=$bgcount+1; $bgmod=$bgcount%2; if($bgmod==0){ $bgcolor="#ffffff"; }else{ $bgcolor="#ffffff"; } $select_type_ans ="select * from webboard_ans where idwb = '$id'"; $query_select2=mysql_query($select_type_ans); $num_rows_ans=mysql_num_rows($query_select2); if ($num_rows_ans >= 15) { $img_icon = "<img src=images/hot01.gif width=31 height=31>"; }else{ $img_icon = ""; } ?> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td width="60"> <div align="center" style="color: #666666"> <img src="images/icon_board_default.gif" width="16" height="16"></div></td> <td width="394"><span class="style1" style="color: #666666"><a href=ShowThread.php?topicID=<? echo "$id"; ?>><? echo substr($topic,0,45)."..";?></a><? if ($images != "") { echo "<img src='cam.png' WIDTH=15 BORDER=0>"; }else{ echo ""; } ?></span></td> <td width="103"> <span class="style1" style="color: #666666"><? echo "$nameshow"; ?></span></td> <td width="106"><span class="style1" style="color: #666666"><? echo "$dateregist"; ?></span></td> <td width="127"> <span class="style1" style="color: #666666"><? echo "$read1"; ?> / <? $select_type1 ="select * from webboard_ans where idwb = '$id'"; $query_select1=mysql_query($select_type1); $num_rows_cs=mysql_num_rows($query_select1); echo "<u>$num_rows_cs</u>"; ?> </span></td> </tr> <tr> <td colspan="5"><div align="center"><img src="line.jpg" width="760" height="1"></div></td> </tr> </table></td> </tr> <tr> <td> <? } } ?> <br> </td> </tr> </table> <br> <strong><span class="style2" style="color: #666666">Page :</span></strong> <span class="style2" style="color: #666666"> <? for($i=1;$i<$page;$i++) { echo"[<a href='$PHP_SELF?page=$i'>$i</a>]"; } echo"[<b>$page</b>]"; for($i=$page+1;$i<=$totalpage;$i++) { echo"[<a href='$PHP_SELF?page=$i'>$i</a>]"; } ?> </span></td> </tr> </table> <p> </p></td> </tr> </table> <strong></strong></td> </tr> </table></td> </tr> </table> </td> </tr> </table> </div></td><? include("footer.php");?> </body> </html>