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