addguuang.asp
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:9k
源码类别:

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="security.asp"-->
  2. <%if session("flag")>1 then
  3.     response.write "<script>alert('您的操作权限不够!');history.back();</script>"
  4.     response.end
  5. end if
  6. %>
  7. <!--#include file="../checkpost.asp"-->
  8. <html>
  9. <head>
  10. <title></title>
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  12. <link rel="stylesheet" type="text/css" href="inc/Admin_STYLE.CSS">
  13. <style type="text/css">
  14. <!--
  15. body {
  16. background-color: #FFFFFF;
  17. }
  18. .样式1 {
  19. color: #000000;
  20. font-weight: bold;
  21. }
  22. .样式2 {color: #000000}
  23. .样式3 {color: #FF0000}
  24. -->
  25. </style></head>
  26. <body>
  27. <!--#include file="conn1.asp"-->
  28. <%
  29. if trim(request("ccc22"))="add" then %>
  30. <%
  31.  set rs=server.createobject("adodb.recordset")
  32. sql="SELECT * from gg  "
  33.   
  34.       rs.open sql,conn,1,3 
  35.   rs.addnew
  36.   
  37. rs("gjie")=nnoo(request("gjie"))
  38. rs("gw")=nnoo(request("gw"))
  39. rs("gh")=nnoo(request("gh"))
  40. rs("gglei")=nnoo(request("gglei"))
  41. rs("ggri")=nnoo(request("ggri"))
  42. rs("ggok")=nnoo(request("ggok"))
  43. rs("ggjia")=nnoo(request("ggjia"))
  44. rs("ggimg")=request("ggimg")
  45. rs("ggurl")=request("ggurl")
  46. rs.update
  47. rs.close
  48. Response.Write "<script Language=Javascript>alert('添加完毕');location.href = 'addguuang.asp';</script>"
  49. response.end
  50.  end if %><%
  51.  if request("del")="ok" then
  52.  conn.execute("delete from gg where ggid="&nnoo(request("id"))&"")
  53.  Response.Write "<script Language=Javascript>alert('删除完毕');location.href = 'addguuang.asp';</script>"
  54. response.end
  55.  end if %>
  56. <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  57.   <tr> 
  58.     <td colspan="3">&nbsp;  </td>
  59.   </tr>
  60.   <tr> 
  61.     <td width="18">&nbsp;</td>
  62.     <td>&nbsp;
  63.       <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  64.         <tr> 
  65.     <td> 
  66.       <table width="100%" border="0" cellspacing="0" cellpadding="0">
  67.         <tr> 
  68.           <td background="../images/back_3.gif" rowspan="2"> 
  69.             <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
  70.               <tr> 
  71.                 <td class="12v" > 
  72.                   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="96" width="100%">
  73.                     <tr> 
  74.                       <td> 
  75.                         <table class="border" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  76.   <tr class="title"> 
  77.                             <td height="22" bgcolor="#FFFFFF" class="title"><div align="center" class="样式1">广告位添加</div></td>
  78.                           </tr>
  79.                           <tr> 
  80.                             <td height="177" valign="top" class="tdbg"><div align="center"></div>
  81.                               <form name="form1" method="post" action="?ccc22=add">
  82.                                 <table width="100%" border="0" cellspacing="0" cellpadding="0" height="164">
  83.                                   <tr> 
  84.                                     <td rowspan="2"><div align="center">广告说明</div></td>
  85.                                     <td width="73%" height="44"> 
  86.                                    
  87.                                       <input name="gjie" type="text" id="gjie" size="50">                                    </td>
  88.                                   </tr>
  89.                                   <tr>                                  </tr>
  90.                                   <tr> 
  91.                                     <td width="27%" height="52"><div align="center"></div></td>
  92.                                     <td width="73%" height="52">长度 <input name="gw" type="text" id="gw" size="7">
  93.                                       宽度 
  94.                                       <input name="gh" type="text" id="gh" size="7"> 
  95.                                       <br>
  96.                                       广告位置: 
  97.                                       <select name="gglei" id="gglei">
  98.                                         <option value="0">首页广告</option>
  99. <option value="1">分类内广告</option>
  100.                                         <option value="2">点播页广告</option>
  101.                                         <option value="3">广告版点播页1</option>
  102.  <option value="4">广告版点播页2</option>
  103.  <option value="5">广告版点播页3</option>
  104.                                         <option value="6">其他位置</option>
  105.                                        
  106.                                       </select></td>
  107.                                   </tr>
  108.                                   <tr> 
  109.                                     <td height="26">&nbsp;</td>
  110.                                     <td height="26"><input name="ggri" type="text" id="ggri" size="10">
  111.                                       租用日期/天 
  112.                                       <select name="ggok" id="ggok">
  113.                                         <option value="1">暂未使用</option>
  114.                                         <option value="0">已被租用</option>
  115.                                       </select> <br> <input name="ggjia" type="text" id="ggjia" size="10">
  116.                                       价格/元 </td>
  117.                                   </tr>
  118.                                   <tr> 
  119.                                     <td height="26">&nbsp;</td>
  120.                                     <td height="26"><input type="Submit" name="Submit" value="确定" width="75" height="22"></td>
  121.                                   </tr>
  122.                                 </table>
  123.                               </form>                            </td>
  124.                           </tr>
  125.                           <tr>
  126.                             <td height="52" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  127.                                 <tr> 
  128.                                  
  129.                                 </tr>
  130.                                 <tr class="title"> 
  131.                                         <td width="18%" height="22">
  132. <div align="center" class="样式2"><strong>位置</strong></div></td>
  133.                                         <td width="41%" height="22"><div align="center" class="样式2"><strong>说明</strong></div></td>
  134.                                         <td width="11%" height="22"><div align="center" class="样式2"><strong>规格</strong></div></td>
  135.                                         <td width="13%" height="22"><div align="center" class="样式2"><strong>到期时间</strong></div></td>
  136.                                         <td width="8%" height="22"><div align="center" class="样式2"><strong>已租</strong></div></td>
  137.                                         <td width="9%" height="22"><div align="center" class="样式2"><strong>元/月</strong></div></td>
  138.                                 </tr>
  139.                                 <%set rs= Server.CreateObject("adodb.recordset")
  140. sql="select * from gg order by gglei desc "
  141. rs.open sql,conn,1,3 
  142. for ff=1 to int(rs.recordcount) %>
  143.                                 <tr class="tdbg"> 
  144.                                   <td> <div align="center"> 
  145.                                       <%select case rs("gglei")
  146. case 0
  147. Response.Write("首页广告")
  148. case 1
  149. Response.Write("分类内广告")
  150. case 2
  151. Response.Write("商品详细内")
  152. case 3
  153. Response.Write("产品详细底")
  154. case 4
  155. Response.Write("首页广告底部")
  156. case else
  157. Response.Write("其他位置")
  158. end select %>
  159.                                       <img src="images/delete.gif" alt="删除" width="12" height="12" border="0" onClick="if(confirm('您确定要删除吗?')){location='?id=<%=rs("ggid")%>&del=ok'}else{return(false)}" onMouseMove="this.style.cursor='hand'"> </div></td>
  160.                                   <td height="30"><a href="addgg.asp?id=<%=rs("ggid")%>"><%=rs("gjie")%><font color="#990000">&lt;修改&gt;</font></a></td>
  161.                                   <td><div align="center"><%=rs("gw")%>X<%=rs("gh")%></div></td>
  162.                                   <td>
  163.                                     <div align="center">
  164.                                         <%if rs("ggtime")+rs("ggri")<=date() then
  165.   Response.Write("-------NO------")
  166.   else
  167.   Response.Write(""&rs("ggtime")+rs("ggri")&"")
  168.   end if  %>
  169.                                     </div></td>
  170.                                   <td> <div align="center">
  171.                                       <% if rs("ggok")=1 then
  172.   Response.Write("<font color=#FF0000><b>X</b></font>")
  173.   else
  174.   Response.Write("<b>√</b>")
  175.   end if %>
  176.                                     </div></td>
  177.                                   <td><div align="center"><%=rs("ggjia")%></div></td>
  178.                                 </tr>
  179.                                 <% rs.movenext
  180. next %>
  181.                               </table> </td>
  182.                           </tr>
  183.                         </table>
  184.                       </td>
  185.                     </tr>
  186.                   </table>
  187.                 </td>
  188.               </tr>
  189.             </table>
  190.           </td>
  191.         </tr>
  192.       </table>
  193.     </td>
  194.   </tr>
  195. </table></td>
  196.     <td width="18" background="img/admin5.gif">&nbsp;</td>
  197.   </tr>
  198. </table>
  199. <br>
  200. </body>
  201. </html>