###################################################################################### ## ## Program : ## Description : ## Programmer : äªÂÃѵ¹ì Êع·ÃÇÔÀÒµ ## Email : webmaster@sixhead.net,sixheadz@hotmail.com ## Website : http://www.sixhead.net ## Date : ## Modify log : ## ###################################################################################### ##################################################################### #### start setup #### $template_list = "template_list-vdo.html"; #### end of setup #### ##################################################################### ##################################################################### #### start program #### require "config.php"; require "module.php"; ob_start(); global $tp; # áºè§Ë¹éÒ # if (!$p) { $p = 1; } @$db = mysql_connect($db_host,$db_user,$db_pass); mysql_select_db($config_db_name); if (!$db) { echo "Error connect to Database: " . mysql_error(); ob_end_flush(); exit; } $sql = "SELECT * FROM $config_table_main WHERE (MODE like '$mode')"; $result = mysql_query($sql); $record_all = mysql_num_rows($result); mysql_free_result($result); $x1 = $record_all % $config_list_per_page; $x2 = $record_all / $config_list_per_page; if ($x1 > 0) { $all_page = (int)($x2) + 1; } else { $all_page = $x2; } # �ӹdz�� record �������Ш��ͧ����˹�� if ($p == 1) { $start_loop = 0; } else { $p2 = $p - 1; $start_loop = $p2 * $config_list_per_page; } # /�ӹdz�� record �������Ш��ͧ����˹�� # /��˹�� # # �Ţ˹������Ѻ���ԧ�� # $url_mode = urlencode($mode); for ($i=1;$i<=$all_page;$i++) { $p_temp = $p + 1; $p_temp2 = $p - 1; if ($i == 1) { if ($i == $p) { $page_link .= "[ $i ] "; } else { $page_link .= "<< Prev [ $i ] "; } } elseif ($i == $all_page) { if ($i == $p) { $page_link .= "[ $i ] "; } else { $page_link .= "[ $i ] Next >>"; } } else { if ($i == $p) { $page_link .= "[ $i ] "; } else { $page_link .= "[ $i ] "; } } } # /�Ţ˹������Ѻ���ԧ�� # $sql = "SELECT * FROM $config_table_main WHERE (MODE like '$mode') ORDER BY ID DESC limit $start_loop,$config_list_per_page"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { if ($bgcolor == "#CCCCCC") { $bgcolor = "#F2FFF8"; } else { $bgcolor = "#CCCCCC"; } $tp[ID] = $row[ID]; $tp[TOPIC] = $row[TOPIC]; $tp[DATE_ADD] = $row[DATE_ADD]; $tp[DATA] .= "