guanggao.jsp
上传用户:helenhuo66
上传日期:2007-06-01
资源大小:865k
文件大小:5k
源码类别:

百货/超市行业

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ include file="conn.jsp"%>
  3. <%String action=request.getParameter("action");
  4. if(action==null)
  5. action="notsave";
  6. if(action.equals("save")){
  7. sql="update logo set banner='"+getStr((request.getParameter("banner")).trim())+"',url='"+(request.getParameter("url")).trim()+"'";
  8.     mdb.executeUpdate(sql);
  9. out.print("<script language=javascript>alert('修改成功!');history.go(-1);</script>");
  10. }else{
  11. %>
  12. <html>
  13. <head>
  14. <title>Untitled Document</title>
  15. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  16. <link href="../img/css.css" rel="stylesheet" type="text/css">
  17. <style>
  18. td{font-size:9pt;line-height:120%;color:#353535} 
  19. body{font-size:9pt;line-height:120%} 
  20. a:link          { color: #000000; text-decoration: none }
  21. a:visited       { color: #000000; text-decoration: none }
  22. a:active        { color: #000000; text-decoration: none }
  23. a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
  24. </style>
  25. </head>
  26. <body>
  27. <%
  28. sql="select * from logo";
  29. rs=mdb.executeQuery(sql);
  30. rs.next();%>
  31. <div align="center">
  32.   <center>
  33. <table width="80%" border="1" cellspacing="0" cellpadding="0" bordercolor="#808080" style="border-collapse: collapse">
  34.   <tr> 
  35.     <td> 
  36.       <table width="100%" border="0" cellspacing="0" cellpadding="0">
  37.         <tr> 
  38.           <td width="9" background="../img/back_3.gif" rowspan="2"></td>
  39.           <td class="12v"> 
  40.             <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
  41.               <tr> 
  42.                 <td class="12v" > 
  43.                   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
  44.                     <tr> 
  45.                       <td>
  46.                         <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" >
  47.                           <tr> 
  48.                             <td bgcolor="#C0C0C0"> 
  49.                               <div align="center"><font color="#FFFFFF">网站广告设置</font></div>
  50.                             </td>
  51.                           </tr>
  52.                           <tr> 
  53.                             <td height="211" valign="top" bgcolor="#FFFFFF">
  54.                               <form name="form1" method="post" action="guanggao.jsp?action=save">
  55.                                 <br>
  56.                                 <table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
  57.                                   <tr> 
  58.                                     <td bgcolor="#FFFFFF" style="PADDING-LEFT: 6px"> </td>
  59.                                     <td bgcolor="#FFFFFF" > <div align="center">图片地址</div></td>
  60.                                     <td bgcolor="#FFFFFF" > <div align="center">图片链接</div></td>
  61.                                   </tr>
  62.                                   <tr> 
  63.                                     <td colspan="3" bgcolor="#FFFFFF" style="PADDING-LEFT: 6px">网站首页广告设置:</td>
  64.                                   </tr>
  65.                                   <tr> 
  66.                                     <td width="25%" bgcolor="#FFFFFF" style="PADDING-LEFT: 6px">395*110大广告:</td>
  67.                                     <td width="38%" bgcolor="#FFFFFF" > <div align="center"> 
  68.                                         <input name="banner" type="text" id="banner" size="28" value=<%=rs.getString("banner")%>>
  69.                                       </div></td>
  70.                                     <td width="37%" bgcolor="#FFFFFF" > <div align="center"> 
  71.                                         <input name="url" type="text" id="url" size="28" value=<%=rs.getString("url")%>>
  72.                                       </div></td>
  73.                                   </tr>
  74.                                   <tr> 
  75.                                     <td height="32" colspan="3" bgcolor="#FFFFFF" style="PADDING-LEFT: 6px"> 
  76.                                       <div align="center"> 
  77.                                         <input type="submit" name="Submit" value="提交更改">
  78.                                       </div></td>
  79.                                   </tr>
  80.                                 </table>
  81.                               </form>
  82.                             </td>
  83.                           </tr>
  84.                         </table>
  85.                       </td>
  86.                     </tr>
  87.                   </table>
  88.                 </td>
  89.               </tr>
  90.             </table>
  91.           </td>
  92.           <td class="12v" background="../img/back_3.gif" width="9" rowspan="2"></td>
  93.         </tr>
  94.       </table>
  95.     </td>
  96.   </tr>
  97. </table>
  98.   </center>
  99. </div>
  100. </body>
  101. </html>
  102. <%}mdb.Close();%>