// 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;
?>
Xiaoyang
<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 Question </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 "";
echo "";
echo "
". $ row ["Number"]. "
";
echo "";
echo "";
echo "
";
echo " ";
echo "";
echo "
". $ row ["userid"]. "
";
echo "";
echo "";
echo "
". $ row ["date1"]. "
";
echo " ";
}
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>