<? session_start(); ob_start(); include('function/func.php'); include "config.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <title>Untitled Document</title> <link rel="stylesheet" href="styles.css" type="text/css" /> <SCRIPT language=javascript> function del(varUrl) { if (window.confirm("ยืนยันการลบข้อมูล ?") == true) window.open(varUrl,"_self"); } </SCRIPT> </head> <body> <table width="950" border="0" align="center"> <tr> <td colspan="3"><? include "head.php"; ?></td> </tr> <tr> <td width="184" valign="top" bgcolor="#66CCFF"><? include "menu_left.php"; ?> <p> </p></td> <td width="578" rowspan="2" valign="top"><table width="90%" border="0" align="center"> <tr> <td width="529" valign="top"><br> <div id="boxes_IIII"> <img src="img/webbaord.gif" width="511" height="56" /> <?php if($_SESSION['usernamep']!= '' or $_SESSION['usernames']!=''){?> <h3 align="left"> <a href="boardForm.php"><img src="img/post.png" width="108" height="31" /></a></h3> <?php }?> <table width="100%" border="0" cellpadding="2" cellspacing="2" bordercolor="#CC9900" bgcolor="#FFFFFF" class="borderDash"> <tr> <th colspan="2" bordercolor="#99FF66" bgcolor="#99FF00">หัวข้อ</th> <th align="center" bordercolor="#99FF66" bgcolor="#99FF00"><img src="img/view1.png" width="15" height="15" alt="จำนนวนคนอ่าน" /></th> <th align="center" bordercolor="#99FF66" bgcolor="#99FF00"><img src="img/reply.jpg" width="18" height="16" alt="จำนวนคนตอบ" /></th> </tr> <?php $start = $_GET['start']; if(!isset($start)){$start = 0;} $limit='10'; $limitp=$limit+$start+1; $sql_total="select * from board_topic"; $q_total=mssql_query($sql_total)or die(mssql_get_last_message()); $total=mssql_num_rows($q_total); //echo $sql_total; exit(); $sql_page="SELECT * FROM (SELECT ROW_NUMBER() OVER (order by pin desc, tid desc) AS rownum,* FROM board_topic ) AS e WHERE ((rownum >". $start." AND rownum <".$limitp."))"; $q_page=mssql_query($sql_page)or die(mssql_get_last_message()); $totalp=mssql_num_rows($q_page); //echo $sql_page."<br>". $sql_total; $result=mssql_query($sql_page) or die(mssql_get_last_message()); $i=5; while($record=mssql_fetch_array($result)) { $tid=$record[tid]; $topic=$record[topic]; $detail=$record[detail]; $owner=$record[owner]; $ttime=($record[ttime]); $views=$record[views]; $reply=$record[reply]; $pin=$record[pin]; if($i%2==0){$bgcolor='#EEFFDD';}else{$bgcolor='#FFFFFF';} if($record[pin]){$bico="<img src=img/boardmenu.png width=16 height=16/> ";}else{$bico="<img src=img/toppin.jpg width=16 height=16 />";} ?> <tr bgcolor='<?=$bgcolor?>'> <td width='6%' align="center"> <?=$bico?> </td> <td width='79%'><div align="left"><a href='boardView.php?tid=<?=$tid?>&topic=<?=$topic?>&v' title="<?=$topic?>" style=" font-weight:bold"><?=$topic?></a> </a> </div> <div> <div align="left"><span class="board_owner">เริ่มโดย : <?=$owner?> </span> <span class="board_time">เมื่อ <?=$ttime?> </span> <?php if($_SESSION['usernamep']!= ''){?> <a href="boardFormEdit.php?tid=<?=$tid?>&topic=<?=$topic?>" title="แก้ไข"><img src="img/bb_edit.png" alt="แก้ไข" width="16" height="16" border="0" /></a> <a onClick="del('boardDel.php?action=deltopic&tid=<?=$tid?>')" href="#"><img src="img/cross.png" width="16" height="16" border="0" /></a> <? if($pin==1) { ?> <a href="boardPin.php?action=pin&tid=<?=$tid?>" title="ปักหมุด"><img src="img/lock.png" width="16" height="16" alt="ปักหมุดกระทู้นี้" /></a> <? } ?> <? if($pin==0) { ?> <a href="boardPin.php?action=unpin&tid=<?=$tid?>" title="ถอนหมุด"><img src="img/unlock.png" width="24" height="24" alt="ถอนหมุดกระทู้นี้" /></a> <? } ?> <?php }?> </div> </div></td> <td width='8%' align="center"><? if($views=='') { echo "0"; } else { echo $views; } ?></td> <td width='7%' align="center" class="owner"><? if($reply=='') { echo "0"; }else{ echo $reply; } ?></td> </tr> <? $i++; } ?> </table> <div align="right"> <?php /* ตัวแบ่งหน้า */ echo" หน้า : "; $page = ceil($total/$limit); for($i=1;$i<=$page;$i++){ if($_GET['page']==$i){ echo " <a href='?start=".$limit*($i-1)."&page=$i'>[<B>$i</B>]</A> "; }else{ echo " <a href='?start=".$limit*($i-1)."&page=$i'>$i</A> "; } } ?> </div> </div></td> </tr> </table> </td> <td width="174" rowspan="2" valign="top" bgcolor="#66CCFF"><? include "menu_right.php"; ?></td> </tr> <tr> <td valign="top" bgcolor="#66CCFF"><div align="center"> <? include "listactive.php"; ?> </div></td> </tr> <tr> <td colspan="3" bgcolor="#6699FF"><? include "footer.php"; ?></td> </tr> </table> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง