gbook.php 991 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. require("../class/connect.php");
  3. require("../class/db_sql.php");
  4. require("../class/q_functions.php");
  5. require("../data/dbcache/class.php");
  6. require LoadLang("pub/fun.php");
  7. require("../member/class/user.php");
  8. $link=db_connect();
  9. $empire=new mysqlquery();
  10. $userid=0;
  11. $username='';
  12. $spacestyle='';
  13. $search='';
  14. require('CheckUser.php');//验证用户
  15. //用户
  16. $search.="&userid=$userid";
  17. $start=0;
  18. $page=intval($_GET['page']);
  19. $page=RepPIntvar($page);
  20. $line=12;//每行显示
  21. $page_line=10;
  22. $offset=$page*$line;
  23. $totalquery="select count(*) as total from {$dbtbpre}enewsmembergbook where userid='$userid'";
  24. $num=$empire->gettotal($totalquery);
  25. $query="select gid,isprivate,uid,uname,ip,addtime,gbtext,retext from {$dbtbpre}enewsmembergbook where userid='$userid'";
  26. $query.=" order by gid desc limit $offset,$line";
  27. $sql=$empire->query($query);
  28. $returnpage=page1($num,$line,$page_line,$start,$page,$search);
  29. require('template/'.$spacestyle.'/gbook.temp.php');
  30. db_close();
  31. $empire=null;
  32. ?>