<?php
require("../class/connect.php");
require("../class/db_sql.php");
require("../class/q_functions.php");
require("../data/dbcache/class.php");
require LoadLang("pub/fun.php");
require("../member/class/user.php");
require("../data/dbcache/MemberLevel.php");
$link=db_connect();
$empire=new mysqlquery();
$dopost=$_GET[dopost];
if($dopost=='randuser'){
	$rand=$empire->fetch1("select userid from {$dbtbpre}enewsmember order by rand() limit 1");
	Header("Location:/e/space/?userid=".$rand[userid]);
	exit();
}
$userid=0;
$username='';
$spacestyle='';
require('CheckUser.php');//验证用户
//首页文章
$add="userid='$userid'";
$start=0;
$page=intval($_GET['page']);
$page=RepPIntvar($page);
$line=10;//每行显示
$search.="&userid=$userid";
$page_line=5;
$offset=$page*$line;
$query="select ".ReturnSqlListF($mid)." from {$dbtbpre}ecms_news where ".$yhadd.$add." and ismember=1";
$totalquery="select count(*) as total from {$dbtbpre}ecms_news where ".$yhadd.$add." and ismember=1";
//$totalnum=intval($_GET['totalnum']);
$num=$empire->gettotal($totalquery);

$query.=" order by newstime desc limit $offset,$line";
$sql=$empire->query($query);
$returnpage=page1($num,$line,$page_line,$start,$page,$search);

require('template/'.$spacestyle.'/index.temp.php');
db_close();
$empire=null;
?>