index.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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('../class/favfun.php');
  7. require("../../data/dbcache/class.php");
  8. require "../".LoadLang("pub/fun.php");
  9. $link=db_connect();
  10. $empire=new mysqlquery();
  11. $editor=1;
  12. eCheckCloseMods('member');//关闭模块
  13. $user=islogin();
  14. $line=25;
  15. $page_line=10;
  16. $start=0;
  17. $page=(int)$_GET['page'];
  18. $page=RepPIntvar($page);
  19. $cid=(int)$_GET['cid'];
  20. $a="";
  21. if($cid)
  22. {
  23. $a=" and cid='$cid'";
  24. $search="&cid=$cid";
  25. }
  26. $offset=$page*$line;
  27. $totalquery="select count(*) as total from {$dbtbpre}enewsfava where userid='$user[userid]'".$a;
  28. $num=$empire->gettotal($totalquery);
  29. $query="select favaid,favatime,id,classid from {$dbtbpre}enewsfava where userid='$user[userid]'".$a;
  30. $query.=" order by favaid desc limit $offset,$line";
  31. $sql=$empire->query($query);
  32. $returnpage=page1($num,$line,$page_line,$start,$page,$search);
  33. //返回分类
  34. $select=ReturnFavaClass($user[userid],$cid);
  35. //导入模板
  36. require(ECMS_PATH.'e/template/member/fava.php');
  37. db_close();
  38. $empire=null;
  39. ?>