📄 shop.jsp
字号:
<tr>
<td width=11% height=20> </td>
<td width=89%><img src="images/default/arrow.gif" width="13" height="12" border="0" align="absmiddle"> <span class="dirItem"><a href="?userName=<%=StrUtil.UrlEncode(userName)%>&dirCode=<%=StrUtil.UrlEncode(asd.getCode())%>"><%=StrUtil.toHtml(asd.getDirName())%></a></span></td>
</tr>
</table>
<% }%>
<table width="99%" height="29" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="11%" class="text_dir_all"> </td>
<td align="left" class="text_dir_all"><img src="images/default/arrow.gif" width="13" height="12" border="0" align="absmiddle"> <span class="dirItem"><a href="shop_alipay.jsp?userName=<%=StrUtil.UrlEncode(userName)%>">支付宝交易</a></span></td>
</tr>
</table></TD>
</TR>
</TBODY>
</TABLE>
<br>
<TABLE cellSpacing=0 cellPadding=0 width=100% border=0 class="link_frame">
<TBODY>
<TR>
<TD height=161 valign="top" class=p3><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dir_title">
<tr>
<td><span id=dir_title class="text_white_bold">友情链接</span></td>
</tr>
</table>
<%
LinkDb ld = new LinkDb();
String listsql = "select id from " + ld.getTableName() + " where userName=" + StrUtil.sqlstr(userName) + " and kind=" + StrUtil.sqlstr(ld.KIND_SHOP) + " order by sort";
Iterator irlink = ld.list(listsql).iterator();
while (irlink.hasNext())
{
ld = (LinkDb) irlink.next();
%>
<table width=100% border=0 cellspacing=0 cellpadding=0 class="p9">
<tr>
<td width=11% height=20> </td>
<td width=89%> <span class="dirItem">
<%if (ld.getImage()==null || ld.getImage().equals("")) {%>
<a target="_blank" href="<%=ld.getUrl()%>" title="<%=StrUtil.toHtml(ld.getTitle())%>"><%=StrUtil.toHtml(ld.getTitle())%></a>
<%}else{%>
<a target="_blank" href="<%=ld.getUrl()%>" title="<%=StrUtil.toHtml(ld.getTitle())%>"><img src="<%=ld.getImageUrl(request)%>" border="0"></a>
<%}%>
</span></td>
</tr>
</table>
<%}%>
</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD vAlign=top width=1%> </TD>
<TD width="80%" vAlign=top><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 class="p9">
<TBODY>
<TR>
<TD width="431">
<TR vAlign=top>
<TD height="251" colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="97" height="22" class="commodity_bar">
<%
String dirCode = ParamUtil.get(request, "dirCode");
String dirName = "全部商品";
if (!dirCode.equals("")) {
asd = asd.getAuctionShopDirDb(userName, dirCode);
if (asd!=null && asd.isLoaded()) {
dirName = asd.getDirName();
}
}
%>
<span class="commodity_title_text"><%=dirName%></span> </td>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="p9">
<form name="form_search" method="post" action="search.jsp" onSubmit="">
<tr>
<td width="57%" align="center"> </td>
<td width="43%" height="22" align="center"><input value="" name="what" onFocus="" onBlur="" type="text" class="singleboarder" size=16 style="height: 18">
<input type="image" value="images/default/search.gif" src="images/default/search.gif" align="middle" width="57" height="16"></td>
</tr>
</form>
</table></td>
</tr>
<tr>
<td height="4" colspan="2" class="commodity_bar_tr"></td>
</tr>
</table>
<%
String sql = "";
if (dirCode.equals(""))
sql = "select msgRootId from " + ad.getTableName() + " where userName="+StrUtil.sqlstr(userName) + " order by beginDate desc";
else
sql = "select msgRootId from " + ad.getTableName() + " where userName="+StrUtil.sqlstr(userName) + " and shopDir=" + StrUtil.sqlstr(dirCode) + " order by beginDate desc";
int pagesize = 20;
Paginator paginator = new Paginator(request);
int total = ad.getObjectCount(sql);
paginator.init(total, pagesize);
int curpage = paginator.getCurPage();
//设置当前页数和总页数
int totalpages = paginator.getTotalPages();
if (totalpages==0)
{
curpage = 1;
totalpages = 1;
}
%>
<% if(paginator.getTotal()>0){ %>
<table width="91%" border="0" cellspacing="0" cellpadding="0" align="center" class="p9" height="24">
<tr>
<td width="100%" height="24" valign="bottom"><div align="right">共 <b><%=paginator.getTotal() %></b> 条 每页<b><%=paginator.getPageSize() %></b> 条 <b><%=curpage %>/<%=totalpages %></b>
<%
String querystr = "userName=" + StrUtil.UrlEncode(userName) + "&dirCode=" + StrUtil.UrlEncode(dirCode);
out.print(paginator.getCurPageBlock("?"+querystr));
%>
</div></td>
</tr>
</table>
<%}%>
<table width="100%" border="0" cellspacing="8">
<%
Iterator ir = ad.list(sql, (curpage-1)*pagesize, curpage*pagesize-1).iterator();
int k = 0;
while (ir.hasNext()) {
ad = (AuctionDb) ir.next();
k++;
if (k==1) {%>
<tr>
<td bgcolor="#FFFFFF"><%}
%>
<table width="120" border=0 align="left" class="p9">
<tr>
<td height=100 align=center valign=bottom><%
String fileName = StrUtil.getNullString(ad.getImage());
if (!fileName.equals("")) {
if (isFtpUsed)
fileName = basePath + "/" + fileName;
else
fileName = "../../upfile/" + fileName;
%>
<img src="<%=fileName%>" width="80">
<%}else{%>
<img src="shopskin/default/images/noimg.jpg" width="80" height="105">
<%}%>
</td>
</tr>
<tr>
<td width="154" height="20" align="center" valign="top"> <a href="../../showtopic.jsp?rootid=<%=ad.getMsgRootId()%>" class="link_commodity"><%=StrUtil.toHtml(ad.getName())%></a></td>
</tr>
<tr>
<td height="40" align="center" valign="top"><%
AuctionWorthDb aw = new AuctionWorthDb();
long[] ary = aw.getWorthOfAuction(ad.getMsgRootId());
if (ad.getSellType()==ad.SELL_TYPE_AUCTION) {
// System.out.println("msgRootId=" + ad.getMsgRootId());
if (ary.length!=0)
aw = aw.getAuctionWorthDb((int)ary[0]);
%>
拍卖 <%=aw.getMoneyName()%><%=aw.getPrice()%> <%=aw.getMoneyDanWei()%>
<%} else {
int len = ary.length;
for (int m=0; m<len; m++) {
aw = aw.getAuctionWorthDb((int)ary[m]);
%>
一口价 <%=aw.getMoneyName()%><%=aw.getPrice()%> <%=aw.getMoneyDanWei()%><br>
<%}
}%>
</td>
</tr>
</table>
<%
if (k==5) {
out.print("</td></tr>");
k = 0;
}
}%>
<%if (k!=0) {%>
</td>
</tr>
<%}%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<jsp:useBean id="msg" scope="page" class="cn.js.fan.module.guestbook.MessageDb"/>
<table width="100%" border="0" cellpadding="8">
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2" colspan="2" class="guestbook_bar_tr"></td>
</tr>
<tr>
<td width="153" height="24" class="guestbook_bar"> <span class="text_white_bold">本店最新留言</span></td>
<td align="right"><a href="guestbook.jsp?shopCode=<%=StrUtil.UrlEncode(userName)%>" class="nav_guestbook">更多留言</a> <a href="guestbook.jsp?shopCode=<%=StrUtil.UrlEncode(userName)%>" class="nav_guestbook">我要留言</a> </td>
</tr>
</table>
<%
sql = "select id from guestbook where shopCode=" + StrUtil.sqlstr(userName) + " order by lydate desc";
Iterator ri = msg.list(sql, 0, 2).iterator();
while (ri.hasNext()) {
msg = (MessageDb)ri.next();
%>
<table width="100%" border="0" align="center" cellpadding="6" cellspacing="0" bgcolor="#FFFFFF" class="tableframe">
<tr>
<td width="27%" height="22" valign="bottom" class="stable style4">用户:<%=StrUtil.toHtml(msg.getUserName())%> </td>
<td width="73%" height="22" valign="bottom" class="stable style4">留言日期:<%=DateUtil.format(msg.getLydate(), "yy-MM-dd HH:mm:ss")%></td>
</tr>
<tr valign="top">
<td height="83" colspan="2" class="stable"><%=StrUtil.toHtml(msg.getContent())%><br>
<%
String reply = StrUtil.getNullString(msg.getReply());
if (!reply.equals(""))
{
%>
<br>
<font color="#F09F6F">回复:</font><%=StrUtil.toHtml(reply)%> <br>
日期:<%=DateUtil.format(msg.getLydate(), "yy-MM-dd HH:mm:ss")%>
<% } %>
</td>
</tr>
<tr valign="top">
<td height="1" colspan="2" bgcolor="#999999"></td>
</tr>
</table>
<%}%></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"></td>
</tr>
</table></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<table width="98%" border="0" align="center">
<tr>
<td height="34" align="center"><HR style="height:1px; color:"#999999">
Copyright 2005 版权所有:<a href="<%=Global.getRootPath()%>" class="link_commodity"><%=Global.AppName%></a><br>
联系人:<%=as.getContacter()%></td>
</tr>
</table>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -