📄 bodyhotmoviessmall.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030" import="java.util.*,com.eline.vod.utils.caching.*,com.blue.web.common.model.*,com.eline.vod.utils.*,com.eline.vod.client.*,com.eline.vod.model.*"%><%
String cacheKey = "movies-hot-0-4";
Cache cache = Cache.getInstance();
Page chunk = (Page) cache.get(cacheKey);
if (chunk == null) {
Movies movies = new Movies();
chunk = movies.searchHotMovie(null, 0, 4);
if (chunk.getItems().size() > 0) {
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.MINUTE, 5);
cache.add(cacheKey, chunk, cal.getTime(), Cache.NoSlidingExpiration);
}
}
// 判断影片数目是否为0
boolean isEmptySet = chunk.getItems().size() < 1;
%>
<!-- bodyHotMoviesSmall.jsp -->
<table cellSpacing="1" cellPadding="0" width="100%" border="0">
<tr>
<td>
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td width="50"><img src="<%= request.getContextPath() %>/images/01/title-right-hot-01.gif"></td>
<td style="PADDING-TOP: 5px; FONT-WEIGHT: bold; COLOR: #ffffff" width="100"
background="<%= request.getContextPath() %>/images/01/title-right-hot-bg.gif"> 火热播映中</td>
<td width="5"><img src="<%= request.getContextPath() %>/images/01/title-right-hot-02.gif"></td>
<td background="<%= request.getContextPath() %>/images/01/title-right-hot-bg1.gif"> </td>
<td width="90"><img src="<%= request.getContextPath() %>/images/01/title-right-hot-03.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#FFA833">
<%if (isEmptySet) { %><%-- 如果数目为空 --%>
<table cellSpacing="7" cellPadding="0" width="100%" border="0">
<tr>
<td align="center">影片数为空!</td>
</tr>
</table>
<%} else { %>
<table cellSpacing="7" cellPadding="0" width="100%" border="0">
<tr>
<%
for (int i = 0; i < chunk.getItems().size(); i ++) {
Movie item = (Movie) chunk.getItems().get(i); %>
<td width="25%" valign="top" align="center">
<table cellSpacing="1" cellPadding="4" width="81%" border="0" class="body2">
<tr>
<td bgColor="#ffffff"><a href="<%=SiteUrls2.getInstance().getMovieURL() + "?item=" + item.getIndexID() %>"><img border="0" alt="点击查看:<%=item.getTitle() %>" src="<%= request.getContextPath() + ImageProcessor.getThumbFileURL(item.getOrigionFile(), 125, 170)%>" width="125" height="170"></a></td>
</tr>
<tr>
<td align="center" height="30"><a href="<%=SiteUrls2.getInstance().getMovieURL() + "?item=" + item.getIndexID() %>"><%=item.getTitle() %></a></td>
</tr>
</table>
</td>
<%} %>
</tr>
</table>
<%} %>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -