purview.asp
资源名称:1.rar [点击查看]
上传用户:ziqing_518
上传日期:2022-08-09
资源大小:446k
文件大小:15k
源码类别:
多媒体编程
开发平台:
ASP/ASPX
- <!--#include file="users.asp" -->
- <!--#include file="config.asp" -->
- <!--#include file="../md5.asp" -->
- <!--#include file="cookies.asp" -->
- <%
- if rs4("boolUser")=False then
- Response.Redirect "index.asp"
- end if
- end if
- rs.close
- set rs=nothing
- end if
- %>
- <!--#include file="function.asp" -->
- <!--#include file="code.asp" -->
- <!--#include file="first.asp" -->
- <table border=0 cellspacing=0 style='border-collapse:collapse' width=735 height=233 cellpadding=3>
- <tr>
- <td width=185 valign=top>
- <!--#include file="inc.asp" -->
- </td>
- <td width=550 valign=top>
- <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#000000">
- <%
- dim strUseridEdit(1,16)
- select case Request.QueryString("post")
- case "add"
- if Request.QueryString("save")<>"ok" then
- strTitle="添加自定义权限"
- strSubmit="执行添加"
- posSubmit="purview.asp?post=add&save=ok"
- else
- dim str(14)
- str(0)="boolAdmin"
- str(1)="boolAdd"
- str(2)="boolDel"
- str(3)="boolOrtherDel"
- str(4)="boolAllDel"
- str(5)="boolTatt"
- str(6)="boolMoney"
- str(7)="boolAllSort"
- str(8)="strOneSmall"
- str(9)="boolAD"
- str(10)="boolConfig"
- str(11)="boolUser"
- str(12)="boolReview"
- str(13)="boolAff"
- str(14)="boolLink"
- for i= 0 to 14
- if i<>"8" then
- if request.form(""& str(i) &"")="" then
- response.write("除了分类/名称以外的选项不能为空,请返回重新填写")
- response.end
- end if
- end if
- next
- set rs=conn.execute("select * from config order by id desc")
- strAname=int(rs("id"))+1
- strAname="自定义"&strAname
- conn.execute("insert into config(strAname,boolAdmin,boolAdd,boolDel,boolOrtherDel,boolAllDel,boolTatt,boolMoney,boolAllSort,strOneSmall,boolAD,boolConfig,boolUser,boolReview,boolAff,boolLink) values('"& strAname &"',"& request.form("boolAdmin") &","& request.form("boolAdd") &","& request.form("boolDel") &","& request.form("boolOrtherDel") &","& request.form("boolAllDel") &","& request.form("boolTatt") &","& request.form("boolMoney") &","& request.form("boolAllSort") &",'"& request.form("strOneSmall") &"',"& request.form("boolAD") &","& request.form("boolConfig") &","& request.form("boolUser") &","& request.form("boolReview") &","& request.form("boolAff") &","& request.form("boolLink") &")")
- if Request.QueryString("Userid")<>"" then
- set rs=conn.execute("select * from config order by id desc")
- numID=rs("id")
- conn.execute("update admin set qx="& numID &" where admin='"& Request.QueryString("Userid") &"'")
- response.write("管理员"& Request.QueryString("Userid") &"权限编辑完成,同时增加权限:"& strAname &"<br>")
- end if
- set rs=nothing
- Response.write("操作完成,2秒钟后返回<META HTTP-EQUIV=REFRESH CONTENT='2;URL=purview.asp'>")
- response.end
- end if
- case "edit"
- if Request.QueryString("save")<>"ok" then
- if Request.QueryString("Userid")<>"" and Request.QueryString("id")="" then
- strTitle="编辑"& Request.QueryString("Userid") &"用户的权限"
- strSubmit="提交编辑"
- posSubmit="purview.asp?post=edit&save=ok&Userid="& Request.QueryString("Userid")
- set rs=conn.execute("select * from admin where admin='"& Request.QueryString("Userid") &"'")
- numQx=int(rs("qx"))
- set rs=conn.execute("select * from config where id="&numQx)
- for i = 0 to 16
- Select case rs(i)
- case "False"
- strUseridEdit(0,i)="checked"
- case "True"
- strUseridEdit(1,i)="checked"
- case else
- strUseridEdit(0,i)=rs(i)
- end select
- next
- set rs=nothing
- elseif Request.QueryString("id")<>"" and Request.QueryString("Userid")="" then
- strTitle="编辑权限"
- strSubmit="提交编辑"
- posSubmit="purview.asp?post=edit&save=ok&id="& Request.QueryString("id")
- set rs=conn.execute("select * from config where id="&int(Request.QueryString("id")))
- for i = 0 to 16
- Select case rs(i)
- case "False"
- strUseridEdit(0,i)="checked"
- case "True"
- strUseridEdit(1,i)="checked"
- case else
- strUseridEdit(0,i)=rs(i)
- end select
- next
- set rs=nothing
- else
- response.write("程序操作失败,请确认程序是否运行正确")
- response.end
- end if
- else
- if Request.QueryString("Userid")<>"" and Request.QueryString("id")="" then
- response.write("<form name=""PurviewFroms"" method=""post"" action=""purview.asp?post=add&save=ok&Userid="& Request.QueryString("Userid") &"""><input type='hidden' name='boolAdmin' value='"& request.form("boolAdmin") &"'><input type='hidden' name='boolAdd' value='"& request.form("boolAdd") &"'><input type='hidden' name='boolDel' value='"& request.form("boolDel") &"'><input type='hidden' name='boolOrtherDel' value='"& request.form("boolOrtherDel") &"'><input type='hidden' name='boolAllDel' value='"& request.form("boolAllDel") &"'><input type='hidden' name='boolTatt' value='"& request.form("boolTatt") &"'><input type='hidden' name='boolMoney' value='"& request.form("boolMoney") &"'><input type='hidden' name='boolAllSort' value='"& request.form("boolAllSort") &"'><input type='hidden' name='strOneSmall' value='"& request.form("strOneSmall") &"'><input type='hidden' name='boolAD' value='"& request.form("boolAD") &"'><input type='hidden' name='boolConfig' value='"& request.form("boolConfig") &"'><input type='hidden' name='boolUser' value='"& request.form("boolUser") &"'><input type='hidden' name='boolReview' value='"& request.form("boolReview") &"'><input type='hidden' name='boolAff' value='"& request.form("boolAff") &"'><input type='hidden' name='boolLink' value='"& request.form("boolLink") &"'>由于数据库未预存该用户的管理权限,请点击<a href=javascript:document.PurviewFroms.submit()><b>确定</b></a>自动添加</form>")
- response.end
- elseif Request.QueryString("id")<>"" and Request.QueryString("Userid")="" then
- if Request.QueryString("id")<="1" then
- response.write("对不起,超级管理员权限不能进行编辑")
- else
- conn.execute("update [config] set boolAdmin="& Request.Form("boolAdmin") &",boolAdd="& Request.Form("boolAdd") &",boolDel="& Request.Form("boolDel") &",boolOrtherDel="& Request.Form("boolOrtherDel") &",boolAllDel="& Request.Form("boolAllDel") &",boolTatt="& Request.Form("boolTatt") &",boolMoney="& Request.Form("boolMoney") &",boolAllSort="& Request.Form("boolAllSort") &",strOneSmall='"& Request.Form("strOneSmall") &"',boolAD="& Request.Form("boolAD") &",boolConfig="& Request.Form("boolConfig") &",boolUser="& Request.Form("boolUser") &",boolReview="& Request.Form("boolReview") &",boolAff="& Request.Form("boolAff") &",boolLink="& Request.Form("boolLink") &" where id="& Request.QueryString("id"))
- Response.write("操作完成,2秒钟后返回<META HTTP-EQUIV=REFRESH CONTENT='2;URL=purview.asp'>")
- end if
- response.end
- else
- response.write("程序操作失败,请确认程序是否运行正确")
- response.end
- end if
- end if
- case "del"
- if Request.QueryString("id")<>"" and Request.QueryString("Userid")="" then
- if Request.QueryString("id")<="5" then
- response.write("对不起,默认的5项管理员权限不能进行删除操作")
- else
- conn.execute("delete from admin where qx="&Request.QueryString("id"))
- conn.execute("delete from config where id="&Request.QueryString("id"))
- response.write("操作完成,2秒钟后返回"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=purview.asp'>")
- end if
- response.end
- else
- response.write("程序操作失败,请确认程序是否运行正确")
- response.end
- end if
- case else
- %>
- <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#000000">
- <tr>
- <td width="100%" align="center" bgcolor="#E3E3E3" colspan="2"><b>--==权限列表==--</b></td>
- </tr>
- <tr>
- <td width="100%" bgcolor="#F3F3F3" colspan="2">
- <%
- Set rs =Server.CreateObject("ADODB.Recordset")
- sql="select * from config"
- rs.open sql,conn,1,1
- if rs.eof then
- response.write("程序运行错误,确认是否正确上传程序")
- else
- do while not rs.eof
- response.write("<li>"& rs("strAname") &" <a href=purview.asp?post=edit&id="& rs("id") &">编辑</a>|<a href=purview.asp?post=del&id="& rs("id") &" onclick=""{if(confirm('您确定执行的操作吗?n删除该权限会同时删除该权限下的管理员!!!n如果还需要该权限下的管理员,请转移后再操作')){return true;}return false;}"">删除</a>")
- rs.movenext
- loop
- end if
- rs.close
- set rs=nothing
- %>
- <p align="center"><a href=purview.asp?post=add>点这添加自定义管理员</a></p>
- </td>
- </tr>
- </table>
- </table>
- </td>
- </tr>
- </table>
- <br><hr width=735>
- <center>
- <%
- response.end
- end select
- %>
- <form name="PurviewFrom" method="post" action="<%=posSubmit%>">
- <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#000000">
- <tr align="center" bgcolor="#E0E0E0">
- <td colspan="2"><%=strTitle%></td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">设定名称</td>
- <td width="75%"><input name="strAname" type="text" id="strAname" size="20" maxlength="20" value="<%=strUseridEdit(0,1)%>" readonly style='color:#000000; border:0px; background-color:#FFFFFF'></td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td bgcolor="#FFFFFF">后台登陆</td>
- <td><input name="boolAdmin" type="radio" value="True" <%=strUseridEdit(1,2)%>>
- 是
- <input type="radio" name="boolAdmin" value="False" <%=strUseridEdit(0,2)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">添加影片</td>
- <td width="75%"><input name="boolAdd" type="radio" value="True" <%=strUseridEdit(1,3)%>>
- 是
- <input type="radio" name="boolAdd" value="False" <%=strUseridEdit(0,3)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">删除/编辑(个人)</td>
- <td width="75%"><input name="boolDel" type="radio" value="True" <%=strUseridEdit(1,4)%>>
- 是
- <input type="radio" name="boolDel" value="False" <%=strUseridEdit(0,4)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">删除/编辑(全体)</td>
- <td width="75%"><input name="boolOrtherDel" type="radio" value="True" <%=strUseridEdit(1,5)%>>
- 是
- <input type="radio" name="boolOrtherDel" value="False" <%=strUseridEdit(0,5)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">批量操作</td>
- <td width="75%"><input name="boolAllDel" type="radio" value="True" <%=strUseridEdit(1,6)%>>
- 是
- <input type="radio" name="boolAllDel" value="False" <%=strUseridEdit(0,6)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td bgcolor="#FFFFFF">影片认证</td>
- <td><input name="boolTatt" type="radio" value="True" <%=strUseridEdit(1,7)%>>
- 是
- <input type="radio" name="boolTatt" value="False" <%=strUseridEdit(0,7)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td bgcolor="#FFFFFF">会员影片</td>
- <td><input name="boolMoney" type="radio" value="True" <%=strUseridEdit(1,8)%>>
- 是
- <input type="radio" name="boolMoney" value="False" <%=strUseridEdit(0,8)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">分类管理</td>
- <td width="75%"><input name="boolAllSort" type="radio" value="True" <%=strUseridEdit(1,9)%>>
- 是
- <input type="radio" name="boolAllSort" value="False" <%=strUseridEdit(0,9)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">选择分类</td>
- <td width="75%"><select name="strOneSmall" size="6" width=100% multiple>
- <%
- Set rs = Server.CreateObject("ADODB.Recordset")
- sql="select sort.id,sort.sort from sort"
- rs.open sql, conn,1,1
- if rs.eof then
- response.write("<option>--==没有分类==--</option>")
- else
- while not rs.eof
- strSort=rs("sort")
- Set rs1 = Server.CreateObject("ADODB.Recordset")
- sql1="select small.id,small.small,small.sortid from small where sortid='"&strSort&"'"
- rs1.open sql1, conn,1,1
- while not rs1.eof
- numSmallid=cint(rs1("id"))
- strSmall=rs1("small")
- if strUseridEdit(0,10)="0" then
- strAllSelected="selected"
- else
- if strUseridEdit(0,10)<>"" then
- strPurSort=Split(strUseridEdit(0,10),", ")
- for i= 0 to UBound(strPurSort)
- if numSmallid=cint(strPurSort(i)) then
- strSelected="selected"
- exit for
- else
- strSelected=""
- end if
- next
- end if
- end if
- response.write("<option "& strSelected &" value='"& rs1("id") &"'>"&strSmall&"("& strSort &")</option>")
- rs1.movenext
- wend
- rs1.close
- set rs1=nothing
- rs.movenext
- wend
- response.write("<option "& strAllSelected &" value='0'>★所有分类★</option>")
- end if
- rs.close
- set rs=nothing
- %>
- </select><br><br><font color=red>(按 Ctrl 键多选/取消选择,选取 <b>所有分类</b> 请清空其他分类选项)</font></td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">广告管理</td>
- <td width="75%"><input name="boolAD" type="radio" value="True" <%=strUseridEdit(1,11)%>>
- 是
- <input type="radio" name="boolAD" value="False" <%=strUseridEdit(0,11)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">系统设定</td>
- <td width="75%"><input name="boolConfig" type="radio" value="True" <%=strUseridEdit(1,12)%>>
- 是
- <input type="radio" name="boolConfig" value="False" <%=strUseridEdit(0,12)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">用户管理</td>
- <td width="75%"><input name="boolUser" type="radio" value="True" <%=strUseridEdit(1,13)%>>
- 是
- <input type="radio" name="boolUser" value="False" <%=strUseridEdit(0,13)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">评论管理</td>
- <td width="75%"><input name="boolReview" type="radio" value="True" <%=strUseridEdit(1,14)%>>
- 是
- <input type="radio" name="boolReview" value="False" <%=strUseridEdit(0,14)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">公告管理</td>
- <td width="75%"><input name="boolAff" type="radio" value="True" <%=strUseridEdit(1,15)%>>
- 是
- <input type="radio" name="boolAff" value="False" <%=strUseridEdit(0,15)%>>
- 否</td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td width="25%" bgcolor="#FFFFFF">友情连接</td>
- <td width="75%"><input name="boolLink" type="radio" value="True" <%=strUseridEdit(1,16)%>>
- 是
- <input type="radio" name="boolLink" value="False" <%=strUseridEdit(0,16)%>>
- 否</td>
- </tr>
- <tr align="center" bgcolor="#FFFFFF">
- <td colspan="2">
- <input type="submit" name="Submit" value="<%=strSubmit%>">
- </td>
- </tr>
- </table>
- </form>
- </table>
- </td>
- </tr>
- </table>
- <br><hr width=735>
- <center>