<!--#include file="conn.asp" -->
<% adm_power_page=3 '分配本页的用户访问权限 %>
<!--#include file="admin_dn.asp" -->
<% 
function l_checked(ch1,ch2)

if instr(ch1,ch2)=0 then
l_checked=""
else
l_checked="checked"
end if

end function

if Trim(Request.QueryString("w"))="save" then

adm_ll=""
 for i=1 to Request.Form("ll").count
 adm_ll=adm_ll&Request.Form("ll")(i)
 next
 rs.open "select * from news where id="&request("id"),conn,2,3

 rs("title")=Trim(Request.Form("title"))
 rs("name")=Trim(Request("name"))
 body=replace(request("body"),vbcrlf,"<br>")
 rs("body")=body
 rs("ll")=adm_ll
 rs("dat")=date
 rs.update
 rs.close
 ms="["&Trim(Request.Form("ll"))&"]　修改成功........."
 
 end if 


rs.open "select * from news where id="&request("id"),conn,1,1
if rs.eof then
Response.Write("参数有错...")
response.end
end if
llt=rs("ll")
if llt="首页公告" then
 llb1="selected"
else
 llb2="selected"
end if
 %>
<!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" rel="stylesheet" type="text/css">
</head>

<body leftmargin="2" topmargin="0">
<p><a href="adm_1.asp" target="mainFrame"><strong>新闻公告 修改</strong></a></p>
<p>&nbsp;</p>
<form name="form1" method="post" action="adm_1_edit.asp?w=save">
  <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="133"><div align="right">新增公告</div></td>
      <td width="594"> </td>
    </tr>
    <tr> 
      <td height="26">公告标题:</td>
      <td><input name="title" type="text" id="title" value="<%=rs("title")%>">
        <input name="id" type="hidden" id="id" value="<%=request("id")%>"> </td>
    </tr>
    <tr> 
      <td height="26">发 布 者:</td>
      <td><input name="name" type="text" id="name" value="<%=rs("name")%>"></td>
    </tr>
    <tr>
      <td height="26">显示栏目:</td>
	  
      <td><table width="77%" border="0" cellpadding="0" cellspacing="2">
          <tr> 
            <td width="6%"> <div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="0" <%=l_checked(rs("ll"),0)  %> >
              </div></td>
            <td width="26%">首页新闻</td>
            <td width="8%"> <div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="1" <%=l_checked(rs("ll"),1)  %>>
              </div></td>
            <td width="27%">首页公告</td>
            <td width="8%"> <div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="2" <%=l_checked(rs("ll"),2)  %>>
              </div></td>
            <td width="25%">域名注册</td>
          </tr>
          <tr> 
            <td height="17"><div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="3" <%=l_checked(rs("ll"),3)  %>>
              </div></td>
            <td>虚拟主机</td>
            <td><div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="4" <%=l_checked(rs("ll"),4)  %>>
              </div></td>
            <td>主机租用</td>
            <td><div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="5" <%=l_checked(rs("ll"),5)  %>>
              </div></td>
            <td>网站开发</td>
          </tr>
          <tr> 
            <td><div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="6" <%=l_checked(rs("ll"),6)  %>>
              </div></td>
            <td>企业邮局</td>
            <td><div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="7" <%=l_checked(rs("ll"),7)  %>>
              </div></td>
            <td>网站推广</td>
            <td><div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="8" <%=l_checked(rs("ll"),8)  %>>
              </div></td>
            <td>代理中心</td>
          </tr>
          <tr> 
            <td><div align="center"> 
                <input name="ll" type="checkbox" class="unnamed1" id="ll" value="9" <%=l_checked(rs("ll"),9)  %>>
              </div></td>
            <td>支付方式</td>
            <td><div align="center"></div></td>
            <td>&nbsp;</td>
            <td><div align="center"></div></td>
            <td>&nbsp;</td>
          </tr>
        </table> </td>
    </tr>
    <tr> 
      <td height="153">公告内容:</td>
      <td><textarea name="body" cols="40" rows="10" id="body"><%=rs("body")%></textarea>
        支持html &lt;br&gt;表示一个换行</td>
    </tr>
    <tr> 
      <td height="26">&nbsp;</td>
      <td><input type="submit" name="Submit" value="确定发表"></td>
    </tr>
  </table>
</form>
<p>&nbsp;</p>
<p align="center"><font color="#FF0000"><%= ms  %></font> </p>
</body>
</html>
