index.jsp
上传用户:szlmxq
上传日期:2014-01-31
资源大小:740k
文件大小:6k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2. <html>
  3. <script LANGUAGE="javascript"> 
  4. </script> 
  5. <%@ include file="top.jsp"%>
  6. <table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
  7.   <tr>
  8.     <td height="10"></td>
  9.   </tr>
  10. </table>
  11. <table width="778" border="0" cellspacing="0" cellpadding="0" align="center" height="148">
  12.   <!--DWLayoutTable-->
  13.   <tr valign="top"> 
  14.     <td width="180"> <table width="180" border="0" cellspacing="0" cellpadding="0" align="center">
  15.         <tr> 
  16.           <td valign="top"> 
  17.             <%@ include file="dengluyufou.jsp"%>
  18.           </td>
  19.         </tr>
  20.       </table>
  21.       <table width="100%" border="0" cellspacing="0" cellpadding="0" height="5">
  22.         <tr> 
  23.           <td></td>
  24.         </tr>
  25.         <tr> 
  26.           <td></td>
  27.         </tr>
  28.       </table>
  29.       <!--------------------search page------------------------------>
  30.       <%@ include file="in-search.jsp"%>
  31.       <table width="100%" border="0" cellspacing="0" cellpadding="0" height="5">
  32.         <tr> 
  33.           <td> 
  34.             <!-------------------topsort------------------------------>
  35.             <%@ include file="topsort.jsp"%>
  36.             <!-------------------noticenotice------------------------------>
  37.             <%@ include file="inludenotice.jsp"%>
  38.           </td>
  39.         </tr>
  40.       </table></td>
  41.     <td width="16"> </td>
  42.     <!--///////////////////////////midle begin////////////////////////////////////////-->
  43.     <td width="408"> <table width="100%">
  44.         <!--DWLayoutTable-->
  45.         <tr> 
  46.           <td width="393" height="156"> 
  47.             <%
  48.  sql="select  * from logo  ";
  49.  rs=mdb.executeQuery(sql);
  50.  if(!rs.next())
  51.  {
  52.         
  53.     out.print("暂且没有广告");         
  54. }
  55.  else
  56.  {%>
  57.             <a href="<%=rs.getString("url")%>"target="_blank"><img src="<%=rs.getString("banner")%>" width="395" height="118" border="0"></a> 
  58.             <%
  59. }
  60. %>
  61.           </td>
  62.           <td> </td>
  63.         </tr>
  64.         <tr> 
  65.           <td> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="151" id="AutoNumber1" height="20" background="img/fu.gif">
  66.               <tr> 
  67.                 <td align="center" width="82"><b>精品推荐</b></td>
  68.                 <td align="center"> </td>
  69.               </tr>
  70.             </table></td>
  71.           <td> </td>
  72.         </tr>
  73.         <tr> 
  74.           <td height="118" valign="top"> 
  75.             <!-- ------------------circulation-------------------------->
  76.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  77.               <tr> 
  78.                 <%
  79. sql="select top 10 * from hw where tuijian=-1 order by hw_id DESC";
  80. rs=mdb.executeQuery(sql);
  81. if(!rs.next())
  82. {
  83.  
  84. %>
  85.                 <td width="128" valign="top" align="left" bgcolor="#FFFFFF"><div align="center"> 
  86.                     暂且没有推荐商品<br>
  87.                   </div></td>
  88.                 <%
  89. }
  90. else
  91. {  int hwid=0;
  92.    i=0;
  93.    rs.previous();
  94.    while(rs.next())
  95.    {
  96.         i=i+1;
  97. hwid=rs.getInt("hw_id");
  98. %>
  99.                 <td width="50%"> <br>
  100.                   商品名称:<%=rs.getString("hw_name")%> <br> <a href="views.jsp?hw_id=<%=hwid%>"> 
  101.                   <img border="0" src="<%=rs.getString("hw_pic")%>" width="114" height="83" vspace="6"></a> 
  102.                   <br>
  103.                   会员价:<%=rs.getInt("hw_cash")%>元 <br> <a target="_blank" href="views.jsp?hw_id=<%=hwid%>">详情</a> 
  104.                   <a href='javascript:openbag(<%=hwid%>)'>定购<img border="0" src="img/order.gif" width="21" height="15"></a> 
  105.                 </td>
  106.                 <%
  107. if(i%2==0&i>=2)
  108. {
  109. %>
  110.               </tr>
  111.               <tr> 
  112.                 <%
  113.          }
  114.    if(i>=10) {
  115.       break;
  116.    }
  117.   }
  118. }
  119. %>
  120.               </tr>
  121.             </table>
  122.             <!-------------------circulation end-------------------------------->
  123.           </td>
  124.           <td> </td>
  125.         </tr>
  126.       </table></td>
  127.     <!--/////////////////////////////midle  end/////////////////////////////////////-->
  128.     <td  width="174"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  129.         <!--DWLayoutTable-->
  130.         <tr> 
  131.           <td width="174" height="1"></td>
  132.         </tr>
  133.         
  134.         <tr> 
  135.           <td height="388" valign="top"> 
  136.             <%@ include file="paihang.jsp"%>
  137.           </td>
  138.         </tr>
  139.       </table></td>
  140.   </tr>
  141.   <TR> 
  142.     <td height="16" colspan="4" valign="top"> 
  143.       <%@ include file="copy.jsp"%>
  144.     </td>
  145.   </TR>
  146. </table>
  147. <script language="JavaScript1.2">
  148. var dragswitch=0
  149. var nsx
  150. var nsy
  151. var nstemp
  152. function drag_dropns(name){
  153. temp=eval(name)
  154. temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
  155. temp.onmousedown=gons
  156. temp.onmousemove=dragns
  157. temp.onmouseup=stopns
  158. }
  159. function gons(e){
  160. temp.captureEvents(Event.MOUSEMOVE)
  161. nsx=e.x
  162. nsy=e.y
  163. }
  164. function dragns(e){
  165. if (dragswitch==1){
  166. temp.moveBy(e.x-nsx,e.y-nsy)
  167. return false
  168. }
  169. }
  170. function stopns(){
  171. temp.releaseEvents(Event.MOUSEMOVE)
  172. }
  173. var dragapproved=false
  174. function drag_dropie(){
  175. if (dragapproved==true){
  176. document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
  177. document.all.showimage.style.pixelTop=tempy+event.clientY-iey
  178. return false
  179. }
  180. }
  181. function initializedragie(){
  182. iex=event.clientX
  183. iey=event.clientY
  184. tempx=showimage.style.pixelLeft
  185. tempy=showimage.style.pixelTop
  186. dragapproved=true
  187. document.onmousemove=drag_dropie
  188. }
  189. if (document.all){
  190. document.onmouseup=new Function("dragapproved=false")
  191. }
  192. function hidebox(){
  193. if (document.all)
  194. showimage.style.visibility="hidden"
  195. else if (document.layers)
  196. document.showimage.visibility="hide"
  197. }
  198. </script>