// This page is php3.php
<?
Include "signup/mysql. inc ";
Switch ($ part ){
Case "1": $ table = "bbs_php"; break;
Case "2": $ table = "bbs_mysql"; break;
Case "3": $ table = "bbs_html"; break;
Case "4": $ table = "bbs_js ";
}
// Echo $ part;
?>
<Html>
<Head>
<Title> xiaoyang </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Script language = "JavaScript1.2" src = "js/menu_comment.js"> </script>
<Script language = "JavaScript1.2" src = "js/fw_menu.js"> </script>
<Script language = "JavaScript">
<! --
Function MM_reloadPage (init) {// reloads the window if Nav4 resized
If (init = true) with (navigator) {if (appName = "Netscape") & (parseInt (appVersion) = 4 )){
Document. MM_pgW = innerWidth; document. MM_pgH = innerHeight; onresize = MM_reloadPage ;}}
Else if (innerWidth! = Document. MM_pgW | innerHeight! = Document. MM_pgH) location. reload ();
}
MM_reloadPage (true );
// -->
</Script>
</Head>
<Body bgcolor = "# FFFFFF" text = "#000000">
<Div id = "Layer1" style = "position: absolute; left: 31px; top: 1px; width: 560px; height: 46px; z-index: 10">
<Script language = "JavaScript1.2"> fwLoadMenus (); </script> </div>
<Div id = "Layer2" style = "position: absolute; left: 27px; top: 41px; width: 600px; height: 15px; z-index: 2">
<Hr color = "# ff9999">
</Div>
<Div id = "Layer3" style = "position: absolute; left: 73px; top: 10px; width: 2px; height: 330px; z-index: 3; background-color: # ff9999; layer-background-color: # ff9999; border: 1px none #000000 "> </div>
<Div id = "Layer4" style = "position: absolute; left: 560px; top: 10px; width: 2px; height: 330px; z-index: 4; background-color: # ff9999; layer-background-color: # ff9999; border: 1px none #000000 "> </div>
<Div id = "Layer5" style = "position: absolute; left: 86px; top: 58px; width: 464px; height: 273px; z-index: 5">
<Table width = "100%" border = "0" cellspacing = "1" cellpadding = "0" height = "20">
<Tr>
& Lt; td width = "10%" & gt;
<Div align = "center"> <font color = "# CC33CC" size = "2"> popularity </font> </div>
</Td>
& Lt; td width = "38%" & gt;
<Div align = "center"> <font color = "# CC33CC" size = "2"> Article Title </font> </div>
</Td>
& Lt; td width = "26%" & gt;
<Div align = "center"> <font size = "2" color = "# CC33CC"> author </font> </div>
</Td>
& Lt; td width = "26%" & gt;
<Div align = "center"> <font color = "# CC33CC" size = "2"> date </font> </div>
</Td>
</Tr>
<?
$ SQL = "select * from". $ table. "order by row DESC ";
$ Result = mysql_query ($ SQL) or die (mysql_error ());
$ Row1 = mysql_num_rows ($ result );
$ Row_max_page = 12; // pagination Calculation
$ Page = ceil ($ row1/$ row_max_page );
$ Left_row = $ row1-$ p * $ row_max_page;
$ Pre_left_row = $ left_row + 12;
$ Start_row = $ left_row + $ row_max_page + 1;
If ($ left_row <= 0)
{
$ Start_row = $ pre_left_row + 1;
$ Left_row = 0;
}
$ SQL = "select * from". $ table. "where row <'$ start_row' and row> '$ left_row' order by row DESC ";
$ Result = mysql_query ($ SQL) or die (mysql_error ());
While ($ row = mysql_fetch_array ($ result )){
Static $ I = 0;
$ I ++;
If ($ I % 2)
$ Color = "CCCCFF ";
Else $ color = "FFCCFF ";
Echo "<tr> ";
Echo "<td width = 10% bgcolor = #". $ color. "> ";
Echo "<div align = center> <font size = 2 color = # 3333FF>". $ row ["number"]. "</font> </div> ";
Echo "</td> ";
Echo "<td width = 38% bgcolor = #". $ color. "> ";
Echo "<div align = center> <font size = 2 color = # 3333FF> <a href = 'Look. php? Id = ". $ row ["id"]. "& table = ". $ table. "'> ". $ row ["title"]. "</a> </font> </div> ";
Echo "</td> ";
Echo "<td width = 26% bgcolor = #". $ color. "> ";
Echo "<div align = center> <font size = 2 color = # 3333FF>". $ row ["userid"]. "</font> </div> ";
Echo "</td> ";
Echo "<td width = 26% bgcolor = #". $ color. "> ";
Echo "<div align = center> <font size = 2 color = # 3333FF>". $ row ["date1"]. "</font> </div> ";
Echo "</td> </tr> ";
}
Echo "</table> ";
Echo "<BR> <div align = center> <table> <tr> <td> <font size = 2> ";
For ($ I = 1; $ I <= $ page; $ I ++)
{
Echo "<a href = '". $ PHP_SELF ."? P = ". $ I." & table = ". $ table." '> [". $ I."] </a> ";
}
?>
</FONT> </td> </tr>
</Table> </div>
</Div>
<Div id = "Layer6" style = "position: absolute; left: 409px; top: 29px; width: 118px; height: 17px; z-index: 6 "> </div>
<Div id = "Layer7" style = "position: absolute; left: 451px; top: 28px; width: 65px; height: 12px; z-index: 8">
<A href = "say. php? Table = <? Echo $ table;?> "Target =" _ self "onMouseOver =" window. status = ''; return true"> <font size = "2" color = "# FF33FF"> I want to speak </font> </a> </div>
<P> </p>
<P> </p>
</Body>
</Html>