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

📄 removechannel.jsp

📁 HomePlayer is an extention of the FreePlayer software provided by the french internet provider Free
💻 JSP
字号:
<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="org.homeplayer.util.*"%>
<%@page import="java.util.*"%>
<jsp:useBean id="hppc" class="org.homeplayer.web.HPPageContext"
	scope="request">
</jsp:useBean>
<%hppc.setNavLevel(4);
String[] channels = HPConf.getString(HPConf.TV_BOUQUET).split("&");

int pos = 0 ;
int start=0 ;

if (request.getParameter("channel") != null) {
	String myChannels = HPConf.getString(HPConf.TV_BOUQUET);
	String newChannel = request.getParameter("channel");
	if (newChannel.equals("") == false) {
		myChannels += "&";
		myChannels = StringUtil.gsub(myChannels, newChannel + "&", "");
		myChannels = myChannels.endsWith("&") ? myChannels.substring(0, myChannels.length() - 1) : myChannels;
		HPConf.set(HPConf.TV_BOUQUET, myChannels);
		HPConf.save();
		channels = HPConf.getString(HPConf.TV_BOUQUET).split("&");
		XMLTV.shareInstance().clearBouquetProg() ;
	}
}

if( request.getParameter( "pos" ) != null ) {
    pos = Integer.parseInt( request.getParameter( "pos" )  ) ;
} else {
	XMLTV.shareInstance().loadBouquetProg(channels) ;
}

Vector bouquetProg = XMLTV.shareInstance().getCacheProg() ;
start = pos;
int maxInPage = 10 ;

hppc.setHeaderTitle("Enlever une chaine du bouquet");

String localUrl = WebUtil.removeParam(hppc.getLocalURL(), "channel");

for (int i=0; i < Math.ceil((double) bouquetProg.size() / maxInPage); i++) {
	String shortName = ((XMLTVChannel) bouquetProg.get(i*maxInPage)).getName();
	shortName = StringUtil.cut(shortName, 10, ".");
	hppc.addPage(i+1, shortName, WebUtil.setParam(localUrl, "pos=" + (i*maxInPage)));
} 
hppc.setCurrentPage((pos / maxInPage) + 1);
hppc.topCommandAppend("<li><img src=\"/images/novaweb/guideTV.gif\" alt=\"GuideTV\" class=\"img-fav\" /></li>");
%>
<jsp:include page="<%= hppc.getSkin().getHeader() %>"/>
<jsp:include page="../body.jsp" />

<ul class="remove-list">
  
<%
    for( int c=start ; c<bouquetProg.size()&&c<(start+maxInPage) ; c++ ) {
    	XMLTVChannel channel = (XMLTVChannel)bouquetProg.elementAt(c) ;
      
        ImageUtil.ImageInfo imglogo = ImageUtil.getCachedResizedImageInfo( ImageUtil.toUrl(channel.getIcon()),Integer.MAX_VALUE,Integer.MAX_VALUE) ;
                
        if( channel == null ) {
%>
                    <li><img src="<%=imglogo.getPath()%>" alt="Logo Chaine (non renseigné)" class="img-fav" /><em>-Non renseigné-</em></li>
<%      } else {
			String link = "tvprogram.jsp?mode=removechannel&amp;channel="+WebUtil.urlEncode(channel.getName()) ;				
			String label = "-<em>"+channel.getName()+"</em>-" ;
%>
                   <%= hppc.displayMediaItemList(imglogo,label,link,c) %>                   	
      <%}%>        

<%}%>
</ul>

<jsp:include page="<%= hppc.getSkin().getFooter() %>"/>

⌨️ 快捷键说明

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