<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<%dim action,id,d114name
id=request.QueryString("id")
action=request.querystring("action")
d114name=trim(request("114name"))
select case action
case "add" 
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from jle_dushi114",conn,1,3
rs.AddNew
rs("114name")=d114name
rs("114tel")=trim(request("114tel"))
rs.Update
rs.Close
set rs=nothing

case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from jle_dushi114 where id="&id,conn,1,3
rs("114name")=d114name
rs("114tel")=trim(request("114tel"))
rs.Update
rs.Close
set rs=nothing

case "del"
conn.execute ("delete from jle_dushi114 where id="&id)
conn.close   
set conn=nothing 
response.Redirect "dushi114.asp"
end select
%>
<html>
<head>
<title>114竞价广告管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #E7EEF5;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<body>
<table width="90%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
  <tr> 
    <td height="20" bgcolor="#C5D5E4" align="center"><span style="color: #FF0000"><strong><font style="font-size:14px"> 114竞价广告  管 理</font></strong></span></td>
  </tr>
  <tr> 
    <td bgcolor="#EAEEF4"> <br>
	<table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
        <tr align="center" bgcolor="#FFFFFF" height="20"> 
          <td width="30" bgcolor="#D9E4EE">编号</td>
          <td bgcolor="#D9E4EE">114竞价广告</td>
          <td bgcolor="#D9E4EE">联系方式</td>
          <td bgcolor="#D9E4EE">管理操作</td>
        </tr>
        <%set rs=server.CreateObject("adodb.recordset")
		  rs.Open "select * from jle_dushi114 order by id",conn,1,1
		  dim follows
		  if rs.EOF and rs.BOF then
          response.write"<tr bgcolor=#FFFFFF><td colspan='4'><p align='center'><font color='red'>暂无服务电话！</font></td></tr></table><br>"
		  follows=0
		  else
		  do while not rs.EOF
		  i=i+1
		  %>
        <form name="form1" method="post" action="?action=edit&id=<%=int(rs("id"))%>">
          <tr bgcolor="#FFFFFF" align="center">
		  <td bgcolor="#F4F7F9"><%=i%></td>
		  
            <td><input name="114name" type="text" id="bmname" value="<%=trim(rs("114name"))%>" size="32"></td>
            <td><input name="114tel" type="text" id="link" value="<%=trim(rs("114tel"))%>" size="30"></td>
            <td bgcolor="#F4F7F9"><input type="submit" name="Submit" value="修 改">
                &nbsp; <input type="button" name="DEL" onClick="{if(confirm('确定要删除这个便民服务吗？\n此操作不可以恢复！')){location.href='?id=<%=rs("id")%>&action=del';}return false;}" value="删除" >            </td>
          </tr>
        </form>
        <%
		rs.MoveNext
          loop
          follows=rs.RecordCount
          end if%>
      </table>
	<br></td>
  </tr>
</table>
<br>
<table width="90%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
  <tr> 
    <td height="20" bgcolor="#C5D5E4" align="center"><span style="color: #FF0000"><strong><font style="font-size:14px">添 加 114 竞 价 广 告</font></strong></span></td>
  </tr>
  <tr> 
    <td bgcolor="#EAEEF4">
	<br>
	<table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
        <tr align="center" bgcolor="#FFFFFF" height="20"> 
          <td width="30" bgcolor="#D9E4EE">编号 </td>
          <td bgcolor="#D9E4EE">114竞价广告</td>
          <td bgcolor="#D9E4EE">联系方式</td>
          <td bgcolor="#D9E4EE">确定操作</td>
        </tr>
        <form name="form1" method="post" action="?action=add">
          <tr align="center" bgcolor="#FFFFFF"> 
            <td bgcolor="#F4F7F9"><%=rs.RecordCount+1%></td>
	        <td bgcolor="#F4F7F9"><input name="114name" type="text" id="114name" size="32"></td>
	        <td bgcolor="#F4F7F9"><input name="114tel" type="text" id="114tel" size="30"></td>
	        <td bgcolor="#F4F7F9"><input type="submit" name="Submit3" value="添 加"></td>
          </tr>
        </form>
      </table>
	<br></td>
  </tr>
</table>
</body> 
</html> 