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

📄 usermodify.asp

📁 天创商务网客户资源管理系统 v1,asp+Access,iis5
💻 ASP
字号:
<!--#include file = include.asp-->
<%
  UserType=request.querystring("UserType")
  if UserType="" then response.redirect"UserManage.asp"
  if request.querystring("ID")="" then response.redirect"UserManage.asp"
  if UserType="总编辑" then
    Purview2=""""
  else
    Purview2="none"
  end if
  if UserType="录入员" then
    Purview3=""""
  else
    Purview3="none"
  end if
  set rs=Server.CreateObject("adodb.recordset")
  sql="select * from UserManage Where ID="&request.querystring("ID")
  rs.open sql,conn,1,1
  SystemSet=rs("SystemSet")
  CategoryName=rs("Class")
  

  set CheckUser = server.createobject("adodb.recordset")
  sql = "select * from UserManage where UserName='"&Name&"' and password='"&PassWord&"'"
  CheckUser.open sql,conn,1,1
  Purview=CheckUser("purview")  
    select case Purview
    case "管理员"
    case "总编辑"
      result="Class=InputStyle Disabled"
    case "录入员"
	  if CheckUser("ModPas") then
	    result="Class=InputStyle Disabled" 
	  else
         response.redirect"error.asp?msg=修改密码"
	  end if
    end select     
%>
<body background="images/BLogo.gif">
<form name=form1 method=post action="UserSave.asp">
  <table width="312" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#4397c5">
    <tr bgcolor="#FFFFFF"> 
    <td colspan="3" width="100%" height="25">
	<!--#include file = topMenu.htm--></td>
  </tr>
  <tr bgcolor="#FFFFFF" valign="middle" align="center"> 
    <td height="2" colspan="3" background="images/BLogo.gif">
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#F5F5F5">
          <tr bgcolor="#FFFFFF"> 
            <td height=20 width="33%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>用户名:</td>
            <td height=20 colspan="5" width="67%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';> 
              <input type="hidden" name="Name" value=<%=rs("UserName")%>><%=rs("UserName")%>
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height=20 width="33%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>密码:</td>
            <td height=20 colspan="5" width="67%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; > 
              <input type="Password" name="Password" size=14>不修改密码请留空
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height=60 width="33%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; rowspan="3">类型: 
            </td>
            <td height=2 colspan="5" width="67%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; > 
              <input ID=Purview1 type="radio" name="Purview" value="管理员" onclick=CheckPurview() <%if UserType="管理员" then response.write "checked"%> >
              管理员 </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height=20 colspan="5" width="67%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; > 
              <input ID=Purview2 type="radio" name="Purview" value="总编辑"onclick=CheckPurview() <%if UserType="总编辑" then response.write "checked"%>> 
              总编辑</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height=20 colspan="5" width="67%" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; > 
              <input ID=Purview3 type="radio" name="Purview" value="录入员" onclick=CheckPurview() <%if UserType="录入员" then response.write "checked"%> >
              录入员 </td>
          </tr>
          <tr bgcolor="#FFFFFF" align="center">
            <td height=20 colspan=6 onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>
              <table width="100%" border="0" cellspacing="0" cellpadding="1" id=Purview2 style="DISPLAY: <%=Purview2%>">
                <tr> 
                  <td width="25%">权限分配 :</td>
                  <td width="75%">
                    <input type=checkbox name=SystemSet value=Category <%if instr(1,SystemSet,"Category")>0 then response.write "checked"%>> 可以添加、删除、修改栏目<br>  
					<input type=checkbox name=SystemSet value=SetRecycle <%if instr(1,SystemSet,"SetRecycle")>0 then response.write "checked"%>> 可以删除回收站的商务信息<br>
                  </td>
                </tr>
              </table>
              <table width="100%" border="0" cellspacing="0" cellpadding="0" id=Purview3 style="DISPLAY: <%=Purview3%>">
                <tr>
                  <td width="37%">指定录入栏目:</td>
                  <td width="63%">
				  <%
                    set rs1=conn.execute("select * from SmallClass Order by id Desc")					
                    while not rs1.eof
                  %> 
                    <input type=checkbox name=Class value="<%=rs1("SmallClass")%>" <%if instr(1,CategoryName,rs1("SmallClass"))>0 then response.write " checked"%>> <%=rs1("SmallClass")%><br>
                  <%
                    rs1.movenext
                    wend
                    rs1.close
                    set rs1=nothing
                  %>
                  </td>
                </tr>
                <tr align="center">
                  <td colspan=2>
                    <input type=checkbox name=ModPas value=true <%if rs("ModPas") then response.write "checked"%>>
                    <font color="#FF0000">录入员是否能修改密吗?</font>
					</td>
                </tr>
              </table>
            </td>
          </tr>
          <tr bgcolor="#FFFFFF" align="center">
            <td height=20 colspan=6 onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><b> 
              </b> &nbsp;&nbsp;&nbsp;&nbsp; 
              <input type=hidden value=MODIFY name=operation>
              <input type=hidden value=<%=request.querystring("ID")%> name=ID>
              <input type=submit value=" 修 改 " onclick="return reset1()">
            </td>
          </tr>
        </table>
    </td>
  </tr>
</table>
</form>
</body>
</html>
<script>
function CheckPurview(){
if (document.form1.Purview2.checked == true) {
        Purview2.style.display = "";

}else{
        Purview2.style.display = "none";

}

if (document.form1.Purview3.checked == true) {
        Purview3.style.display = "";

}else{
        Purview3.style.display = "none";

}
}
</script>

⌨️ 快捷键说明

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