<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Include/Class_Pass.asp" -->
<!--#include file="Web_Session.asp" -->
<% 
Dim Action,Param
Dim TypeId,TypeName,News
'//检测是否跨站
Call Check_url()
'//获取分站参数
Dim c_City,c_Name
If Session("c_City") = "" Then 
 Response.Redirect "Web_Login.asp"
 Response.End()
End if
c_City = Session("c_City")
c_Name = Session("c_Name")

Action = Replace_text(request("action"))
Param  = Replace_text(request("param"))

Select Case Action
 Case "add"
  Call Edit_Submit() '//跳转到编辑函数
End Select

SQL = "Select SupperName From [pH_Web_City] Where Cityid="&c_City
Set Rs = Conn.Execute(SQL)
 SupperName = Rs("SupperName")
Rs.Close
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻类别</title>
<link href="../CSS/Css.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="5"></td>
  </tr>
  <tr> 
    <td height="25" background="Images/top11_bg.jpg" style="padding-top:3px;">&nbsp;<font color="#FFFFFF">■ 
      <strong>管理员管理</strong></font></td>
  </tr>
  <tr>
    <td height="10"></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr> 
    <td align="left">

	<table width="50%" border="0" align="left" cellpadding="0" cellspacing="1" bgcolor="#A5B6CC">
        <tr> 
          <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
              <form action="?action=add" method="post" name="add" onSubmit="return add_check();">
                <script language="JavaScript">
			   function add_check()
			   {
			    
				if(document.add.suppername.value=="")
				{
				  alert("地区管理员名称不能为空！");
				  document.add.suppername.focus();
				  return false;
				}
				
			   }
			  </script>
                <tr bgcolor="#f5f5f5"> 
                  <td width="100" height="25" align="right" bgcolor="#f5f5f5">地区管理员：</td>
                  <td bgcolor="#f5f5f5"><input name="suppername" type="text" id="e_city3" style="width:160px;" value="<%= suppername %>"></td>
                </tr>
                <tr bgcolor="#f5f5f5"> 
                  <td width="100" height="25" align="right" bgcolor="#f5f5f5">管理密码：</td>
                  <td bgcolor="#f5f5f5"><input name="password" type="password" id="e_city4" style="width:160px;">
                    (不修改请保持为空)</td>
                </tr>
                <tr bgcolor="#f5f5f5"> 
                  <td width="100" height="25" align="right" bgcolor="#f5f5f5">&nbsp;</td>
                  <td bgcolor="#f5f5f5"><input type="submit" name="Submit" value="保 存">
                    <input name="cityid" type="hidden" id="cityid" value="<%= c_City %>"></td>
                </tr>
              </form>
            </table></td>
        </tr>
      </table></td>
</tr>
</table>
</body>
</html>
<% 
Sub Edit_Submit()
 Dim Rs
 
 Cityid		 = Replace_text(request("cityid"))
 SupperName  = Replace_text(request("SupperName"))
 Password    = Replace_text(request("Password"))
 
 '//检测是否输入类别名称
 If SupperName="" Then
  Response.write "必须输入管理员名称！"
  Response.End()
 End if
 
 '//修改记录
 If Password <> "" Then
  Password = Md5(Password)
  Conn.Execute("Update [pH_Web_City] Set Suppername='"&Suppername&"',Password='"&Password&"' Where Cityid="&Cityid)
 Else
  Conn.Execute("Update [pH_Web_City] Set Suppername='"&Suppername&"'  Where Cityid="&Cityid)
 End if

 Call CloseDB
 Response.write "编辑成功！"
 Response.write "<meta http-equiv=refresh content=""1;URL=Web_Master_Manage.asp"">" 
 Response.End()
End Sub

 %>
