📄 admin_administrator.asp
字号:
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td colspan="2" class="top_25"><strong>添加管理员</strong></td>
</tr>
<tr>
<td width="15%" class="td_ItemName"><strong>管理员名</strong></td>
<td width="85%" class="td_25"><input name="AdminName" type="text" id="AdminName" size="30" maxlength="25">
<input type="button" name="Submit4" value="检测管理员名" onClick="CheckAdminName()">
<span id="CheckResult"></span> </td>
</tr>
<tr>
<td class="td_ItemName"><strong>初始密码</strong></td>
<td class="td_25"><input name="Password" type="password" id="Password" size="30"></td>
</tr>
<tr>
<td class="td_ItemName"><strong>密码确认</strong></td>
<td class="td_25"><input name="PasswordConfirm" type="password" id="PasswordConfirm" size="30"></td>
</tr>
<tr>
<td class="td_ItemName"> </td>
<td class="td_25"><input name="EnableMultiLogin" type="checkbox" class="nomargin" id="EnableMultiLogin" value="<%=EL_True%>">
允许多人使用同一帐号同时登陆<br>
<input name="Actived" type="checkbox" class="nomargin" id="Actived" value="<%=EL_True%>" checked>
激活此帐号</td>
</tr>
<tr>
<td class="td_ItemName"><strong>限制登陆IP段</strong><br>
只有在设置的IP范围内才可以登陆本系统,每行一个IP段。不做限制请留空<br>
格式:192.168.1.*</td>
<td class="td_25"><textarea name="AllowLoginIp" cols="80" rows="7" id="AllowLoginIp"></textarea></td>
</tr>
<tr>
<td class="td_ItemName"><strong>管理权限</strong></td>
<td class="td_25"><input name="Purview" type="radio" class="nomargin" value="1" onClick="onPurviewChange(this.value)">
超级管理员
<input name="Purview" type="radio" class="nomargin" value="2" onClick="onPurviewChange(this.value)">
频道管理员
<input name="Purview" type="radio" class="nomargin" value="3" checked onClick="onPurviewChange(this.value)">
栏目管理员</td>
</tr>
<tr id="TR_ChannelAdmin" style="display:none;">
<td colspan="2" class="td_50" style="padding:10px;">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="60" align="center"><strong class="BlueText">频道管理员 —— 管理权限详细设置</strong></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td class="td_ItemName"><strong>频道权限设置</strong>
<input name="CheckAllPurviewChannel" type="checkbox" class="nomargin" id="CheckAllPurviewChannel" onClick="CheckAll('ChannelPurview')" value="checkbox">
选中所有权限 </td>
</tr>
<tr>
<td height="50" valign="top" style="padding:10px;">
<%
Dim ChannelCmd, rsChannel, ChannelCount
Call EL_Common.InitCommonCmd(ChannelCmd, rsChannel, "EL_Channel", "ChannelID,ChannelName,ChannelModule,ClassItemName", "ChannelType=0 And Disabled="& EL_False)
rsChannel.Close()
ChannelCount = ChannelCmd(0)
rsChannel.Open()
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='1'><tr>"
For i = 1 To ChannelCount
Response.Write "<td height='25'><input type='checkbox' id='ChannelPurview' name='ChannelPurview' value='"& rsChannel(0) &"' class='nomargin'> "& EL_Common.ServerHTMLEncode(rsChannel(1)) &"</td>"
If (i Mod 5)=0 Then Response.Write "</tr><tr>"
If i<ChannelCount Then rsChannel.MoveNext
Next
rsChannel.Close()
Response.Write "</tr></table>"
%> </td>
</tr>
</table> </td>
</tr>
<tr id="TR_ClassAdmin" style="">
<td colspan="2" class="td_50" style="padding:10px;"><table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="60" align="center"><strong class="BlueText">栏目管理员 —— 管理权限详细设置</strong></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td class="td_ItemName"><strong>栏目权限设置</strong> </td>
</tr>
<tr>
<td height="50" valign="top" style="padding:10px;">
<%
rsChannel.Open()
rsChannel.MoveFirst()
For i = 1 To ChannelCount
If rsChannel(2) <> 2 And rsChannel(2)<> 4 And rsChannel(2)<> 5 And rsChannel(2)<>9 Then
Response.Write "<fieldset type='myfieldset' style='padding:5px; margin-bottom:15px;'><legend>此管理员在 <span class=bluetext>"& EL_Common.ServerHTMLEncode(rsChannel(1)) &"</span> 的权限</legend>"
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='1'>"
Response.Write "<tr><td>"
Response.Write "<input name='ClassPurviewInChannel_"& rsChannel(0) &"' id='ClassPurviewInChannel_"& rsChannel(0) &"' type='radio' class='nomargin' onClick='ShowClass("& rsChannel(0) &", 1)'> 指定拥有管理权限的栏目 "
Response.Write "<input name='ClassPurviewInChannel_"& rsChannel(0) &"' id='ClassPurviewInChannel_"& rsChannel(0) &"' type='radio' class='nomargin' onClick='ShowClass("& rsChannel(0) &", 0)' checked> 在此频道中没有任何权限"
Response.Write "</td></tr>"
Response.Write "</table>"
Response.Write "<table id='Table_"& rsChannel(0) &"' width='100%' border='0' cellpadding='0' cellspacing='0' style='display:none;'><tr><td>"
Response.Write "<table width='370' border='0' cellpadding='0' cellspacing='0' style='float:left; margin-left:5px; border-top:1px solid #808080; border-left:1px solid #808080; border-right:1px solid #FFFFFF; border-bottom:1px solid #FFFFFF; float:left'>"
Response.Write "<tr><td>"
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='0' style='border-top:1px solid #404040; border-left:1px solid #404040; border-right:1px solid #D4D0C8; border-bottom:1px solid #D4D0C8;'>"
Response.Write "<tr><td valign='top' style='background:#FFFFFF;'><div style='overflow-y:scroll; height:150px;'><table width='100%' border='0' cellpadding='0' cellspacing='1'>"
Response.Write "<tr class='td_ItemName'><td><strong>"& rsChannel(3) &"名称</strong></td><td width='30'><strong>权限</strong></td></tr>"
Response.Write ShowClassList(rsChannel(0), 0, "", "0")
Response.Write "</table></div></td></tr>"
Response.Write "</table>"
Response.Write "</td></tr>"
Response.Write "</table>"
Response.Write "<span class='redText'>注:栏目权限采用继承制度,即在某一栏目拥有管理权限,则在此栏目的所有子栏目中都拥有管理权限。</span>"
Response.Write "</td></tr></table>"
Response.Write "</fieldset>"
End If
If i<ChannelCount Then rsChannel.MoveNext
Next
rsChannel.Close()
Set rsChannel = Nothing
Set ChannelCmd = Nothing
%> </td>
</tr>
</table></td>
</tr>
<tr id="TR_OtherPurview">
<td colspan="2" class="td_50" style="padding:10px;"><table width="100%" border="0" cellpadding="0" cellspacing="1" class="Border">
<tr>
<td class="td_ItemName"><strong>其他权限设置</strong>
<input name="CheckAllPurviewOthers" type="checkbox" class="nomargin" id="CheckAllPurviewOthers" onClick="CheckAll('PurviewOthers')" value="checkbox">
选中所有权限 </td>
</tr>
<tr>
<td height="50" valign="top" style="padding:10px;">
<%
Dim arr, j
Response.Write "<table width='100%' border='0' cellpadding='0' cellspacing='1'><tr>"
j = 1
For i = 0 To Ubound(ArrPurviewOthers)
If ArrPurviewOthers(i) <> "" And Not IsNULL(ArrPurviewOthers(i)) Then
arr = Split(ArrPurviewOthers(i), "$")
Response.Write "<td height='25'><input type='checkbox' id='PurviewOthers' name='PurviewOthers' value='"& arr(0) &"' class='nomargin' "& EL_Common.SetObjectChecked(1, arr(2)) &"> "& arr(1) &"</td>"
If (j Mod 5)=0 Then Response.Write "</tr><tr>"
j = j + 1
End If
Next
Response.Write "</tr></table>"
%> </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="center" class="td_50"><input type="submit" name="Submit2" value="添加管理员">
<input type="button" name="Submit3" value="返回上页" onClick="history.back()">
<input name="PurviewInChannel" type="hidden" id="PurviewInChannel" value="0">
<input name="Action" type="hidden" id="Action" value="SaveNewAdmin"></td>
</tr>
</table>
</form>
<%
EL_Common.ShowScriptError()
End Sub
%>
<%
Function ShowClassList(ByVal ChannelID, ByVal ParentID, ParentString, ByVal ArrPurviewInClass)
Dim ClassCmd, rsClass
Dim RowCount, MaxOrderID, ParentMaxOrderID, ParentOrderID, MinOrderID, i
Dim Result, TempString, TableString, TreeFolder
TreeFolder = "<img src='Images/tree_folder1.gif'>"
Call EL_Common.InitCommand(ClassCmd, "EL_SP_ClassTree")
With ClassCmd
.Parameters.Append .CreateParameter("RETURN", 3, 4, 4)
.Parameters.Append .CreateParameter("@ChannelID", 3, 1, 4, ChannelID)
.Parameters.Append .CreateParameter("@ParentID", 3, 1, 4, ParentID)
.Parameters.Append .CreateParameter("@MaxOrderID", 3, 2, 4)
.Parameters.Append .CreateParameter("@ParentMaxOrderID", 3, 2, 4)
.Parameters.Append .CreateParameter("@ParentOrderID", 3, 2, 4)
.Parameters.Append .CreateParameter("@MinOrderID", 3, 2, 4)
Set rsClass = .Execute
End With
rsClass.Close()
If ClassCmd(0) = 0 Then
ShowClassList = ""
Set rsClass = Nothing
Set ClassCmd = Nothing
Exit Function
End If
RowCount = ClassCmd(0)
MaxOrderID = ClassCmd(3)
ParentMaxOrderID = ClassCmd(4)
ParentOrderID = ClassCmd(5)
MinOrderID = ClassCmd(6)
rsClass.Open()
Result = ""
For i=1 To RowCount
TempString = ""
If ParentID <> 0 Then
If ParentString <> "" Then
If ParentMaxOrderID = ParentOrderID Then
TempString = Left(ParentString,Len(ParentString)-1) &"<img src='Images/tree_line4.gif'>"
Else
TempString = Left(ParentString,Len(ParentString)-1) &"│"
End If
Else
TempString = ParentString
End If
If rsClass(2) = MaxOrderID Then
TempString = TempString &"└"
Else
TempString = TempString &"├"
End If
End If
TableString = TempString
TableString = Replace(TableString,"│","<img src='Images/tree_line3.gif'>")
TableString = Replace(TableString,"└","<img src='Images/tree_line2.gif'>")
TableString = Replace(TableString,"├","<img src='Images/tree_line1.gif'>")
Dim TRClassStyle, PurviewClassObjectChecked
If CheckAdminPurview(ArrPurviewInClass, rsClass(0), 2) = True Then
TRClassStyle = "MouseOver_25"
PurviewClassObjectChecked = "checked"
Else
TRClassStyle = "td_25"
PurviewClassObjectChecked = ""
End If
Result = Result &"<tr id='TRClass_"& rsClass(0) &"' class='"& TRClassStyle &"'>"
Result = Result &"<td>"& TableString & TreeFolder & rsClass(1) &"</td>"
Result = Result &"<td align='center' nowrap>"
Result = Result &"<input type='checkbox' id='PurviewClassObject' name='PurviewClassObject' value='"& rsClass(0) &"' ChannelID='"& ChannelID &"' onClick='onCheckPurviewClass("& rsClass(0) &", this.checked)' "& PurviewClassObjectChecked &">"
Result = Result &"</td>"
Result = Result &"</tr>"
Result = Result & ShowClassList(ChannelID, rsClass(0), TempString, ArrPurviewInClass)
If i<RowCount Then rsClass.MoveNext
Next
rsClass.Close()
Set rsClass = Nothing
Set ClassCmd = Nothing
ShowClassList = Result
End Function
Function CheckAdminPurview(ByVal ArrPurview, ByVal CheckPurviewID, CheckType)
Dim ArrTempPurview, i
CheckAdminPurview = False
Select Case CheckType
Case 1: '频道权限
If EL_Common.ELClng(CheckPurviewID) = 0 Then Exit Function
If ArrPurview = "" Or IsNull(ArrPurview) Then Exit Function
ArrTempPurview = Split(ArrPurview, ",")
Case 2: '分类权限
Dim arr, AllClassID
If EL_Common.ELClng(CheckPurviewID) = 0 Then Exit Function
If ArrPurview = "" Or IsNull(ArrPurview) Then Exit Function
arr = Split(ArrPurview, ",")
'遍历所有子类
AllClassID = ""
For i = 0 To Ubound(arr)
Dim S
S = EL_Common.GetAllChildID(arr(i))
AllClassID = EL_Common.Join2String(AllClassID, arr(i), ",")
If S<>"" And NOT IsNULL(S) Then
AllClassID = EL_Common.Join2String(AllClassID, S, ",")
End If
Next
ArrTempPurview = Split(AllClassID, ",")
Case 3: '其他权限
If ArrPurview = "" Or IsNull(ArrPurview) Then Exit Function
ArrTempPurview = Split(ArrPurview, ",")
Case Else: Exit Function
End Select
For i = 0 To Ubound(ArrTempPurview)
If EL_Common.ELClng(ArrTempPurview(i)) = EL_Common.ELClng(CheckPurviewID) Then
CheckAdminPurview = True
Exit Function
End If
Next
End Function
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -