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

📄 vodmodule.jsp

📁 HomePlayer is an extention of the FreePlayer software provided by the french internet provider Free
💻 JSP
字号:
<%@page contentType="text/html;charset=ISO-8859-15" pageEncoding="ISO-8859-1"%>
<%@page import="org.homeplayer.util.vod.VODModule"%>
<%@page import="org.homeplayer.util.vod.VODManager"%>
<%@page import="org.homeplayer.util.WebUtil"%>
<%@page import="java.util.ArrayList"%>
<%@page import="org.homeplayer.util.vod.VODSection"%>
<%@page import="org.homeplayer.util.StringUtil"%>
<jsp:useBean id="hppc" class="org.homeplayer.web.HPPageContext" scope="request">
	<jsp:setProperty name="hppc" property="request" 		value="<%=request%>"/>
	<jsp:setProperty name="hppc" property="serviceName" 	value="WEBVIDEO"/>
	<jsp:setProperty name="hppc" property="navLevel" 	value="2"/>
</jsp:useBean> 
<%
String    vod        = request.getParameter("MODULE") ;
VODModule module     = VODManager.shareInstance().getModule(vod) ;
String    background = module.getBackground(hppc, module.getBgImage()) ;

ArrayList<VODSection> sections = module.getSections() ;
int npage = WebUtil.getParam(request,"page",0) ;
int maxItemInPage = 8 ;
int nbTotalPage = (int) Math.ceil((double) sections.size() / maxItemInPage);
npage = (npage < 0) ? 0 : (npage >= nbTotalPage) ? nbTotalPage-1 : npage;

String pageURL = WebUtil.removeParam(hppc.getLocalURL(),"SELID") ;

for (int i=0; i < nbTotalPage; i++) {
	VODSection section = sections.get(i*maxItemInPage);
	String shortName = section.getTitle();
	shortName = StringUtil.cut(shortName, 10, ".");
	hppc.addPage(i+1, shortName, WebUtil.setParam(pageURL, "page=" + (i)));
} 
hppc.setCurrentPage(npage + 1);
hppc.setHeaderTitle( module.getTitle() ) ;
hppc.setFocusSetOnPage( true) ;
int selid = WebUtil.getParam(request,"SELID",-1) ;
VODSection selitem = null;
if( selid!=-1 && hppc.getUserAgent().indexOf("-ppp")!=-1 ){
	selitem = sections.get(selid) ;
}

String favTitle = vod;
if (nbTotalPage > 1) {
	favTitle += " " + (npage+1) + "/" + nbTotalPage;
}
hppc.setFavorite(hppc.getServiceName(), favTitle , hppc.getLocalURL());
%>
<%@page import="org.homeplayer.util.ImageUtil"%>
<html>
<head>
<jsp:include page="/WEB-INF/jsp/head.jsp" />
</head>
<body background="<%=background %>" text="<%= module.getTextColor()%>" link="<%= module.getTextColor()%>" alink="<%= module.getSlinkColor() %>">
<center>
   <TABLE align="center" width=560>
   <tr>
   	<td height=100><img height=100 width=1></td>
   </tr>
   <tr>
   <td width=14>
   <% if (hppc.getPreviousPageUrl() != null) { %>
   <a href="<%=hppc.getPreviousPageUrl()%>" onfocus='location="<%=hppc.getPreviousPageUrl()%>";'><table width="12" height="60" border=0 cellpadding=0 cellspacing=0 vbgcolor="#FF0000FF" bgcolor="#FFFFFFFF" abgcolor="#FF0000FF"><tr><td valign="center" align="center"><img src="/images/prevphoto.gif"></td></tr></table></a>
   <%} %>
   </td>
   <td>
       <table align=center cellpadding=0 cellspacing=2>
<%
int itemPerLine = 4 ;
String[] mediainfo= new String[] { "",""} ;
for( int i=npage*maxItemInPage ; ((i-npage*maxItemInPage)<maxItemInPage) ; i++ ) {
	VODSection obj   = i<sections.size() ? sections.get(i):null ;
	if( i%itemPerLine==0 ) {%>
<tr>
	<%} %>
	<td width="114" height="98" valign="center" align="center">
		<%if( obj != null ) {
			String imageHtml = ImageUtil.getCacheImageHTML(ImageUtil.toUrl(obj.getIcon()),108,92,hppc.isFreeBoxHD()?ImageUtil.FULL_COLORS:ImageUtil.WEB_COLORS,false) ;  
			String url = "/videotv/vodsection.jsp?MODULE="+WebUtil.urlEncode(vod)+"&SECTION="+WebUtil.urlEncode(obj.getTitle()) ;
			String focuslink = "" ;
			if( hppc.getUserAgent().indexOf("-ppp")==-1 ){
				String selected = i==npage*maxItemInPage ? " focused " : "" ;
				focuslink = selected ;
				mediainfo[0] = StringUtil.removeHTMLCode(obj.getTitle()) ;
		   		mediainfo[1] = StringUtil.removeHTMLCode(obj.getDescription()) ;
		   		mediainfo[0] = StringUtil.gsub(mediainfo[0],"'"," ");
		   		mediainfo[1] = StringUtil.gsub(mediainfo[1],"'"," ");
		   		
				focuslink += "onFocus='mediaTitle1=\""+mediainfo[0]+"\";mediaTitle2=\""+mediainfo[1]+"\";' onBlur='mediaTitle1=\"\";mediaTitle2=\"\";'" ;
			} else {
				boolean selected = selitem==null ? (i==npage*maxItemInPage) : i==selid ;
			   	if( selected == true ) {
			   		mediainfo[0] = StringUtil.removeHTMLCode(obj.getTitle()) ;
			   		mediainfo[1] = StringUtil.removeHTMLCode(obj.getDescription()) ;			   		
			   	}
				focuslink = selected==false ? "onFocus='defer_location=\"" + WebUtil.setParam( hppc.getLocalURL(),"SELID="+(i))+"\";'":"focused" ;
			} %>
			<a href="<%=url %>" <%=focuslink %> ><table width="116" height="96" bgcolor="#00000000" border=2 bordercolor="#00000000" cellpadding=2 cellspacing=0 abgcolor="<%=module.getSlinkColor()%>"><tr><td width=112 height=96 valign="center" align="center"><%=imageHtml %></td></tr></table></a>				
		<%} else { %><img height=94 width=1><%} %>
	</td>
<%if( (i+1)%itemPerLine==0 ) {%>
</tr>
<tr><td height=20 colspan="<%=itemPerLine*2 %>"><img height=20></td></tr>
<%} else {%>
<td width=20><img width=20 height=1></td>
<%
}
}
%>
</table>
</td>
<td width=14>
<% if (hppc.getNextPageUrl() != null) { %>
<a href="<%=hppc.getNextPageUrl()%>" onfocus='location="<%=hppc.getNextPageUrl()%>";'><table width="12" height="60" border=0 cellpadding=0 cellspacing=0 vbgcolor="#FF0000FF" bgcolor="#FFFFFFFF" abgcolor="#FF0000FF"><tr><td valign="center" align="center"><img src="/images/nextphoto.gif"></td></tr></table></a>
<%} else {%>
   <img width=12>
<%} %>
</td>
</tr>
<%if( hppc.getUserAgent().indexOf("-ppp")==-1 ){ %>
<tr valign=center><td colspan=3><h2><var name=mediaTitle1 width=550></h2></td></tr>
<tr valign=center><td colspan=3><var name=mediaTitle2 width=550></td></tr>
<%} else { %>
<tr valign=center><td colspan=3><h2><%=mediainfo[0] %></h2></td></tr>
<tr valign=center><td colspan=3><%=mediainfo[1] %></td></tr>
<%} %>
<tr><td colspan=3>
<jsp:include page="vodbottompage.jsp" />
</td></tr>
   </table>
</center>
</body>
</html>

⌨️ 快捷键说明

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