index.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. require("../../class/connect.php");
  3. if(!defined('InEmpireCMS'))
  4. {
  5. exit();
  6. }
  7. eCheckCloseMods('member');//关闭模块
  8. $myuserid=(int)getcvar('mluserid');
  9. $r=array();
  10. $mhavelogin=0;
  11. if($myuserid)
  12. {
  13. include("../../class/db_sql.php");
  14. include("../../member/class/user.php");
  15. include("../../data/dbcache/MemberLevel.php");
  16. $link=db_connect();
  17. $empire=new mysqlquery();
  18. $mhavelogin=1;
  19. //数据
  20. $myusername=RepPostVar(getcvar('mlusername'));
  21. $myrnd=RepPostVar(getcvar('mlrnd'));
  22. $qcklgr=qCheckLoginAuthstr();
  23. if(!$qcklgr['islogin'])
  24. {
  25. EmptyEcmsCookie();
  26. $mhavelogin=0;
  27. }
  28. else
  29. {
  30. $r=$empire->fetch1("select ".eReturnSelectMemberF('userid,username,groupid,userfen,money,userdate,havemsg,checked')." from ".eReturnMemberTable()." where ".egetmf('userid')."='$myuserid' and ".egetmf('rnd')."='$myrnd' limit 1");
  31. if(empty($r[userid])||$r[checked]==0)
  32. {
  33. EmptyEcmsCookie();
  34. $mhavelogin=0;
  35. }
  36. }
  37. //会员等级
  38. if(empty($r[groupid]))
  39. {$groupid=eReturnMemberDefGroupid();}
  40. else
  41. {$groupid=$r[groupid];}
  42. $groupname=$level_r[$groupid]['groupname'];
  43. //点数
  44. $userfen=$r[userfen];
  45. //余额
  46. $money=$r[money];
  47. //天数
  48. $userdate=0;
  49. if($r[userdate])
  50. {
  51. $userdate=$r[userdate]-time();
  52. if($userdate<=0)
  53. {$userdate=0;}
  54. else
  55. {$userdate=round($userdate/(24*3600));}
  56. }
  57. //是否有短消息
  58. $havemsg="";
  59. if($r[havemsg])
  60. {
  61. $havemsg="<a href='".$public_r['newsurl']."e/member/msg/' target=_blank><font color=red>您有新消息</font></a>";
  62. }
  63. //$myusername=$r[username];
  64. }
  65. if($mhavelogin==1)
  66. {
  67. ?>
  68. <html>
  69. <head>
  70. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  71. <title>登陆</title>
  72. <LINK href="../../data/images/qcss.css" rel=stylesheet>
  73. </head>
  74. <body bgcolor="#ededed" topmargin="0">
  75. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  76. <tr>
  77. <td height="23" align="center">
  78. <div align="left">
  79. &raquo;&nbsp;<font color=red><b><?=$myusername?></b></font>&nbsp;&nbsp;<a href="../my/" target="_parent"><?=$groupname?></a>&nbsp;<?=$havemsg?>&nbsp;<a href="/e/space/?userid=<?=$myuserid?>" target=_blank>我的空间</a>&nbsp;&nbsp;<a href="../msg/" target=_blank>短信息</a>&nbsp;&nbsp;<a href="../fava/" target=_blank>收藏夹</a>&nbsp;&nbsp;<a href="../cp/" target="_parent">控制面板</a>&nbsp;&nbsp;<a href="../../member/doaction.php?enews=exit&prtype=9" onclick="return confirm('确认要退出?');">退出</a>
  80. </div>
  81. </td>
  82. </tr>
  83. </table>
  84. </body>
  85. </html>
  86. <?php
  87. db_close();
  88. $empire=null;
  89. }
  90. else
  91. {
  92. ?>
  93. <html>
  94. <head>
  95. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  96. <title>登陆</title>
  97. <LINK href="../../data/images/qcss.css" rel=stylesheet>
  98. </head>
  99. <body bgcolor="#ededed" topmargin="0">
  100. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  101. <form name=login method=post action="../../member/doaction.php">
  102. <input type=hidden name=enews value=login>
  103. <input type=hidden name=prtype value=1>
  104. <tr>
  105. <td height="23" align="center">
  106. <div align="left">
  107. 用户名:<input name="username" type="text" size="8">&nbsp;
  108. 密码:<input name="password" type="password" size="8">
  109. <select name="lifetime" id="lifetime">
  110. <option value="0">不保存</option>
  111. <option value="3600">一小时</option>
  112. <option value="86400">一天</option>
  113. <option value="2592000">一个月</option>
  114. <option value="315360000">永久</option>
  115. </select>&nbsp;
  116. <input type="submit" name="Submit" value="登陆">&nbsp;
  117. <input type="button" name="Submit2" value="注册" onclick="window.open('../register/');">
  118. </div>
  119. </td>
  120. </tr>
  121. </form>
  122. </table>
  123. </body>
  124. </html>
  125. <?php
  126. }
  127. ?>