<!--#include file="utf-8.asp" -->
<!--#include file="js/Function.asp" -->
<!--#include file="../inc/MD5.asp" -->
<!--#include file="CheckAdmin.asp" -->
<!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 NAME="copyright" CONTENT="Copyright 2010-2012 - shuaiweb.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="js/admin.css" rel="stylesheet" type="text/css">
<title>管理员配置！</title>
<script language="JavaScript" src="js/admin.js" type="text/JavaScript"></script>
</head>

<body>
<%
'版权：世纪伟成(http://yidacms.com)
'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
'如果您删除了这里的版权信息,将追究法律责任.

		dim rs,sql
		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_vipadministrator WHERE id= "&request("id")&""
		rs.open sql,dbok,1,1
		admin_qx1 = rs("wait_ader")
		admin_aqx1 = rs("wait_adyi")

		if rs.bof and rs.eof then
		 response.write "读取数据库记录出错！"
		 response.end
		  else
		username=rs("username")
		password=rs("password")
        	id = rs("id")
		rs.close
		set rs=nothing 
		end if
		
		if request("shuaiweb")="add" Then 
		 if len(trim(request.Form("username")))<3 then
			 response.write ("<script language=javascript> alert('管理员账号必填且不能少于3个字符！');history.back(-1);</script>")
			 response.end
		 end if
		set rs=server.createobject("adodb.recordset")
		exec="select * from shuaiweb_vipadministrator WHERE id= "&request("id")&"" 
		rs.open exec,dbok,1,3
		
		if rs.bof and rs.eof then
		 response.write "读取数据库记录出错！"
		 response.end
		  else
		 if Request.Form("password")<>Request.Form("twopassword") then 
		 response.write "<script language=javascript> alert('两次输入的密码不一样！');history.back(-1);</script>"
		 response.end
		 end if
                 if request("shuaiweb_validation") <> validation  then
            	    response.write"<script language=javascript>alert('口令码错误，不能修改项目！');history.back(-1);</script>" 
		    response.end
           	end if 	
		rs("username")=request.form("username")
		if Request.Form("password")="" then
		 rs("password")=rs("password")
          		else
		 rs("password")=left(Md5(request.Form("password")),10)
       		 end if

                if admin_qx1 = 1 then
                 rs("wait_adyi") = "01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,"
		 		 rs("wait_ader")=1
                  else
		         rs("wait_adyi")=trim(request.form("wait_adyi1")) & trim(request.form("wait_adyi2")) &_
                                trim(request.form("wait_adyi3")) & trim(request.form("wait_adyi4")) & trim(request.form("wait_adyi5")) &_
                                trim(request.form("wait_adyi6")) & trim(request.form("wait_adyi7")) & trim(request.form("wait_adyi8")) &_
                                trim(request.form("wait_adyi9")) & trim(request.form("wait_adyi10")) & trim(request.form("wait_adyi11")) &_
                                trim(request.form("wait_adyi12")) & trim(request.form("wait_adyi13")) & trim(request.form("wait_adyi14")) &_
                                trim(request.form("wait_adyi15")) & trim(request.form("wait_adyi16")) & trim(request.form("wait_adyi17"))
		rs("wait_ader")=2
                end if
		rs.update
		rs.close
		set rs=nothing
		end if
                 if Request.Form("password") = "" then
				 response.write " <br />&nbsp;&nbsp;&nbsp;&nbsp;修改成功,管理密码没有修改！<a href='admin_admin.asp'>返回!</a></a>"
                 response.end
                	 else
		 		 response.write " <br />&nbsp;&nbsp;&nbsp;&nbsp;修改成功,管理密码已成功修改，请牢记[&nbsp;<font color='red'>"&trim(Request.Form("password"))&"</font>&nbsp;]！<a href='admin_admin.asp'>返回!</a>"
		 		 response.end
                 end if
		End If
		response.write " <table width=""98%"" height=""100%"" border=""0"" cellpadding=""10"" cellspacing=""0"" bordercolor=""#666666"" style=""border-collapse:collapse"" bgcolor=""#FFFFFF"" align=""center"">"&vbcrlf
                %>
		<form id="form1" name="form1" method="post" action="admin_adminedit.asp?shuaiweb=add&id=<%=id%>">
                <%
		response.write "   <tr>"&vbcrlf
		response.write "     <td class=""center"" onMouseOver=""this.id='aa'"" onMouseOut=""this.id='bb'"" class=""cc"">管理员账号<br /><input name=""username"" type=""text"" id=""username"" value="""&username&""" class=""win""/></td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "   <tr>"&vbcrlf
		response.write "     <td class=""center"" onMouseOver=""this.id='aa'"" onMouseOut=""this.id='bb'"" class=""cc"">输入新密码<br /><input name=""password"" type=""password"" id=""password"" class=""win"" onkeyup=""chkpwd(this)"" />(不想修改密码则留空)</td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "   <tr>"&vbcrlf
		response.write "     <td ><div id=""chkResult""></div></td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "   <tr>"&vbcrlf
		response.write "     <td class=""center"" onMouseOver=""this.id='aa'"" onMouseOut=""this.id='bb'"" class=""cc"">确认新密码<br /><input name=""twopassword"" type=""password"" id=""twopassword"" class=""win""/>(不想修改密码则留空)</td>"&vbcrlf
		response.write "   </tr>"&vbcrlf 
                 if admin_qx1 = 1 then
                %>
			<tr>
			  <td width="650" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">操作权限<br />
                            <font color="red">超级管理员权限不可更改!</font>
                        </td>
			</tr>
                <%else%>
			<tr>
			  <td width="650" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">操作权限<br />
		          <input name="wait_adyi1" type="checkbox" value="01," <%if Instr(admin_aqx1,"01,")>0 then response.write ("checked")%>>&nbsp;网站基本设置&nbsp;
		          <input name="wait_adyi2" type="checkbox" value="02," <%if Instr(admin_aqx1,"02,")>0 then response.write ("checked")%>>&nbsp;网站导航设置&nbsp;
		          <input name="wait_adyi3" type="checkbox" value="03," <%if Instr(admin_aqx1,"03,")>0 then response.write ("checked")%>>&nbsp;单页管理&nbsp;
		          <input name="wait_adyi4" type="checkbox" value="04," <%if Instr(admin_aqx1,"04,")>0 then response.write ("checked")%>>&nbsp;订单管理&nbsp;
		          <input name="wait_adyi5" type="checkbox" value="05," <%if Instr(admin_aqx1,"05,")>0 then response.write ("checked")%>>&nbsp;留言管理&nbsp;
		          <input name="wait_adyi6" type="checkbox" value="06," <%if Instr(admin_aqx1,"06,")>0 then response.write ("checked")%>>&nbsp;友情链接管理&nbsp;
                          <br />
		          <input name="wait_adyi7" type="checkbox" value="07," <%if Instr(admin_aqx1,"07,")>0 then response.write ("checked")%>>&nbsp;FLASH设置&nbsp;
		          <input name="wait_adyi8" type="checkbox" value="08," <%if Instr(admin_aqx1,"08,")>0 then response.write ("checked")%>>&nbsp;QQ客服设置&nbsp;
		          <input name="wait_adyi9" type="checkbox" value="09," <%if Instr(admin_aqx1,"09,")>0 then response.write ("checked")%>>&nbsp;注册会员管理&nbsp;
		          <input name="wait_adyi10" type="checkbox" value="10," <%if Instr(admin_aqx1,"10,")>0 then response.write ("checked")%>>&nbsp;新闻栏目管理&nbsp;
		          <input name="wait_adyi11" type="checkbox" value="11," <%if Instr(admin_aqx1,"11,")>0 then response.write ("checked")%>>&nbsp;新闻添加/删除&nbsp;
                          <br />
		          <input name="wait_adyi12" type="checkbox" value="12," <%if Instr(admin_aqx1,"12,")>0 then response.write ("checked")%>>&nbsp;产品栏目管理&nbsp;
		          <input name="wait_adyi13" type="checkbox" value="13," <%if Instr(admin_aqx1,"13,")>0 then response.write ("checked")%>>&nbsp;产品添加/删除&nbsp;
		          <input name="wait_adyi14" type="checkbox" value="14," <%if Instr(admin_aqx1,"14,")>0 then response.write ("checked")%>>&nbsp;视频栏目管理&nbsp;
		          <input name="wait_adyi15" type="checkbox" value="15," <%if Instr(admin_aqx1,"15,")>0 then response.write ("checked")%>>&nbsp;视频添加/删除&nbsp;
                          <br />
		          <input name="wait_adyi16" type="checkbox" value="16," <%if Instr(admin_aqx1,"16,")>0 then response.write ("checked")%>>&nbsp;DIV+CSS 在线生成&nbsp;
		          <input name="wait_adyi17" type="checkbox" value="17," <%if Instr(admin_aqx1,"17,")>0 then response.write ("checked")%>>&nbsp;标签应用&nbsp;
                        </td>
			</tr>
<%
                end if
		response.write "   <tr>"&vbcrlf            
		response.write "     <td onMouseOver=""this.id='aa'"" onMouseOut=""this.id='bb'"" class=""cc""><font color=red>*</font> 口令码<br /><input name=""shuaiweb_validation"" id=""shuaiweb_validation"" type=""password"" class=""win3""></td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
                if validation = 12345 then 
					response.write "     <tr><td><div class=""admintitlebg""><font color=red>口令码默认是 12345 为了安全请及时修改</font></div></td></tr>"&vbcrlf
                		else
					response.write ""&vbcrlf
                end if
		response.write "   <tr>"&vbcrlf
		response.write "     <td><input type=""submit"" name=""Submit"" value=""修 改"" class=""inanniu""/> <input type=button onclick=""window.location.href('admin_admin.asp')"" value=""返 回"" class=""inanniu""></td>"&vbcrlf
		response.write "   </tr>"&vbcrlf
		response.write "   </form>"&vbcrlf
		response.write " </table>"&vbcrlf
%>
</body>
</html>
