include("../include/mysql_func.php");
include("../include/comm_func.php");
include("../include/constants.php");
?>
//print_r($_POST);
//phpinfo();
$title = "newstarnet index page";
$conn = connect_database($NEWS_DB);
$settings = get_query_row($conn, "select * from layout_setting" );
$col_per_row = 5;
$table_name = "news_special_topics";
$yellow_page_category_1_list = get_query_list($conn, "select * from yellow_page_category where level=1 order by display_order, id");
$yellow_page_category_2_list = get_query_list($conn, "select * from yellow_page_category where level=2 order by father_id, display_order, id");
/*
if( !empty($_REQUEST[id]) ) $id = $_REQUEST[id];
if( !empty($_POST[id]) ) $id = $_POST[id];
if( empty($id) ) $id = 0;
*/
/****************************************
* handle page number & size *
****************************************/
/*
$where = " where news_special_topic_id=$id and news_art_status=4 ";
$total_page = 0;
if( !empty($_POST["page_size"]) ) $page_size = $_POST["page_size"];
if( ($_POST["action"]=="pagesize") && !empty($_POST["p_size"]) ) $page_size = $_POST["p_size"];
$total_rows = get_a_value($conn, "select count(*) from $NEWS_ARTICLES_TABLE $where");
if( $page_size > $total_rows ) $page_size = $total_rows;
if( empty($page_size) || ($page_size < 1) ) $page_size = $ARTICLES_PER_PAGE;
if( empty($current_page) ) $current_page = 1;
if($_POST["action"]=="lastpage") $current_page--;
if($_POST["action"]=="nextpage") $current_page++;
if($_POST["action"]=="gopage") $current_page = $_POST["gopage"];
$total_page = ($total_rows - $total_rows % $page_size) / $page_size;
if($total_rows % $page_size > 0) $total_page++;
if(sizeof($news_list) % $page_size) $total_page++;
if($current_page < 1) $current_page = 1;
if($current_page > $total_page) $current_page = $total_page;
$submit_to = "news_special_topic.php";
$page_contral_bgcolor="#f4f7fb";
$start_row = ($current_page - 1) * $page_size;
if( !empty($id) )
{
$sql = "select * from $NEWS_ARTICLES_TABLE $where" .
" order by news_art_post_time desc " . " LIMIT $start_row, $page_size";
$news_list = get_query_list($conn, $sql);
$column = get_query_row($conn, "select * from $table_name where news_cat_id=" . $id);
$column[news_cat_title] = "-->" . $column[news_cat_title];
}
*/
?>
include("../web/header.php"); ?>
include("../web/ad.php"); ?>
|
include("../web/menu.php"); ?>
// include("../web/ad.php"); ?>
include("../web/footer.php"); ?>