📄 0-3.php
字号:
<?php
include"../cache/config.inc.php";
include"begin.php";
adminlogin();
if ($usergroupid != 1) echoerror(2);
if (isset($_GET["post"])) {
$admina = $_POST['admin'];
$admin_new = array();
$admin_user = array();
while (list ($key, $val) = @each($admina)) {
$tempa = explode(",", trim($val));
while (list (, $val2) = @each($tempa)) {
if (trim($val2)) {
if (in_array($val2, $admin_user)) echoerror(21);
$result = mysql_query("select * from {$db_prefix}members where username='$val2'", $myconn);
if ($row = mysql_fetch_array($result)) {
$admin_new[$key][] = $val2;
$admin_user[] = $val2;
} else {
echoerror(20);
}
}
}
}
@mysql_query("update {$db_prefix}members set admin='0'", $myconn);
while (list ($key, $val) = @each($admin_new)) {
while (list (, $val2) = @each($val)) {
@mysql_query("update {$db_prefix}members set admin='$key' where username='$val2'", $myconn);
}
}
$reurl = "0-3.php";
echoioy(0);
}
if (isset($_GET["add"])) {
$adminlt = array();
$adminl = $_POST['adminl'];
$tempa = explode(",", trim($adminl));
while (list ($key, $val) = @each($tempa)) {
if (trim($val) != '') {
if (strlen($val) > 15) echoerror(22);
$adminlt[] = $val;
}
}
mysql_query("delete from {$db_prefix}groupuser where groupid='2'", $myconn);
$adminlt = array_unique($adminlt);
while (list (, $val) = @each($adminlt)) {
if ($username != $val) mysql_query("insert into {$db_prefix}groupuser(username,groupid,password) values('$val','2','bcc720f2981d1c37')", $myconn);
}
$reurl = "0-3.php";
echoioy(13);
}
if (isset($_GET["edit"])) {
$result = mysql_query("select * from {$db_prefix}groupuser where groupid=2 && username='$_POST[fidselect]'", $myconn);
if ($row = mysql_fetch_array($result)) {
mysql_query("update {$db_prefix}groupuser set groupid=2 where groupid=1", $myconn);
mysql_query("update {$db_prefix}groupuser set groupid=1 where groupid=2 && username='$_POST[fidselect]'", $myconn);
$reurl = "0-3.php";
echoioy(15);
} else {
echoerror(5);
}
}
$admina = array();
$adminb = array();
$result = mysql_query("select * from {$db_prefix}members where admin>0 ", $myconn);
while ($row = mysql_fetch_array($result)) {
$admina[$row['admin']][] = $row['username'];
} while (list ($key, $val) = @each($admina)) {
$adminlist[$key] = implode(",", $val);
}
$result = mysql_query("select * from {$db_prefix}groupuser where groupid in('2')", $myconn);
while ($row = mysql_fetch_array($result)) {
$adminb[] = $row['username'];
}
$adminl = implode(",", $adminb);
$result = mysql_query("select * from {$db_prefix}config where id=47", $myconn);
$sys_ = mysql_fetch_array($result);
$sysname = explode("|", $sys_["value"]);
require_once './template/header.htm';
require_once './template/0-3.htm';
require_once './template/footer.htm';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -