⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_admin.asp

📁 淘客网上商店网站程序 淘客网上商店网站程序 淘客网上商店网站程序
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	  document.form1.PwdConfirm.focus();	  
      return false;
    }
  if (document.form1.Purview_0[1].checked==true){
	GetarrClassPurview();
  }
}
</script>
<form method="post" action="Admin_Admin.asp?" name="form1" onsubmit="javascript:return CheckAdd();">
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
    <tr class="title"> 
      <td height="22" colspan="2"> <div align="center"><strong>新 增 管 理 员</strong></div></td>
    </tr>
    <tr class="tdbg"> 
      <td width="35%" class="tdbg" align="right"><strong> 后台用户:</strong></td>
      <td width="65%" class="tdbg"><input name="UserName" type="text">&nbsp;<font color="#FF0033">*</font> <input name="Action" type="hidden" id="Action" value="SaveAdd"></td>
    </tr>
    <tr class="tdbg"> 
      <td width="35%" class="tdbg" align="right"><strong> 前台用户:</strong></td>
      <td width="65%" class="tdbg"><input name="AddUser" type="text">&nbsp;<font color="#FF0033">*</font>(与前台用户保持一致)</td>
    </tr>
    <tr class="tdbg"> 
      <td width="35%" class="tdbg" align="right"><strong> 后台密码:</strong></td>
      <td width="65%" class="tdbg"><input type="password" name="Password">&nbsp;<font color="#FF0033">*</font>(可与前台密码不一样)</td>
    </tr>
    <tr class="tdbg"> 
      <td width="35%" class="tdbg" align="right"><strong> 确认密码:</strong></td>
      <td width="65%" class="tdbg"><input type="password" name="PwdConfirm">&nbsp;<font color="#FF0033">*</font>(请重复输入后台密码)</td>
    </tr>
<%end if%>
    <tr class="tdbg"> 
      <td width="35%" class="tdbg" align="right"><strong>权限设置: </strong></td>
      <td width="65%" class="tdbg"><table width="100%" border="0" cellspacing="1" cellpadding="2">
        <tr>
          <td width="100"><input name="Purview_0" type="radio" value="1" onClick="PurviewDetail.style.display='none'" <%if sPurview(0)=1 then response.write "checked"%>>超级管理员:</td>
          <td>拥有所有权限。</td>
        </tr>
        <tr>
          <td width="100"><input type="radio" name="Purview_0" value="2" onClick="PurviewDetail.style.display=''" <%if sPurview(0)<>1 then response.write "checked"%>>普通管理员:</td>
          <td>需要详细指定每一项管理权限</td>
        </tr>
      </table>
     </td>
    </tr>
    <tr class="tdbg">
      <td colspan="2"><table id="PurviewDetail" width="100%" border="0" cellspacing="10" cellpadding="0" <%if sPurview(0)=1 then response.write "style='display:none'"%>>
        <tr>
          <td colspan="2" align="center"><strong>管 理 员 权 限 详 细 设 置</strong></td>
        </tr>
        <tr>
          <td colspan="2" align="center"><strong><font color="#FF0033">注:栏目权限采用继承制度,即在某一栏目拥有某项管理权限,则在此栏目的所有子栏目中都拥有这项管理权限。</font></strong></td>
        </tr>
		<tr valign="top">
		<%
	dim n,sMaxCID,sTempJs,Node
	n=0 : sTempJs=""
	sTempJs = sTempJs & "document.form1.arrClassInput.value='';" & vbCrlf
	sTempJs = sTempJs & "document.form1.arrClassCheck.value='';" & vbCrlf
	sTempJs = sTempJs & "document.form1.arrClassMaster.value='';" & vbCrlf
	For Each Node In Application(Cl.CacheName & "_channellist").DocumentElement.SelectNodes("channel[@moduleid>0][@channeltype<2]")
		n=n+1 : sMaxCID=CLng(Node.SelectSingleNode("@channelid").text)
		if Ubound(sPurview) < sMaxCID then
			Redim Preserve sPurview(sMaxCID)
			sPurview(sMaxCID)=4
		end if
		if n>2 then
			n=1
			Response.write "</tr><tr valign=""top"">"
		end if
		%>
		<td width="49%">
			<fieldset><legend align="center"><%=Node.SelectSingleNode("@channelname").text%></legend>
			<input type="radio" name="Purview_<%=sMaxCID%>" value="1"  onClick="ChkarrClassPurview('<%=sMaxCID%>','1')" <%if sPurview(sMaxCID)="1" then Response.write " checked"%>>
				频道管理员:拥有此频道的所有管理权限<br />
			<input type="radio" name="Purview_<%=sMaxCID%>" value="2"  onClick="ChkarrClassPurview('<%=sMaxCID%>','2')" <%if sPurview(sMaxCID)="2" then Response.write " checked"%>>
				栏目&nbsp;&nbsp;总管:拥有所有管理权限,但不能添加栏目和专题<br />
			<input name="Purview_<%=sMaxCID%>" type="radio" value="3" onClick="ChkarrClassPurview('<%=sMaxCID%>','3')" <%if sPurview(sMaxCID)="3" then Response.write " checked"%>>
				栏目管理员:需要详细指定每个栏目的权限<br />
			<input type="radio" name="Purview_<%=sMaxCID%>" value="4" onClick="ChkarrClassPurview('<%=sMaxCID%>','4')" <%if sPurview(sMaxCID)="4" then Response.write " checked"%>> 
				无任何权限:在此频道无任何权限
			<br />
			<iframe ID="arrClass_<%=sMaxCID%>" <%
			if sPurview(sMaxCID)=3 then
				Response.write "height=""200"""
			else
				Response.write "height=""0"""
			end if
			%> width="100%" src="Admin_SetClassPurview.asp?ChannelID=<%=sMaxCID%>&Action=<%=frmAction%>&UserID=<%=UserID%>"></iframe>
			</fieldset>
			<script type="text/javascript">ChkarrClassPurview("<%=sMaxCID%>","<%=sPurview(sMaxCID)%>")</script>
          </td>
	<%
'===================================================================================
sTempJs = sTempJs & "if(document.form1.Purview_" & sMaxCID & "[2].checked==true){" & vbCrlf
sTempJs = sTempJs & "	for(var i=0;i<arrClass_" & sMaxCID & ".document.myform.ClassInput.length;i++){" & vbCrlf
sTempJs = sTempJs & "		if (arrClass_" & sMaxCID & ".document.myform.ClassInput[i].checked==true){" & vbCrlf
sTempJs = sTempJs & "			if (document.form1.arrClassInput.value=='')" & vbCrlf
sTempJs = sTempJs & "				document.form1.arrClassInput.value=arrClass_" & sMaxCID & ".document.myform.ClassInput[i].value;" & vbCrlf
sTempJs = sTempJs & "			else" & vbCrlf
sTempJs = sTempJs & "				document.form1.arrClassInput.value+=','+arrClass_" & sMaxCID & ".document.myform.ClassInput[i].value;" & vbCrlf
sTempJs = sTempJs & "		}" & vbCrlf
sTempJs = sTempJs & "	}" & vbCrlf
sTempJs = sTempJs & "	for(var i=0;i<arrClass_" & sMaxCID & ".document.myform.ClassCheck.length;i++){" & vbCrlf
sTempJs = sTempJs & "		if (arrClass_" & sMaxCID & ".document.myform.ClassCheck[i].checked==true){" & vbCrlf
sTempJs = sTempJs & "			if (document.form1.arrClassCheck.value=='')" & vbCrlf
sTempJs = sTempJs & "				document.form1.arrClassCheck.value=arrClass_" & sMaxCID & ".document.myform.ClassCheck[i].value;" & vbCrlf
sTempJs = sTempJs & "			else" & vbCrlf
sTempJs = sTempJs & "				document.form1.arrClassCheck.value+=','+arrClass_" & sMaxCID & ".document.myform.ClassCheck[i].value;" & vbCrlf
sTempJs = sTempJs & "		}" & vbCrlf
sTempJs = sTempJs & "	}" & vbCrlf
sTempJs = sTempJs & "	for(var i=0;i<arrClass_" & sMaxCID & ".document.myform.ClassMaster.length;i++){" & vbCrlf
sTempJs = sTempJs & "		if (arrClass_" & sMaxCID & ".document.myform.ClassMaster[i].checked==true){" & vbCrlf
sTempJs = sTempJs & "			if (document.form1.arrClassMaster.value=='')" & vbCrlf
sTempJs = sTempJs & "				document.form1.arrClassMaster.value=arrClass_" & sMaxCID & ".document.myform.ClassMaster[i].value;" & vbCrlf
sTempJs = sTempJs & "			else" & vbCrlf
sTempJs = sTempJs & "				document.form1.arrClassMaster.value+=','+arrClass_" & sMaxCID & ".document.myform.ClassMaster[i].value;" & vbCrlf
sTempJs = sTempJs & "		}" & vbCrlf
sTempJs = sTempJs & "	}" & vbCrlf
sTempJs = sTempJs & "}" & vbCrlf
'===================================================================================
	Next
	%>
		<input name="arrClassMaster" type="hidden" id="arrClassMaster">
		<input name="arrClassCheck" type="hidden" id="arrClassCheck">
		<input name="arrClassInput" type="hidden" id="arrClassInput">
		</tr>
        <tr valign="top">
          <td width="98%" colspan="2"><fieldset>
            <legend align="center">网站管理权限</legend>
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
              <tr>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Setup" <%=TrueCheckBox("Setup")%>>信息配置</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Announce" <%=TrueCheckBox("Announce")%>>公告管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Ads" <%=TrueCheckBox("Ads")%>>广告管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Vote" <%=TrueCheckBox("Vote")%>>调查管理</td>
              </tr>
              <tr>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Special" <%=TrueCheckBox("Special")%>>专题管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Count" <%=TrueCheckBox("Count")%>>访问量管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Label" <%=TrueCheckBox("Label")%>>自定义标签</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Keyword" <%=TrueCheckBox("Keyword")%>>关键字管理</td>
              </tr>
              <tr>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Channel" <%=TrueCheckBox("Channel")%>>频道管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Template" <%=TrueCheckBox("Template")%>>模板管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Plus" <%=TrueCheckBox("Plus")%>>插件管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Page" <%=TrueCheckBox("Page")%>>自定义页管理</td>
              </tr>
              <tr>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="User" <%=TrueCheckBox("User")%>>注册用户</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Cz" <%=TrueCheckBox("Cz")%>>充值卡管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Email" <%=TrueCheckBox("Email")%>>邮件管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Message" <%=TrueCheckBox("Message")%>>短信管理</td>
              </tr>
              <tr>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="LinkSite" <%=TrueCheckBox("LinkSite")%>>友情链接管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Upload" <%=TrueCheckBox("Upload")%>>上传/生成文件管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="BadWord" <%=TrueCheckBox("BadWord")%>>过滤/限定管理</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Log" <%=TrueCheckBox("Log")%>>事件记录管理</td>
              </tr>
              <tr>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="Js" <%=TrueCheckBox("Js")%>>JS调用管理</td>
                <td width="25%">&nbsp;</td>
                <td width="25%">&nbsp;</td>
                <td width="25%"><input name="Purview_Other" type="checkbox" id="Purview_Other" value="ModifyPwd" <%=TrueCheckBox("ModifyPwd")%>>修改自己密码</td>
              </tr>
            </table>
            </fieldset></td>
        </tr>
      </table></td>
    </tr>
    <tr> 
      <td colspan="2" align="center" class="tdbg">
        <input  type="submit" name="Submit" value="保存修改结果" style="cursor:hand;">
        &nbsp;
        <input name="Cancel" type="button" id="Cancel" value=" 取 消 " onClick="window.location.href='Admin_Admin.asp'" style="cursor:hand;"></td>
    </tr>
  </table>
</form>
<script language="JavaScript" type="text/javascript">
function GetarrClassPurview()
{
<%=sTempJs%>
}
  //if (document.form1.Purview(0)[1].checked==true){
	//GetarrClassPurview();
  //}
	//document.write (document.form1.arrClassInput.value);
//      return false;
</script>
<%
end sub

sub ModifyPwd()
	dim UserID
	UserID=Cl.GetClng(Request("ID"))
	if UserID=0 then
		Cl.ShowErr("<br /><li>请指定要修改的管理员ID</li>")
	end if
	SQL="Select * from Cl_Admin where ID=" & UserID
	Set rs=Cl.Execute(SQL)
	if rs.Bof and rs.EOF Then
		Rs.Close : Set Rs = Nothing
		Cl.ShowErr("<br /><li>不存在此用户!</li>")
	else
		if rs("UserName")=Cl.Admin_Info(1) then
			ErrMsg=ErrMsg & "<br /><li>您不能在此修改自己的登录密码!</li>"
			ErrMsg=ErrMsg & "<br /><li>请点击链接修改&nbsp;<a href='Admin_ModifyPwd.asp'><font color='red'>修改密码</font></a>"
			rs.close : set rs=Nothing
			Cl.ShowErr(ErrMsg)
		end if
%>
<script language="JavaScript" type="text/javascript">
function CheckModify()
{
  if(document.form1.Password.value=="")
    {
      alert("密码不能为空!");
	  document.form1.Password.focus();
      return false;
    }
  if((document.form1.Password.value)!=(document.form1.PwdConfirm.value))
    {
      alert("初始密码与确认密码不同!");
	  document.form1.PwdConfirm.select();
	  document.form1.PwdConfirm.focus();	  
      return false;
    }
}
</script>
<form method="post" action="Admin_Admin.asp" name="form1" onsubmit="javascript:return CheckModify();">
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
    <tr class="title"> 
      <td height="22" colspan="2"> <div align="center"><font size="2"><strong>修 改 管 理 员 密 码</strong></font></div></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -