admin.php
1.21 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
<?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=(int)$lur['groupid'];
$loginadminstyleid=(int)$lur['adminstyleid'];
//ehash
$ecms_hashur=hReturnEcmsHashStrAll();
$r=ReturnLeftLevel($loginlevel);
//模板組
$gid=(int)$_GET['gid'];
if(!$gid)
{
if($ecms_config['sets']['deftempid'])
{
$gid=$ecms_config['sets']['deftempid'];
}
elseif($public_r['deftempid'])
{
$gid=$public_r['deftempid'];
}
else
{
$gid=1;
}
}
$tempgroup="";
$tgname="";
$tgsql=$empire->query("select gid,gname,isdefault from {$dbtbpre}enewstempgroup order by gid");
while($tgr=$empire->fetch($tgsql))
{
$tgselect="";
if($tgr['gid']==$gid)
{
$tgname=$tgr['gname'];
$tgselect=" selected";
}
$tempgroup.="<option value='".$tgr['gid']."'".$tgselect.">".$tgr['gname']."</option>";
}
if(empty($tgname))
{
printerror("ErrorUrl","");
}
require("../adminstyle/".$loginadminstyleid."/AdminTemp.php");
db_close();
$empire=null;
?>