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

百货/超市行业

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ include file="conn.jsp"%>
  3. <%
  4. if(session.getAttribute("admin_name")==null){
  5. ;}else{
  6. %>
  7. <html>
  8. <head>
  9. <title>Untitled Document</title>
  10. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  11. <link href="../img/css.css" rel="stylesheet" type="text/css">
  12. <style>
  13. td{font-size:9pt;line-height:120%;color:#353535} 
  14. body{font-size:9pt;line-height:120%} 
  15. a:link          { color: #000000; text-decoration: none }
  16. a:visited       { color: #000000; text-decoration: none }
  17. a:active        { color: #000000; text-decoration: none }
  18. a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
  19. </style>
  20. </head>
  21. <body>
  22. <div align="center">
  23.   <center>
  24. <table width="80%" border="1" cellspacing="0" cellpadding="0" bordercolor="#808080" style="border-collapse: collapse">
  25.   <tr> 
  26.     <td> 
  27.       <table width="100%" border="0" cellspacing="0" cellpadding="0">
  28.         <tr> 
  29.           <td width="9" rowspan="2"></td>
  30.           <td class="12v"> 
  31.             <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
  32.               <tr> 
  33.                 <td class="12v" > 
  34.                   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
  35.                     <tr> 
  36.                       <td> 
  37.                         <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
  38.                           <tr> 
  39.                             <td bgcolor="#808080"> 
  40.                               <div align="center"><font color="#FFFFFF">管理合作伙伴</font></div>
  41.                             </td>
  42.                           </tr>
  43.                           <tr> 
  44.                             <td height="99" valign="top" bgcolor="#FFFFFF"><br>
  45.                               <%
  46. sql="select * from ad order by bs";
  47.   rs=mdb.executeQuery(sql);
  48. %>
  49.                               <table width="80%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
  50.                                 <tr> 
  51.                                   <td width="26%" height="16" bgcolor="#FFFFFF">
  52.                                     <div align="center">网站名称</div>
  53.                                   </td>
  54.                                   <td width="42%" height="16" bgcolor="#FFFFFF">
  55.                                     <div align="center">网站地址</div>
  56.                                   </td>
  57.                                   <td width="9%" bgcolor="#FFFFFF">
  58.                                     <div align="center">排 序</div>
  59.                                   </td>
  60.                                   <td width="23%" bgcolor="#FFFFFF">
  61.                                     <div align="center">操 作</div>
  62.                                   </td>
  63.                                 </tr>
  64.                                 <%if(!rs.next())
  65.   out.print("还没有数据,请添加!");
  66.   else{
  67.   rs.previous();
  68.   while(rs.next()){
  69.   int id=rs.getInt("id");%>
  70.                                 <tr> 
  71.                                   <form name="form1" method="post" action="savelinks.jsp?action=edit&id=<%=id%>">
  72.                                     <td height="35" bgcolor="#FFFFFF">
  73.                                       <div align="center"> 
  74.                                         <input name="wordlink" type="text" id="linkname" value="<%=rs.getString("wordlink")%>" size="16">
  75.                                       </div>
  76.                                     </td>
  77.                                     <td bgcolor="#FFFFFF">
  78.                                       <div align="center"> 
  79.                                         <input name="url" type="text" id="linkurl" value="<%=rs.getString("url")%>" size="26">
  80.                                       </div>
  81.                                     </td>
  82.                                     <td bgcolor="#FFFFFF">
  83.                                       <div align="center"> 
  84.                                         <input name="bs" type="text" id="linkidorder" value=<%=rs.getInt("bs")%> size="3">
  85.                                       </div>
  86.                                     </td>
  87.                                     <td bgcolor="#FFFFFF">
  88.                                       <div align="center"> 
  89.                                         <input type="submit" name="Submit" value="修 改">
  90.                                         &nbsp;&nbsp;<a href=savelinks.jsp?action=del&id=<%=id%>><font color="#FF0000">删除</font></a> 
  91.                                       </div>
  92.                                     </td>
  93.                                   </form>
  94.                                 </tr>
  95.                                 <%}
  96.   }
  97.   %>
  98.   <%sql="select * from ad order by bs";
  99.   rs=mdb.executeQuery(sql);
  100.   int i=0;
  101.   if(rs.next()){
  102. rs.last();
  103. i=rs.getRow();}else i=0;%>
  104.                               </table>
  105.                             </td>
  106.                           </tr>
  107.                         </table>
  108.                       </td>
  109.                     </tr>
  110.                   </table>
  111.                 </td>
  112.               </tr>
  113.             </table>
  114.           </td>
  115.           <td class="12v" background="../img/back_3.gif" width="9" rowspan="2"></td>
  116.         </tr>
  117.       </table>
  118.     </td>
  119.   </tr>
  120. </table>
  121.   </center>
  122. </div>
  123. <br>
  124. <div align="center">
  125.   <center>
  126. <table width="80%" border="1" cellspacing="0" cellpadding="0" bordercolor="#808080" style="border-collapse: collapse">
  127.   <tr> 
  128.     <td> 
  129.       <table width="100%" border="0" cellspacing="0" cellpadding="0">
  130.         <tr> 
  131.           <td width="9"  rowspan="2"></td>
  132.           <td class="12v"> 
  133.             <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
  134.               <tr> 
  135.                 <td class="12v" > 
  136.                   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
  137.                     <tr> 
  138.                       <td> 
  139.                         <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
  140.                           <tr> 
  141.                             <td bgcolor="#808080"> 
  142.                               <div align="center"><font color="#FFFFFF">添加合作伙伴</font></div>
  143.                             </td>
  144.                           </tr>
  145.                           <tr>
  146.                             <form name="form2" method="post" action="savelinks.jsp?action=add">
  147.                               <td height="98" bgcolor="#FFFFFF"> 
  148.                                 <table width="80%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
  149.                                   <tr> 
  150.                                     <td height="15" bgcolor="#FFFFFF">
  151.                                       <div align="center">网站名称</div>
  152.                                     </td>
  153.                                     <td bgcolor="#FFFFFF">
  154.                                       <div align="center">网站地址</div>
  155.                                     </td>
  156.                                     <td bgcolor="#FFFFFF">
  157.                                       <div align="center">排 序</div>
  158.                                     </td>
  159.                                     <td bgcolor="#FFFFFF">
  160.                                       <div align="center">操 作</div>
  161.                                     </td>
  162.                                   </tr>
  163.                                   <tr> 
  164.                                     <td height="15" bgcolor="#FFFFFF">
  165.                                       <div align="center"> 
  166.                                         <input name="wordlink" type="text" id="wordlink" size="16">
  167.                                       </div>
  168.                                     </td>
  169.                                     <td bgcolor="#FFFFFF">
  170.                                       <div align="center"> 
  171.                                         <input name="url" type="text" id="url" size="26">
  172.                                       </div>
  173.                                     </td>
  174.                                     <td bgcolor="#FFFFFF">
  175.                                       <div align="center"> 
  176.                                         <input name="bs" type="text" id="bs" value=<%=i+1%> size="3">
  177.                                       </div>
  178.                                     </td>
  179.                                     <td bgcolor="#FFFFFF">
  180.                                       <div align="center"> 
  181.                                         <input type="submit" name="Submit2" value="添 加">
  182.                                       </div>
  183.                                     </td>
  184.                                   </tr>
  185.                                 </table>
  186.                               </td>
  187.                             </form>
  188.                           </tr>
  189.                         </table>
  190.                       </td>
  191.                     </tr>
  192.                   </table>
  193.                 </td>
  194.               </tr>
  195.             </table>
  196.           </td>
  197.           <td class="12v" background="../img/back_3.gif" width="9" rowspan="2"></td>
  198.         </tr>
  199.       </table>
  200.     </td>
  201.   </tr>
  202. </table>
  203.   </center>
  204. </div>
  205. </body>
  206. </html>
  207. <%mdb.Close();
  208. }%>