CheckUser.php
1.95 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
<?php
if(!defined('InEmpireCMS'))
{
exit();
}
//統計訪問
function UpdateSpaceViewStats($userid){
global $empire,$dbtbpre;
if(!getcvar('dospacevstats'.$userid))
{
$sql=$empire->query("update {$dbtbpre}enewsmemberadd set viewstats=viewstats+1 where userid='".$userid."' limit 1");
esetcookie("dospacevstats".$userid,1,time()+3600);
}
}
//關閉
if($public_r['openspace']==1)
{
printerror('CloseMemberSpace','',1);
}
require_once ECMS_PATH.'e/space/spacefun.php';
//用戶是否存在
$userid=intval($_GET['userid']);
if($userid)
{
$add="userid=$userid";
$username='';
$utfusername='';
$uadd=egetmf('userid')."='$userid'";
}
else
{
$username=RepPostVar($_GET['username']);
if(empty($username))
{
printerror("NotUsername","",1);
}
$add="username='$username'";
$utfusername=$username;
$uadd=egetmf('username')."='$username'";
}
$ur=$empire->fetch1("select ".eReturnSelectMemberF('*')." from ".eReturnMemberTable()." where ".$uadd." limit 1");
if(empty($ur['username']))
{
printerror("NotUsername","",1);
}
$userid=$userid?$userid:$ur['userid'];
$utfusername=$utfusername?$utfusername:$ur['username'];
$username=$username?$username:$ur['username'];
$groupid=$ur['groupid'];
UpdateSpaceViewStats($userid);//統計訪問
$addur=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='".$userid."' limit 1");
//頭像
$userpic=$addur['userpic']?$addur['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';
//空間地址
$spaceurl=eReturnDomainSiteUrl()."e/space/?userid=".$userid;
//空間名稱
$spacename=$addur['spacename']?$addur['spacename']:$username." 的空間";
//空間模板
$spacestyleid=$addur['spacestyleid'];
if(empty($spacestyleid))
{
$spacestyleid=$public_r['defspacestyleid'];
}
$spacestyler=$empire->fetch1("select stylepath from {$dbtbpre}enewsspacestyle where styleid='$spacestyleid'");
$spacestyle=$spacestyler['stylepath']?$spacestyler['stylepath']:'default';
?>