index.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. require("../../class/connect.php");
  3. require("../../class/db_sql.php");
  4. require("../../class/q_functions.php");
  5. require("../class/user.php");
  6. require("../../data/dbcache/MemberLevel.php");
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. $editor=1;
  10. eCheckCloseMods('member');//关闭模块
  11. //是否登陆
  12. $user=islogin();
  13. $r=ReturnUserInfo($user[userid]);
  14. $addr=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='".$user[userid]."' limit 1");
  15. //头像
  16. $userpic=$addr['userpic']?$addr['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';
  17. //有效期
  18. $userdate=0;
  19. if($r[userdate])
  20. {
  21. $userdate=$r[userdate]-time();
  22. if($userdate<=0)
  23. {
  24. $userdate=0;
  25. }
  26. else
  27. {
  28. $userdate=round($userdate/(24*3600));
  29. }
  30. }
  31. //是否有短消息
  32. $havemsg="无";
  33. if($user[havemsg])
  34. {
  35. $havemsg="<a href='".$public_r['newsurl']."e/member/msg' target=_blank><font color=red>您有新消息</font></a>";
  36. }
  37. //注册时间
  38. $registertime=eReturnMemberRegtime($r['registertime'],"Y-m-d H:i:s");
  39. //导入模板
  40. require(ECMS_PATH.'e/template/member/cp.php');
  41. db_close();
  42. $empire=null;
  43. ?>