<?php
/*************************************************************\
+-------------------------------------------------------------+
| 通灵佛教网在线烧香程序 System                                 |
| Copyright (c) 2003-2010 Alfred China                        |
| All rights reserved.                                        |
+-------------------------------------------------------------+
\*************************************************************/
require_once('../chk.php');
$temp_dir = "../template/netgou";
$temp_img = "../template/".$tplpath."/images";
$form_dir = "..";

$metawords = $netgou["meta_keywords"];
$metaintro = $netgou["meta_descr"];
$titlename = $netgou["web_name"];

$txturl = '';
$txtsou = "$sql_tbl[sx].sxstatus = 'Y'";

$sxname = addslashes($sxname);
$sxname && $txturl .= "&sxname=$sxname";
$sxname && $txtsou .= " AND $sql_tbl[sx].sxname = '$sxname'";

$myuid = intval($myuid);
$myuid && $txturl .= "&myuid=$myuid";
$myuid && $txtsou .= " AND $sql_tbl[sx].uid = '$myuid'";

$total_items = ng_query_first_cell("SELECT COUNT($sql_tbl[sx].sxid) FROM $sql_tbl[sx] WHERE $txtsou");

if ($total_items > 0) {
	
	$pageurl = "index.php?".$txturl;
	$objects_per_page = 10;
		
	$total_nav_pages = ceil($total_items/$objects_per_page);
	if($page > $total_nav_pages)
		$page = $total_nav_pages;
	$netgou["max_nav_pages"] = 10;
	include_once ng_dir."/include/navigation.php";

	$sx_lists = ng_query("SELECT $sql_tbl[sx].sxid, $sql_tbl[sx].sxname, $sql_tbl[sx].sxsex, $sql_tbl[sx].sxage, $sql_tbl[sx].sxaddress, $sql_tbl[sx].hxgd, $sql_tbl[sx].sxshijian, $sql_tbl[sx].sxfoimg, $sql_tbl[sx].sxgp FROM $sql_tbl[sx] WHERE $txtsou ORDER BY $sql_tbl[sx].sxid DESC LIMIT $first_page, $objects_per_page");
		
	$first_item = $first_page+1;
	$last_item =  min($first_page+$objects_per_page, $total_items);
}

$ng_obstart && function_exists('ob_gzhandler') ? ob_start('ob_gzhandler') : ob_start();
$ng_obstart ? $ng_gzip="Gzip enabled":$ng_gzip="Gzip disabled";
require_once PrintFuTemp('header');
require_once EchoTemp('sxlist');
require_once PrintFuTemp('footer');
$output=str_replace(array('<!--<!--<!---->','<!--<!---->','<!---->'),array('','',''),ob_get_contents());
ob_end_clean();
echo $output;
flush;
exit;
break;
?>