%@ 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.daoimpl.SubTypeDaoImpl" %> <%@ page import="com.Admin.vo.SubType"%> <%@ page import="com.Admin.vo.SuperType"%> <%@ page import="com.Admin.vo.Product"%> <%@ 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="com.common.ReadDBPropertiesFile"%> <%@ 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/test"); 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";//request.getParameter("t"); String subtypeid = request.getParameter("ar"); String appid = request.getParameter("appid"); if(appid==null) { appid = IConstant.getCurrentAppid(apppath); System.out.println("++live appid "+appid+"&apppath "+apppath); if(appid==null){ response.sendRedirect(basePath+"app/error.html?c=1"); return; } } Jedis redis = null; redis = Redis.getRedis(); int role = 301; //get app JSONObject app = null; app =IConstant.getAppInfo(appid); if(app==null){ response.sendRedirect(basePath+"app/error.html?c=1"); return; } String template = null; try{ template = app.getString("template"); }catch(Exception ex){ } if(template==null){ response.sendRedirect(basePath+"app/error.html?c=5"); return; } //get data //JSONArray jsonTypes = IConstant.getCacheTypes(redis, appid, role, t); JSONArray jsonTypes = new SuperTypeDaoImpl().getJSONSuperTypePublic(appid);//所有对外发布的课程 JSONObject sub = new SubTypeDaoImpl().getJSONSubTypeById(subtypeid); if(sub==null){ response.sendRedirect(basePath+"app/error.html?c=5"); return; } sub.put("producttype", 3);//设置类型为目录 sub.put("url",IConstant.toStaticURL("iType.jsp?ar="+subtypeid, appid)); String picture=null; try{ picture = sub.getString("picture3"); }catch(Exception ex){ int sno = (int)(1+Math.random()*(8)); if(sno<1) sno=1; if(sno>10) sno = 10; picture="/andisk/images/cover/cover"+sno+".jpg"; } JSONArray subs=null; for(int i=0;i "/> "/> 在线课程-<%=sub.getString("subType") %> 个人中心 我的课程 我的收藏 帐户信息 站内消息 退出 登录| 注册 /images/logo.png) 0 0px no-repeat;background-size:contain;background-position-y: 1px!important;" report-tdw="action=rainbow-logo-clk" title="课堂_专业的在线教育平台">课堂 首页 课程库 直播课 线下开班 联系我们 课程 机构 首页 课程库 线下开班 立即报名 首页 ">课程库 <%=sub.getString("subType") %> <%=sub.getString("subType") %> 浏览人数 <%=sub.getString("viewnumber") %> 赞 <%=sub.getString("upnumber") %>次 分享 "><%=sub.getString("subType") %> 更多课程 <%=sub.getString("subType") %> <%=sub.getString("tip") %> <%=sub.getString("introduce") %> <%if(price.equals("0")){ %> 免费 <%}else{ %> 价格 <%=price %> 元 <%} %> 立即报名 立即试学 收藏 <%if(hasIntroduce){ %> 显示大纲 <%=sub.getString("subType") %> <%=sub.getString("tip") %> 100% <%}else{ %> <%=sub.getString("subType") %> <%=sub.getString("tip") %> 100% <%} %> <%if(subs!=null && subs.size()>0){ %> 老师还为你推荐了以下几门课程 <% for(int i=0;i=5) break; JSONObject sb = subs.getJSONObject(i); if(sb.getString("subTypeId").equals(subtypeid)){ continue; } %> .html" target="_blank" class="item-img-link" data-id="116991" data-index="0 + 1" report-tdw="action=Coursecard_Coursecover-clk&ver1=116991&ver3=1.1" cors-path="1"> " alt="<%=sb.getString("subType") %>" title="<%=sb.getString("subType") %>" class="item-img" width="220" height="auto" onerror="javascript:lod(this);"> .html" target="_blank" class="item-tt-link" title="<%=sb.getString("subType") %>" report-tdw="action=Coursecard_Coursesname-clk&ver1=116991&ver3=1.1" cors-path="1"><%=sb.getString("subType") %> <%if(sb.getDouble("price") ==0){%> <%}else{ %> <%} %> <%} %> <%} %> 9 。《》1/23!,(Dan) 6“”!NotsBrihCucl8、
个人中心
<%=sub.getString("tip") %>
100%