index.php 959 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. require("../../class/connect.php");
  3. require("../../class/q_functions.php");
  4. require("../../class/db_sql.php");
  5. require("../class/user.php");
  6. require "../".LoadLang("pub/fun.php");
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. $editor=1;
  10. eCheckCloseMods('member');//关闭模块
  11. $user=islogin();
  12. $start=0;
  13. $page=(int)$_GET['page'];
  14. $page=RepPIntvar($page);
  15. $add='';
  16. $search='';
  17. $line=20;//每行显示
  18. $page_line=10;
  19. $offset=$page*$line;
  20. $totalquery="select count(*) as total from {$dbtbpre}enewsqmsg where to_username='$user[username]'";
  21. $query="select mid,title,haveread,from_userid,from_username,isadmin,msgtime,issys from {$dbtbpre}enewsqmsg where to_username='$user[username]'";
  22. $num=$empire->gettotal($totalquery);
  23. $query.=" order by mid desc limit $offset,$line";
  24. $sql=$empire->query($query);
  25. $returnpage=page1($num,$line,$page_line,$start,$page,$search);
  26. //导入模板
  27. require(ECMS_PATH.'e/template/member/msg.php');
  28. db_close();
  29. $empire=null;
  30. ?>