⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.jsp

📁 一个jsp的课程设计:电子商务网站
💻 JSP
字号:
<%@page contentType="text/html"%><%@page pageEncoding="UTF-8" import="dbpack.dbConnect"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="login" class="dbpack.Login" scope="session" /><jsp:useBean id="room" class="dbpack.room" scope="page" /><jsp:useBean id="todayfood" class="dbpack.TodaySuggest" scope="page" /><jsp:useBean id="type" class="dbpack.type" scope="page" /><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>成信人---解决你吃的问题,还等什么快来看看吧!</title><style type="text/css"><!--body,td,th {	font-size: 9pt;}body {	margin-left: 0px;	margin-top: 0px;	margin-right: 0px;	margin-bottom: 0px;}a{ text-decoration:none;}a.tab:link {	text-decoration: none;	color:#000;        font-weight:bold;        font-size:12px;}a.tab:visited {	text-decoration: none;	color: #000;        font-weight:bold;        font-size:12px;}a.tab:hover {	text-decoration: none;	color: #3f3498;        font-weight:bold;        font-size:13px;}.search{background-image:url(images/search_m.gif); background-position:bottom; background-repeat:repeat-x;}.searchTitle{font-size:17px; font-weight:600; color:#333333;}#table_left{border-left:1px solid #999999; border-bottom:1px solid #999999; border-right:1px solid #999999;}.table_h3{font-size:14px; font-weight:600; color:#fff;}.table_inner_left{border-bottom:1px dotted #CCCCCC;}.list{list-style:none; margin-left:-5px; padding:0px;}.list li{ margin-top:10px; color:#666666; padding:0px;text-align:center;}.list1{list-style:none; margin-left:15px; padding:0px; }.list1 li{ margin-top:10px; color:#666666; padding:0px; }#table_right{border:1px solid  #CCCCCC;}.top_table{margin-top:5px;}.STYLE1 {	color: #FF0000;	font-weight: bold;}.STYLE2 {	color: #FF9900;	font-weight: bold;}--></style><script language="javascript">	function hotClick(hotname){		document.getElementById("searchbox").value=hotname;	}</script></head><body><table width="100%" border="0" cellspacing="0" cellpadding="0" >  <tr>    <td height="262" align="center" valign="top">        <table width="100%" border="0" cellspacing="0" cellpadding="0">      <tr>        <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">          <tr>              <td width="16%" height="85" rowspan="2">&nbsp;&nbsp;&nbsp;<a href="http://www.mysiky.com" ><img style="border:0px;" src="images/logo.gif" width="170" height="60" /></a><br /><span style="color:red;">思齐网旗下网站</span></td>            <td width="84%" align="left" valign="top">			<table class="top_table" width="100%" border="0" cellspacing="0" cellpadding="0">              <tr>                <td height="21" align="left">                    <%if(login.getIsLogin()){%>                    欢迎你:<span style="color:red;"><jsp:getProperty name="login" property="userid" /></span>&nbsp;&nbsp;&nbsp;<a href="exit">退出登录</a>                    <%}else{%>                    <form id="form2" name="form2" method="post" action="doLogin" style="margin-bottom:0px;">                                   用户名:                  <label>              <input name="userid" type="text" size="20" />              </label>                  密码:                  <label>                    <input name="psw" type="password" size="20" />                    </label>                  <label>                    <input type="submit" name="Submit2" value="登录" />                    </label>                </form>                                        <%}%>                  </td>                </tr>            </table>            </td>          </tr>          <tr>            <td align="left" valign="bottom"><table width="90%" border="0" cellspacing="0" cellpadding="0">              <tr>                <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">                    <tr>                        <td width="115" height="31" align="center" background="images/navi_l_1.jpg"><a href="index.jsp" class="tab">首页</a></td>                      <td width="113" align="center" background="images/navi_m_1.jpg"><a href="mycart.jsp" class="tab">我的购物车</a></td>                      <td width="117" align="center" background="images/navi_r_1.jpg"><a href="list.jsp" class="tab">精品推荐</a></td>                      <td width="25">&nbsp;</td>                      <td width="563" align="right" valign="bottom"><table width="229" border="0" cellspacing="0" cellpadding="0">                          <tr>                            <td width="19" height="15" background="images/p_gwc.gif">&nbsp;</td>                            <td width="70" align="center"><a href="mycart.jsp">购物车</a></td>                            <td width="70" align="center"><a href="help.jsp">帮助中心</a></td>                            <td width="70" align="center"><a href="reg.jsp">新用户注册</a></td>                          </tr>                      </table></td>                    </tr>                </table></td>              </tr>              <tr>                <td width="1%" bgcolor="#EAEAEA"><img src="images/navi2_left.gif" width="4" height="23" /></td>                <td width="98%" align="left" bgcolor="#EAEAEA">&nbsp;&nbsp;&nbsp;<jsp:getProperty name="type" property="str" /> <br /></td>                <td width="1%" align="right" bgcolor="#EAEAEA"><img src="images/navi2_right.gif" width="5" height="23" /></td>              </tr>            </table></td>          </tr>        </table>          <table width="100%" border="0" cellspacing="0" cellpadding="0">            <tr>              <td height="5"></td>            </tr>          </table>          <table width="98%" border="0" cellspacing="0" cellpadding="0">            <tr>              <td width="0%" height="33" rowspan="2"><img src="images/search_l.gif" width="6" height="71" /></td>              <td width="47%" align="center" background="images/search_m.gif"><span class="STYLE1">热门分类</span>:<jsp:getProperty name="type" property="hotstr" /></td>              <td width="2%" align="left" valign="top" bgcolor="#E2F0FD"><img src="images/search_m2.jpg" width="42" height="33" /></td>              <td width="51%" height="33" align="left" bgcolor="#E2F0FD" style="background-image:url(images/search_m3.gif); background-position:top; background-repeat:repeat-x;">&nbsp;&nbsp;&nbsp;&nbsp;<span class="STYLE2">热门搜索词</span>:<a href="javascript:hotClick('炸酱面');">炸酱面</a>   | <a href="javascript:hotClick('红油饺子');">红油饺子</a> | <a href="javascript:hotClick('胖哥抄手');">胖哥抄手</a> | <a href="javascript:hotClick('燃面');">燃面</a> </td>              <td width="0%" rowspan="2" align="right"><img src="images/search_r.gif" width="6" height="71" /></td>            </tr>            <tr>              <td height="28" colspan="3" align="center" class="search">                  <form id="form1" style="margin-bottom:0px;" name="form1" method="post" action="list.jsp">                <label>                <span class="searchTitle">商品搜索</span>                <input name="searchbox" type="text" id="searchbox"  style="height:16px; width:350px; vertical-align:middle;"/>                </label>                <label>                    <input type="hidden" name="ty" value="se" />                <input type="radio" name="radiobutton" value="radiobutton" checked="checked" />                菜名                <input type="radio" name="radiobutton" value="radiobutton" />                店名                                <input type="radio" name="radiobutton" value="radiobutton" />                价格                <input type="submit" name="Submit" value="提交" />                </label>                                                                                                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              </form>              </td>              </tr>          </table></td>      </tr>    </table>      <table width="100%" border="0" cellspacing="0" cellpadding="0">        <tr>          <td height="10"></td>        </tr>      </table>      <table width="98%" border="0" cellspacing="0" cellpadding="0">        <tr>          <td width="17%" height="105" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">            <tr>              <td width="3%" bgcolor="#006699"><img src="images/06default_1018_03.gif" width="7" height="22" /></td>              <td width="94%" align="left" bgcolor="#006699" class="table_h3">推荐店铺</td>              <td width="3%" align="right" bgcolor="#006699"><img src="images/06default_1018_05.gif" width="7" height="22" /></td>            </tr>            <tr>              <td height="58" colspan="3" align="center" valign="top"><table width="100%" height="598" border="0" cellpadding="0" cellspacing="0" id="table_left">                <tr>                  <td height="273" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">                    <tr>                      <td align="left">					  	<div class="table_inner_left">							<ul class="list">                                                            <jsp:getProperty name="room" property="str" />                                               							</ul>						</div>					  </td>                    </tr>                  </table></td>                </tr>              </table></td>            </tr>          </table>            <table width="100%" border="0" cellspacing="0" cellpadding="0">              <tr>                <td>&nbsp;</td>              </tr>            </table></td>          <td width="65%" align="center" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0">            <tr>              <td><br />                  <table width="100%">                                <tr>                                    <%                                    int i=1;                                    dbConnect db=new dbConnect();                                    db.rs=db.sat.executeQuery("select top 12 * from food ");                                    while(db.rs.next()){                                    if(i%5==0){                                    %>                                </tr><tr><td height="20"> <br /> </td></tr><tr>                                <%                            }else{                      %>                                            <td><img height="200" width="150" src="<%=db.rs.getString("foodpicture")%>" /><br /><br /><a href="Show?id=<%=db.rs.getString("foodid")%>&type=food"><%=db.rs.getString("foodname")%></a></td>                                            <%}                        i++;                        }                      %>                      </tr>                  </table></td>            </tr>          </table></td>          <td width="18%" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">            <tr>              <td align="left"><img src="images/06default_070129_10.jpg" width="134" height="22" /></td>            </tr>            <tr>              <td><table width="100%" border="0" cellspacing="0" cellpadding="0" id="table_right">                <tr>                  <td height="221" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">                    <tr>                      <td align="left"><div class="table_inner_left">                          <ul class="list1">                            <jsp:getProperty name="todayfood" property="str" />                          </ul>                      </div></td>                    </tr>                  </table></td>                </tr>              </table></td>            </tr>          </table><br />          <table width="100%" border="0" cellspacing="0" cellpadding="0">            <tr>              <td align="left"><img src="images/06default_070129_10.jpg" width="134" height="22" /></td>            </tr>            <tr>              <td><table width="100%" border="0" cellspacing="0" cellpadding="0" id="table_right">                  <tr>                    <td height="221" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">                        <tr>                          <td align="left"><div class="table_inner_left">                              <ul class="list1">                                <li>胖哥抄哥抄哥抄手</li>                                <li>胖哥哥抄哥抄抄手</li>                                <li>胖哥哥抄哥抄抄手</li>                              </ul>                          </div></td>                        </tr>                    </table></td>                  </tr>              </table></td>            </tr>          </table></td>        </tr>      </table></td>  </tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0">  <tr>    <td align="center"><hr width="98%" />      <p>关于本站 | 广告服务 | 店铺招商 | 招聘人才</p>      <p>Copyright &copy; 成信人 2007-2010 All Rights Reserved</p></td>  </tr></table></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -