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

📄 admin_cityuser.asp

📁 这是去年开发的中移鼎讯手机进销存系统 大家
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="../inc/ChkPurview.asp"-->
<%
dim iCount,Action
Action=Trim(request("Action"))
if GetUserGPower<>999 then '市级用户
	Call  Msg("您没有权限",1,"")
End if
%>
<html>
<head>
<title>市级用户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/mobile_sale.css" rel="stylesheet" type="text/css">
<SCRIPT language=javascript>
function unselectall()
{
    if(document.myform.chkAll.checked){
	document.myform.chkAll.checked = document.myform.chkAll.checked&0;
    } 	
}

function CheckAll(form)
{
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll"&&e.disabled!=true)
       e.checked = form.chkAll.checked;
    }
}

function CheckAdd()
{
  if(document.form1.username.value=="")
    {
      alert("用户名不能为空!");
	  document.form1.username.focus();
      return false;
    }
    
  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;
    }
  if (document.form1.Purview[1].checked==true){
	GetClassPurview();
  }
}
function CheckModifyPwd()
{
  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;
    }
}

function CheckModifyPurview()
{
  if (document.form1.Purview[1].checked==true){
	GetClassPurview();
  }
}



</script>

</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="topbg"> 
    <td height="22" colspan="2" align="center"><strong>用 户 管 理</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="70" height="30"><strong>管理导航:</strong></td>
    <td height="30"><a href="Admin_CityUser.asp">用户首页</a>&nbsp;|&nbsp;
<%
	Dim Rst,Sqlt,k
	if GetUserGPower=999 then	
		Response.write ("<font color=""#0000FF"">查看各县用户:</font>")
		Sqlt = "Select County.*,City.* from County Inner join City on City.CityID=County.CityID where City.CityID='"&cstr(GetCityID)&"' order by County.CountyID asc;"
		Call sql_open(Rst,Sqlt,Conn,1,1)
		for k=0 to Rst.Recordcount
			Response.write "<a href=Admin_CityUser.asp?CityID="&Rst("CityID")&"&CountyID="&Rst("CountyID")&">"&Rst("CountyName")&"</a>&nbsp;"
			Rst.movenext
			If Rst.eof then Exit For
		Next
		Call Rs_End(Rst)
	end if	
	%>
	
	</td>
  </tr>
</table>
<%

if Action="Add" then
	call AddAdmin()
elseif Action="SaveAdd" then
	call SaveAdd()
elseif Action="ModifyPwd" then
	call ModifyPwd()
elseif Action="SaveModifyPwd" then
	call SaveModifyPwd()
elseif Action="CheckList" then		'审核
	call CheckList()
elseif Action="Del" then
	call DelAdmin()
else
	call main()
end if
Call Conn_End(conn)



sub main()
	Dim CityID,CountyID
	CityID = Request("CityID")
	CountyID = Request("CountyID")
'//////////////////////////////////////////////////////
	if CountyID <>"" then
		Sql = "select T_User.*,T_UserGroup.* from T_User Inner join T_UserGroup on T_UserGroup.UserGID=T_User.UserGID where T_User.CityID='"&cstr(GetCityID)&"' and CountyID='"&cstr(CountyID)&"' order by T_User.UserID desc;"
	else
		Sql = "select T_User.*,T_UserGroup.* from T_User Inner join T_UserGroup on T_UserGroup.UserGID=T_User.UserGID where T_User.CityID='"&cstr(GetCityID)&"' and CountyID=0 order by T_User.UserID desc;"
	end if
	
'//////////////////////////////////////////////////////
	Call sql_open(Rs,Sql,Conn,1,1)
	iCount=Rs.recordcount
%>
<br>
<table width='100%' border="0" cellpadding="0" cellspacing="0">
  <tr>
  <form name="myform" method="Post" action="Admin_CityUser.asp" onsubmit="return confirm('确定要删除选中的用户吗?');">
     <td>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr align="center" class="title">
    <td height="22">组</td>
    <td>公司名</td>
    <td>用户名</td>
    <td>姓名</td>
    <td>电话</td>
    <td>状态</td>
    <td>操作</td>
    </tr>
  <%do while not Rs.EOF %>
  <tr align="center" class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
    <td>
	<%
	if Rs("UserGID")=8 and Rs("CountyID")=0 then
		Response.write "<font color='#0000FF'>市</font>分销点"
	elseif Rs("UserGID")=8 then
		Response.write "<font color='#0000FF'>县</font>分销点"
	else
		response.write rs("UserGName")
	end if
	
	%></td>
    <td><%=rs("UserUnit")%></td>
    <td><a href="mailto:<%=Rs("UserEmail")%>"><%=rs("UserName")%></a></td>
    <td><%=rs("UserTrueName")%></td>
    <td><%=rs("UserTEL")%></td>
    <td><%
	if Rs("UserIsCheck")=0 then
		Response.write "<font color=""#FF0000"">未审核</font>"
	else
		Response.write "已审核"
	end if
	%></td>
    <td>
	<a href="ShowUser.asp?id=<%=Rs("UserID")%>">查看</A>
	
	<%
'	if Rs("UserGID")<>8 then
'		response.write "<a href=""Admin_CityUser.asp?Action=ModifyPwd&id="&Rs("UserID")&""">修改权限</a> | "
'	end if
	Response.write " | <a href=""Admin_CityUser.asp?Action=CheckList&CountyID="&Rs("CountyID")&"&id="&Rs("UserID")&""">"
	if Rs("UserIsCheck")=0 then 
		Response.write "审核"
	else
		Response.write "取消"
	end if
	Response.Write "</a>"
	if trim(Rs("UserID"))<>trim(Session("UserID")) then
		Response.Write " | <a href=""Admin_CityUser.asp?Action=Del&CountyID="&Rs("CountyID")&"&id="&Rs("UserID")&""" onClick=""return confirm('确定要删除吗?此项操作将无法恢复!');"">删除</A>"
	end if
	%>
	
	</td>
    </tr>
  <%
		Rs.MoveNext
	Loop
  %>
</table>  
     </td>
  </form></tr></table>
<%
	Call Rs_End(Rs)
end sub

sub AddAdmin()
%>
<Script>
function showadv(){

if (document.myform.UserGID.value == 6) {
	CountyArea.style.display = "none";
//	bot.style.display = "";
}
if (document.myform.UserGID.value == 7) {
	CountyArea.style.display = "";
//	bot.style.display = "";	
}
if (document.myform.UserGID.value == 8) {
	CountyArea.style.display = "none";
//	bot.style.display = "none";
}
}
</Script>
<form method="post" action="Admin_CityUser.asp" name="myform" 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"><strong> 用 户 名:</strong></td>
      <td width="65%" class="tdbg"><input name="UserName" type="text"></td>
    </tr>
    <tr class="tdbg"> 
      <td width="35%" class="tdbg"><strong> 初始密码: </strong></td>
      <td width="65%" class="tdbg"><input name="Password" type="password" id="Password"></td>
    </tr>
    <tr class="tdbg"> 
      <td width="35%" class="tdbg"><strong> 确认密码:</strong></td>
      <td width="65%" class="tdbg"><input name="PwdConfirm" type="password" id="PwdConfirm"></td>
    </tr>
    <tr class="tdbg">
      <td class="tdbg"><strong>真实姓名:</strong></td>
      <td class="tdbg"><input name="UserTrueName" type="text" id="UserTrueName"></td>
    </tr>
    <tr class="tdbg">
      <td class="tdbg"><strong>组:</strong></td>
      <td class="tdbg"><select name="UserGID" id="UserGID" onChange="showadv()">
        <%Call Opt_M("T_UserGroup","UserGID","UserGName",GetUserGID,"UserGID>='"&Cstr(GetUserGID)&"'",0)%>
      </select></td>
    </tr>
    <tr class="tdbg" id=CountyArea
	<%
	if GetUserGPower=999 then
		Response.write "style=""DISPLAY : none"""
	end if
	%>>
      <td class="tdbg"><strong>县:</strong></td>
      <td class="tdbg"><select name="CountyID" id="CountyID">
        <%Call Opt_M("County","CountyID","CountyName","","CityID='"&Cstr(GetCityID)&"'",0)%>
      </select>
	  </td>
    </tr>
    <tr class="tdbg">
      <td class="tdbg"><strong>单位名称:</strong></td>
      <td class="tdbg"><input name="UserUnit" type="text" id="UserUnit"></td>
    </tr>	

⌨️ 快捷键说明

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