global $MOD, $TYPE, $pages, $page, $pagesize, $offset;
$r = $db->query("select count(title) as num from (
select * from (SELECT
title,
introduce,
linkurl,
addtime
FROM
".$DT_PRE."article_24
WHERE
STATUS = 3) as a
union
select * from (SELECT
title,
introduce,
linkurl,
addtime
FROM
".$DT_PRE."article_21
WHERE
STATUS = 3) as b
union
select * from (SELECT
title,
introduce,
linkurl,
addtime
FROM
".$DT_PRE."article_23
WHERE
STATUS = 3) as c
union
select * from (select
title,
introduce,
linkurl,
addtime
FROM
".$DT_PRE."article_26
where
STATUS = 3) as d
union
select * from (select
title,
introduce,
linkurl,
addtime
FROM
".$DT_PRE."article_29
where
STATUS = 3) as e
UNION
select * from (SELECT
title,content,linkurl,addtime from
".$DT_PRE."announce) as f
) as g;
");
//$pages = pages($r['num'], $page, $pagesize);
//读取并显示查询的数据总数,做分页使用
$total = mysql_fetch_array($r);
$pages = pages($total[num], $page, $pagesize);
//$k = mysql_num_rows($r);
//echo $r;
//exit;
?>