<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import="com.Admin.daoimpl.SubTypeDaoImpl" %> <%@ page import="com.Admin.daoimpl.SuperTypeDaoImpl" %> <%@ page import="com.Admin.daoimpl.AdminUserDaoImpl" %> <%@ page import="com.Admin.daoimpl.AdminProdDaoImpl" %> <%@ page import="com.Admin.vo.SubType"%> <%@ page import="com.Admin.vo.SuperType"%> <%@ page import="com.Admin.vo.User"%> <%@ page import="com.Admin.vo.Recommend"%> <%@ page import="java.util.ArrayList"%> <%@ page import="java.io.File"%> <%@ page import="net.sf.json.JSONArray"%> <%@ page import="net.sf.json.JSONObject"%> <%@ page import="com.common.IConstant"%> <%@ page import="com.common.Redis"%> <%@ page import="redis.clients.jedis.Jedis"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="cf" uri="/WEB-INF/els.tld" %> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; String realPath = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath()+request.getServletPath().substring(0,request.getServletPath().lastIndexOf("/")+1); String context = request.getServletPath().substring(1,request.getServletPath().lastIndexOf("/")); //String apppath = getServletContext().getRealPath("/tpl/nm"); String apppath = getServletContext().getRealPath("/"+context); String tp = request.getParameter("tp"); if(tp!=null){ apppath = getServletContext().getRealPath("/tpl/"+tp); } response.setCharacterEncoding("utf-8"); request.setCharacterEncoding("utf-8"); String t = "1"; String appid = request.getParameter("appid"); if(appid==null) { appid = IConstant.getCurrentAppid(apppath); if(appid==null){ response.sendRedirect(basePath+"app/error.html?c=1"); return; } } JSONArray catalogs = null; JSONArray subs = new JSONArray(); JSONArray comments = new JSONArray(); int role = 301; int pn=0; int pagenum=12; int pagecount=0;//计算页码 JSONArray recommendLives = null; JSONArray records=new JSONArray(); Jedis redis = null; redis = Redis.getReadRedis(); JSONObject jsonUser = null; //get app JSONObject app = null; app =IConstant.getAppInfo(appid); if(app==null){ response.sendRedirect(basePath+"app/error.html?c=1"); return; } String content = IConstant.readCacheFileAsString(appid, "roomattr.js"); if(content==null||content.isEmpty()) catalogs= new JSONArray(); else catalogs = JSONArray.fromObject(content); recommendLives = IConstant.getRecommendLives(appid);//推荐直播 String template = null; try{ template = app.getString("template"); }catch(Exception ex){ } String email=null; try{ email = app.getString("email"); }catch(Exception ex){ email="bd@andisk.com"; } String web_title=null,web_keywords=null,web_desc=null; JSONObject menumap = new JSONObject(); String stats = null; JSONArray menus = null; int isstatic=0; String cachefile = IConstant.getRootCacheDir(appid)+File.separator+"static.txt"; if(new File(cachefile).exists()){ isstatic = 1; } String webfile = IConstant.getRootDir()+File.separator+"tpl"+File.separator+app.getString("template")+File.separator+"webinfo.js"; System.out.println("web path is "+webfile); if(new File(webfile).exists()) { String webinfo = IConstant.readFile(webfile); JSONObject web = null; try{ web = JSONObject.fromObject(webinfo); web_title= web.getString("title"); web_keywords = web.getString("keywords"); web_desc = web.getString("description"); }catch(Exception ex){ } } //菜单 String webcats = IConstant.getRootDir()+File.separator+"tpl"+File.separator+app.getString("template")+File.separator+"catalogs.js"; System.out.println("web cats path is "+webcats); if(new File(webcats).exists()) { String cts = IConstant.readFile(webcats); System.out.println(" menus content "+cts); try{ menus = JSONArray.fromObject(cts); for(int i=0;i <%=(web_title==null?"在线教育":web_title) %> "> "> /images/icon.png" type="image/x-icon"/>
分类: <%if(catalogs.size()>0){ %> <%} %>
预约:

直播回顾

<% int count=0; for(int i=0;i"); out.println("
"); out.println("
"+sub.getString("subType")+"
"); out.println("

"+sub.getString("teacher")+"播放次数:"+sub.getString("viewnumber")+"

"); out.println("

"); out.println(" 价格:¥0了解详情"); out.println("

"); out.println("
"); out.println(""); if(count>=4){ break; } } } %>
<%if(stats!=null){ out.print(stats); }%>