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

百货/超市行业

开发平台:

Java

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