📄 admin.tpl.php
字号:
<?php
if( !defined('ISELOOK') ){
header('HTTP/1.0 404 Not Found');
exit;
}
?>
<table id=ElookSpace><tr><td></td></tr></table>
<table cellpadding="3" cellspacing="1" border="0" class="border" align=center>
<tr>
<td colspan="6" class="title">■ 管理员管理</td>
</tr>
<tr>
<td class="tdbg1" height="30" colspan="6"><B>操作说明</B><br>录入员:只具备操作“添加文章”、“更新系统数据”的权限<br>
编辑员:只具备操作“添加文章”、“修改文章”、“栏目管理”、“更新系统数据”的权限<br>
管理员:具备操作网站所有的权限</td>
</tr>
</table>
<br>
<?php
if ($action=='' || $action=='add') {
?>
<script language=javascript>
<!--
function check()
{
if(document.add_form.a_username.value=="")
{
document.add_form.a_username.focus();
alert("<?=$lang['reg_info1']?>");
return false;
}
if(document.add_form.a_password.value=="")
{
document.add_form.a_password.focus();
alert("<?=$lang['pw.info1']?>");
return false;
}
if((document.add_form.re_a_password.value)!=(document.add_form.a_password.value))
{
document.add_form.re_a_password.focus();
alert("<?=$lang['pw.info3']?>");
return false;
}
}
//-->
</script>
<?
}
if ($action=='') {
?>
<table cellpadding="3" cellspacing="1" border="0" class="border" align=center>
<form name="form1" method="post" action="admin.php">
<input type="hidden" name="action">
<tr>
<td colspan="6" class="title">■ 管理员列表</td>
</tr>
<tr align="center">
<td class="tdbg" height="25">序号</td>
<td class="tdbg" height="25">用户名</td>
<td class="tdbg" height="25">密码</td>
<td class="tdbg" height="25">验证密码</td>
<td class="tdbg" height="25">权限</td>
<td class="tdbg" height="25">操作</td>
</tr>
<?
if (!empty($info_list)) {
if (is_array($info_list)) {
foreach($info_list as $arr_list){
?>
<input type="hidden" name="a_id" value="<?php echo $arr_list['a_id']?>">
<tr align="center">
<td class="tdbg" height="25"><?php echo $arr_list['a_id']?></td>
<td class="tdbg" height="25"><?php echo $arr_list['a_username']?></td>
<td class="tdbg" height="25">
<input type="password" name="a_password" onMouseOver="this.focus()" onblur="if (this.value ==''){this.value=this.defaultValue}" onFocus="this.select()" onClick="if(this.value==this.defaultValue)this.value=''" value="<?php echo $arr_list['a_password']?>" size="20">
</td>
<td class="tdbg" height="25">
<input type="password" name="re_a_password" onMouseOver="this.focus()" onblur="if (this.value ==''){this.value=this.defaultValue}" onFocus="this.select()" onClick="if(this.value==this.defaultValue)this.value=''" value="<?php echo $arr_list['a_password']?>" size="20">
</td>
<td class="tdbg" height="25">
<select name="a_flag">
<option value="1"<?php if ($arr_list['a_flag']==1) echo ' selected'?>>管理员</option>
<option value="2"<?php if ($arr_list['a_flag']==2) echo ' selected'?>>编辑员</option>
<option value="3"<?php if ($arr_list['a_flag']==3) echo ' selected'?>>录入员</option>
</select>
</td>
<td class="tdbg" height="25">
<input type="submit" name="modify" onClick="this.form.action.value='save_modify';" value="修 改">
<input type="button" name="del" value="删 除" onClick="{if(confirm('您确认要这样做吗?一旦删除数据将无法恢复!')){window.location.href='admin.php?action=del&a_id=<?php echo $arr_list['a_id']?>';}return false;}">
</td>
</tr>
<?
}
}
}
?>
</form>
</table>
<?}elseif ($action=='add') {?>
<table cellpadding="3" cellspacing="1" border="0" class="border" align=center>
<form method="post" action="admin.php?action=save_add" name="add_form" onsubmit="return check();">
<tr>
<td colspan="6" class="title">■ 添加管理员</td>
</tr>
<tr>
<td class="tdbg" height="30" width="150" style="text-align : right;">用 户 名</td>
<td class="tdbg" height="30">
<input type="text" name="a_username">
</td>
</tr>
<tr>
<td class="tdbg" height="30" style="text-align : right;">初始密码</td>
<td class="tdbg" height="30">
<input type="password" name="a_password">
</td>
</tr>
<tr>
<td class="tdbg" height="30" style="text-align : right;">确认密码</td>
<td class="tdbg" height="30">
<input type="password" name="re_a_password">
</td>
</tr>
<tr>
<td class="tdbg" height="30" style="text-align : right;">权限设置</td>
<td class="tdbg" height="30">
<input type="radio" name="a_flag" value="1" checked>管理员
<input type="radio" name="a_flag" value="2">编辑员
<input type="radio" name="a_flag" value="3">录入员
</td>
</tr>
<tr>
<td class="tdbg" height="30" valign="middle" align="center" colspan="2">
<input type="submit" name="Submit" value="提 交" >
</td>
</tr>
</form>
</table>
<?}?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -