?? admin_cityuser.asp
字號(hào):
<!--#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 '市級(jí)用戶(hù)
Call Msg("您沒(méi)有權(quán)限",1,"")
End if
%>
<html>
<head>
<title>市級(jí)用戶(hù)</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("用戶(hù)名不能為空!");
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("初始密碼與確認(rèn)密碼不同!");
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("初始密碼與確認(rèn)密碼不同!");
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>用 戶(hù) 管 理</strong></td>
</tr>
<tr class="tdbg">
<td width="70" height="30"><strong>管理導(dǎo)航:</strong></td>
<td height="30"><a href="Admin_CityUser.asp">用戶(hù)首頁(yè)</a> |
<%
Dim Rst,Sqlt,k
if GetUserGPower=999 then
Response.write ("<font color=""#0000FF"">查看各縣用戶(hù):</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> "
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('確定要?jiǎng)h除選中的用戶(hù)嗎?');">
<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>用戶(hù)名</td>
<td>姓名</td>
<td>電話(huà)</td>
<td>狀態(tài)</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>分銷(xiāo)點(diǎn)"
elseif Rs("UserGID")=8 then
Response.write "<font color='#0000FF'>縣</font>分銷(xiāo)點(diǎn)"
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")&""">修改權(quán)限</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('確定要?jiǎng)h除嗎?此項(xiàng)操作將無(wú)法恢復(fù)!');"">刪除</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>新 增 用 戶(hù)</strong></div></td>
</tr>
<tr class="tdbg">
<td width="35%" class="tdbg"><strong> 用 戶(hù) 名:</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> 確認(rèn)密碼:</strong></td>
<td width="65%" class="tdbg"><input name="PwdConfirm" type="password" id="PwdConfirm"></td>
</tr>
<tr class="tdbg">
<td class="tdbg"><strong>真實(shí)姓名:</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>單位名稱(chēng):</strong></td>
<td class="tdbg"><input name="UserUnit" type="text" id="UserUnit"></td>
</tr>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -