MemberConnect.php
4.23 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
define('EmpireCMSAdmin','1');
require("../../class/connect.php");
require("../../class/db_sql.php");
require("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;
//驗證用戶
$lur=is_login();
$logininid=$lur['userid'];
$loginin=$lur['username'];
$loginrnd=$lur['rnd'];
$loginlevel=$lur['groupid'];
$loginadminstyleid=$lur['adminstyleid'];
//ehash
$ecms_hashur=hReturnEcmsHashStrAll();
//驗證權限
CheckLevel($logininid,$loginin,$classid,"memberconnect");
//設置接口
function EditMemberConnect($add,$userid,$username){
global $empire,$dbtbpre;
$add[id]=(int)$add[id];
if(empty($add[appname])||!$add[id])
{
printerror("EmptyMemberConnect","history.go(-1)");
}
$add[isclose]=(int)$add[isclose];
$add[myorder]=(int)$add[myorder];
$add[appname]=eaddslashes(ehtmlspecialchars($add[appname]));
$add[appid]=eaddslashes($add[appid]);
$add[appkey]=eaddslashes($add[appkey]);
$add[qappname]=eaddslashes($add[qappname]);
$add[appsay]=eaddslashes($add[appsay]);
$sql=$empire->query("update {$dbtbpre}enewsmember_connect_app set appname='$add[appname]',appid='$add[appid]',appkey='$add[appkey]',isclose='$add[isclose]',myorder='$add[myorder]',qappname='$add[qappname]',appsay='$add[appsay]' where id='$add[id]'");
$appr=$empire->fetch1("select apptype from {$dbtbpre}enewsmember_connect_app where id='$add[id]'");
if($sql)
{
GetConfig();
//操作日誌
insert_dolog("id=".$add[id]."&apptype=".$appr[apptype]."<br>appname=".$add[appname]);
printerror("EditMemberConnectSuccess","MemberConnect.php".hReturnEcmsHashStrHref2(1));
}
else
{
printerror("DbError","history.go(-1)");
}
}
$enews=$_POST['enews'];
if(empty($enews))
{$enews=$_GET['enews'];}
if($enews)
{
hCheckEcmsRHash();
}
//增加用戶
if($enews=="EditMemberConnect")
{
EditMemberConnect($_POST,$logininid,$loginin);
}
$sql=$empire->query("select * from {$dbtbpre}enewsmember_connect_app order by myorder,id");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>外部登錄接口</title>
<link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td width="50%">位置:外部接口 > <a href="MemberConnect.php<?=$ecms_hashur['whehref']?>">管理外部登錄接口</a> </td>
<td><div align="right" class="emenubutton"></div></td>
</tr>
</table>
<br>
<table width="800" border="0" cellpadding="3" cellspacing="1" class="tableborder">
<tr class="header">
<td width="7%"><div align="center">ID</div></td>
<td width="32%"><div align="center">接口名稱</div></td>
<td width="10%"><div align="center">狀態</div></td>
<td width="17%" height="25"><div align="center">接口類型</div></td>
<td width="10%"><div align="center">綁定人數</div></td>
<td width="10%"><div align="center">登錄次數</div></td>
<td width="14%" height="25"><div align="center">操作</div></td>
</tr>
<?php
while($r=$empire->fetch($sql))
{
$membernum=$empire->gettotal("select count(*) as total from {$dbtbpre}enewsmember_connect where apptype='$r[apptype]' limit 1");
$loginnum=$empire->gettotal("select sum(loginnum) as total from {$dbtbpre}enewsmember_connect where apptype='$r[apptype]' limit 1");
?>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'">
<td align="center"><?=$r['id']?></td>
<td height="38" align="center">
<?=$r['appname']?> </td>
<td><div align="center">
<?=$r['isclose']==0?'開啟':'關閉'?>
</div></td>
<td height="38"> <div align="center">
<?=$r['apptype']?>
</div></td>
<td><div align="center"><?=$membernum?></div></td>
<td><div align="center"><?=intval($loginnum)?></div></td>
<td height="38"> <div align="center"><a href="SetMemberConnect.php?enews=EditMemberConnect&id=<?=$r['id']?><?=$ecms_hashur['ehref']?>">配置接口</a></div></td>
</tr>
<?php
}
db_close();
$empire=null;
?>
</table>
</body>
</html>