<?php
require("../class/connect.php");
include("../class/config.php");
include("../class/db_sql.php");
include("../class/q_functions.php");
include("../class/class.php");
include LoadLang("pub/fun.php");
include("../class/user.php");
$link=db_connect();
$empire=new mysqlquery();
$search='';
include('CheckUser.php');//验证用户
//用户
$search.="&userid=$userid";
$start=intval($_GET['start']);
$page=intval($_GET['page']);
$line=12;//每行显示
$page_line=12;
$offset=$start+$page*$line;
$totalquery="select count(*) as total from {$dbtbpre}enewsmembergbook where userid='$userid'";
$num=$empire->gettotal($totalquery);
$query="select gid,isprivate,uid,uname,ip,addtime,gbtext,retext from {$dbtbpre}enewsmembergbook where userid='$userid'";
$query.=" order by gid desc limit $offset,$line";
$sql=$empire->query($query);
$returnpage=page1($num,$line,$page_line,$start,$page,$search);
include('template/'.$spacestyle.'/gbook.temp.php');
db_close();
$empire=null;
?>