First commit
This commit is contained in:
67
uc_server/data/view/admin_login.php
Normal file
67
uc_server/data/view/admin_login.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php if(!defined('UC_ROOT')) exit('Access Denied');?>
|
||||
<?php include $this->gettpl('header');?>
|
||||
<script type="text/javascript">
|
||||
function $(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<form action="<?php echo UC_ADMINSCRIPT;?>?m=user&a=login" method="post" id="loginform" <?php if($iframe) { ?>target="_self"<?php } else { ?>target="_top"<?php } ?>>
|
||||
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
|
||||
<input type="hidden" name="seccodehidden" value="<?php echo $seccodeinit;?>" />
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe;?>" />
|
||||
<table class="mainbox">
|
||||
<tr>
|
||||
<td class="loginbox">
|
||||
<h1>UCenter</h1>
|
||||
<p>UCenter 是一个能沟通多个应用的桥梁,使各应用共享一个用户数据库,实现统一登录,注册,用户管理。</p>
|
||||
</td>
|
||||
<td class="login">
|
||||
<?php if($errorcode == UC_LOGIN_ERROR_FOUNDER_PW) { ?><div class="errormsg loginmsg"><p>UCenter创始人密码错误</p></div>
|
||||
<?php } elseif($errorcode == UC_LOGIN_ERROR_ADMIN_PW) { ?><div class="errormsg loginmsg"><p><em>登录失败!</em><br />用户名无效,或密码错误。</p></div>
|
||||
<?php } elseif($errorcode == UC_LOGIN_ERROR_ADMIN_NOT_EXISTS) { ?><div class="errormsg loginmsg"><p>该管理员不存在</p></div>
|
||||
<?php } elseif($errorcode == UC_LOGIN_ERROR_SECCODE) { ?><div class="errormsg loginmsg"><p>验证码输入错误</p></div>
|
||||
<?php } elseif($errorcode == UC_LOGIN_ERROR_FAILEDLOGIN) { ?><div class="errormsg loginmsg"><p>密码重试次数过多,请稍后尝试</p></div>
|
||||
<?php } ?>
|
||||
<p>
|
||||
<input type="radio" name="isfounder" value="1" class="radio" <?php if((isset($_POST['isfounder']) && $isfounder) || !isset($_POST['isfounder'])) { ?>checked="checked"<?php } ?> onclick="changeuser('founder')" id="founder" /><label for="founder">UCenter创始人</label>
|
||||
<input type="radio" name="isfounder" value="0" class="radio" <?php if((isset($_POST['isfounder']) && !$isfounder)) { ?>checked="checked"<?php } ?> onclick="changeuser('manager')" id="admin" /><label for="admin">管理员</label>
|
||||
</p>
|
||||
<p id="usernamediv">用户名: <input type="text" name="username" class="txt" id="username" value="<?php echo $username;?>" /></p>
|
||||
<p>密 码: <input type="password" name="password" class="txt" id="password" value="<?php echo $password;?>" /></p>
|
||||
<p>验证码: <input type="text" name="seccode" class="txt seccode" id="seccode" value="" /><img width="70" height="21" src="<?php echo UC_ADMINSCRIPT;?>?m=seccode&seccodeauth=<?php echo $seccodeinit;?>&<?php echo rand();?>" class="checkcode" /></p>
|
||||
<p class="loginbtn"><input type="submit" name="submit" value="登 录" class="btn" /></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
<?php if((isset($_POST['isfounder']) && $isfounder) || !isset($_POST['isfounder'])) { ?>
|
||||
$('username').value='UCenter Administrator';
|
||||
$('username').disabled = true;
|
||||
$('username').readOnly = true;
|
||||
$('password').focus();
|
||||
<?php } else { ?>
|
||||
$('username').disabled = false;
|
||||
$('username').readOnly = false;
|
||||
$('username').focus();
|
||||
<?php } ?>
|
||||
|
||||
function changeuser(user) {
|
||||
if(user == 'founder') {
|
||||
$('username').value='UCenter Administrator';
|
||||
$('username').readOnly = true;
|
||||
$('username').disabled = true;
|
||||
$('password').focus();
|
||||
} else if(user == 'manager') {
|
||||
$('username').value='';
|
||||
$('username').readOnly = false;
|
||||
$('username').disabled = false;
|
||||
$('username').focus();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="footer">Powered by UCenter <?php echo UC_SERVER_VERSION;?> © 2001-2025 <a href="https://code.dismall.com/" target="_blank">Discuz! Team</a>.</div>
|
||||
<?php include $this->gettpl('footer');?>
|
35
uc_server/data/view/footer.php
Normal file
35
uc_server/data/view/footer.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php if(!defined('UC_ROOT')) exit('Access Denied');?>
|
||||
<?php if(UC_DEBUG) { ?>
|
||||
<style type="text/css">
|
||||
#debuginfo {width: 60%;margin-left: 2em;}
|
||||
fieldset {margin-top: 2em; display: block;}
|
||||
</style>
|
||||
<div style="text-align: left;" id="debuginfo">
|
||||
Processed in <span id="debug_time"></span> s
|
||||
<fieldset>
|
||||
<legend><b>GET:</b></legend>
|
||||
<?php echo '<pre>'.print_r($_GET, TRUE).'</pre>';?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><b>POST:</b></legend>
|
||||
<?php echo '<pre>'.print_r($_POST, TRUE).'</pre>';?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><b>COOKIE:</b></legend>
|
||||
<?php echo '<pre>'.print_r($_COOKIE, TRUE).'</pre>';?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><b>SQL:</b> <?php echo $dbquerynum;?></legend>
|
||||
<?php foreach((array)$dbhistories as $dbhistory) {?>
|
||||
<li><?php echo $dbhistory;?></li>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><b>Include:</b> <?php echo count(get_included_files());?></legend>
|
||||
<?php echo '<pre>'.print_r(get_included_files(), TRUE).'</pre>';?>
|
||||
</fieldset>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</body>
|
||||
</html>
|
56
uc_server/data/view/header.php
Normal file
56
uc_server/data/view/header.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php if(!defined('UC_ROOT')) exit('Access Denied');?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo UC_CHARSET;?>" />
|
||||
<title>UCenter Administrator's Control Panel</title>
|
||||
<link rel="stylesheet" href="images/admincp.css" type="text/css" media="all" />
|
||||
<meta content="Comsenz Inc." name="Copyright" />
|
||||
</head>
|
||||
<body><div id="append"></div>
|
||||
<?php if(!empty($iframe) && !empty($user)) { ?>
|
||||
<a class="othersoff" style="float:right;text-align:center" id="header_menu" onclick="headermenu(this)">菜单</a>
|
||||
<ul id="header_menu_menu" style="display: none">
|
||||
<li><a href="<?php echo UC_ADMINSCRIPT;?>?m=frame&a=main&iframe=1" target="main" class="tabon">首页</a></li>
|
||||
<?php if($user['allowadminsetting'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=setting&a=ls&iframe=1" target="main">基本设置</a></li><?php } ?>
|
||||
<?php if($user['allowadminsetting'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=setting&a=register&iframe=1" target="main">注册设置</a></li><?php } ?>
|
||||
<?php if($user['allowadminsetting'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=setting&a=mail&iframe=1" target="main">邮件设置</a></li><?php } ?>
|
||||
<?php if($user['allowadminapp'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=app&a=ls&iframe=1" target="main">应用管理</a></li><?php } ?>
|
||||
<?php if($user['allowadminuser'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=user&a=ls&iframe=1" target="main">用户管理</a></li><?php } ?>
|
||||
<?php if($user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=admin&a=ls&iframe=1" target="main">管理员</a></li><?php } ?>
|
||||
<?php if($user['allowadminpm'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=pm&a=ls&iframe=1" target="main">短消息</a></li><?php } ?>
|
||||
<?php if($user['allowadmincredits'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=credit&a=ls&iframe=1" target="main">积分兑换</a></li><?php } ?>
|
||||
<?php if($user['allowadminbadword'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=badword&a=ls&iframe=1" target="main">词语过滤</a></li><?php } ?>
|
||||
<?php if($user['allowadmindomain'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=domain&a=ls&iframe=1" target="main">域名解析</a></li><?php } ?>
|
||||
<?php if($user['allowadmindb'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=db&a=ls&iframe=1" target="main">数据备份</a></li><?php } ?>
|
||||
<?php if($user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=feed&a=ls&iframe=1" target="main">数据列表</a></li><?php } ?>
|
||||
<?php if($user['allowadmincache'] || $user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=cache&a=update&iframe=1" target="main">更新缓存</a></li><?php } ?>
|
||||
<?php if($user['isfounder']) { ?><li><a href="<?php echo UC_ADMINSCRIPT;?>?m=plugin&a=filecheck&iframe=1" target="main">插件中心</a></li><?php } ?>
|
||||
<a href="<?php echo UC_ADMINSCRIPT;?>?m=user&a=logout" target="main">退出</a>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<script type="text/javascript">
|
||||
function headermenu(ctrl) {
|
||||
ctrl.className = ctrl.className == 'otherson' ? 'othersoff' : 'otherson';
|
||||
var menu = document.getElementById('header_menu_body');
|
||||
if(!menu) {
|
||||
menu = document.createElement('div');
|
||||
menu.id = 'header_menu_body';
|
||||
menu.innerHTML = '<ul>' + document.getElementById('header_menu_menu').innerHTML + '</ul>';
|
||||
var obj = ctrl;
|
||||
var x = ctrl.offsetLeft;
|
||||
var y = ctrl.offsetTop;
|
||||
while((obj = obj.offsetParent) != null) {
|
||||
x += obj.offsetLeft;
|
||||
y += obj.offsetTop;
|
||||
}
|
||||
menu.style.left = x + 'px';
|
||||
menu.style.top = y + ctrl.offsetHeight + 'px';
|
||||
menu.className = 'togglemenu';
|
||||
menu.style.display = '';
|
||||
document.body.appendChild(menu);
|
||||
} else {
|
||||
menu.style.display = menu.style.display == 'none' ? '' : 'none';
|
||||
}
|
||||
}
|
||||
</script>
|
0
uc_server/data/view/index.htm
Normal file
0
uc_server/data/view/index.htm
Normal file
Reference in New Issue
Block a user