index.php 1.0 KB

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