Commit e2e4bdc19485cd3172c133563d94065a2a79c06b
0 parents
first commit
Showing
42 changed files
with
4870 additions
and
0 deletions
Too many changes to show.
To preserve performance only 42 of 844 files are displayed.
.classpath
0 → 100644
| 1 | +++ a/.classpath | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<classpath> | ||
| 3 | + <classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
| 4 | + <attributes> | ||
| 5 | + <attribute name="optional" value="true"/> | ||
| 6 | + <attribute name="maven.pomderived" value="true"/> | ||
| 7 | + </attributes> | ||
| 8 | + </classpathentry> | ||
| 9 | + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
| 10 | + <attributes> | ||
| 11 | + <attribute name="optional" value="true"/> | ||
| 12 | + <attribute name="maven.pomderived" value="true"/> | ||
| 13 | + </attributes> | ||
| 14 | + </classpathentry> | ||
| 15 | + <classpathentry including="**/*.java" kind="src" path="src/main/resources"/> | ||
| 16 | + <classpathentry kind="src" path="src/main/resources/i18n"/> | ||
| 17 | + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| 18 | + <attributes> | ||
| 19 | + <attribute name="maven.pomderived" value="true"/> | ||
| 20 | + <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
| 21 | + </attributes> | ||
| 22 | + </classpathentry> | ||
| 23 | + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> | ||
| 24 | + <attributes> | ||
| 25 | + <attribute name="maven.pomderived" value="true"/> | ||
| 26 | + </attributes> | ||
| 27 | + </classpathentry> | ||
| 28 | + <classpathentry kind="output" path="target/classes"/> | ||
| 29 | +</classpath> |
.project
0 → 100644
| 1 | +++ a/.project | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<projectDescription> | ||
| 3 | + <name>cnlive_live_web</name> | ||
| 4 | + <comment></comment> | ||
| 5 | + <projects> | ||
| 6 | + </projects> | ||
| 7 | + <buildSpec> | ||
| 8 | + <buildCommand> | ||
| 9 | + <name>org.eclipse.wst.jsdt.core.javascriptValidator</name> | ||
| 10 | + <arguments> | ||
| 11 | + </arguments> | ||
| 12 | + </buildCommand> | ||
| 13 | + <buildCommand> | ||
| 14 | + <name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
| 15 | + <arguments> | ||
| 16 | + </arguments> | ||
| 17 | + </buildCommand> | ||
| 18 | + <buildCommand> | ||
| 19 | + <name>org.eclipse.jdt.core.javabuilder</name> | ||
| 20 | + <arguments> | ||
| 21 | + </arguments> | ||
| 22 | + </buildCommand> | ||
| 23 | + <buildCommand> | ||
| 24 | + <name>org.eclipse.wst.validation.validationbuilder</name> | ||
| 25 | + <arguments> | ||
| 26 | + </arguments> | ||
| 27 | + </buildCommand> | ||
| 28 | + <buildCommand> | ||
| 29 | + <name>org.eclipse.m2e.core.maven2Builder</name> | ||
| 30 | + <arguments> | ||
| 31 | + </arguments> | ||
| 32 | + </buildCommand> | ||
| 33 | + </buildSpec> | ||
| 34 | + <natures> | ||
| 35 | + <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
| 36 | + <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
| 37 | + <nature>org.eclipse.jdt.core.javanature</nature> | ||
| 38 | + <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
| 39 | + <nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
| 40 | + <nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
| 41 | + </natures> | ||
| 42 | +</projectDescription> |
.settings/.jsdtscope
0 → 100644
| 1 | +++ a/.settings/.jsdtscope | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<classpath> | ||
| 3 | + <classpathentry kind="src" path="WebContent"/> | ||
| 4 | + <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/> | ||
| 5 | + <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject"> | ||
| 6 | + <attributes> | ||
| 7 | + <attribute name="hide" value="true"/> | ||
| 8 | + </attributes> | ||
| 9 | + </classpathentry> | ||
| 10 | + <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/> | ||
| 11 | + <classpathentry kind="output" path=""/> | ||
| 12 | +</classpath> |
.settings/org.eclipse.core.resources.prefs
0 → 100644
.settings/org.eclipse.jdt.core.prefs
0 → 100644
| 1 | +++ a/.settings/org.eclipse.jdt.core.prefs | ||
| 1 | +eclipse.preferences.version=1 | ||
| 2 | +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
| 3 | +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | ||
| 4 | +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 | ||
| 5 | +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
| 6 | +org.eclipse.jdt.core.compiler.compliance=1.6 | ||
| 7 | +org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
| 8 | +org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
| 9 | +org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
| 10 | +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
| 11 | +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
| 12 | +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
| 13 | +org.eclipse.jdt.core.compiler.source=1.6 |
.settings/org.eclipse.m2e.core.prefs
0 → 100644
.settings/org.eclipse.wst.common.component
0 → 100644
| 1 | +++ a/.settings/org.eclipse.wst.common.component | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<project-modules id="moduleCoreId" project-version="1.5.0"> | ||
| 3 | + <wb-module deploy-name="cnlive_live_web"> | ||
| 4 | + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> | ||
| 5 | + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> | ||
| 6 | + <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> | ||
| 7 | + <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> | ||
| 8 | + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources/i18n"/> | ||
| 9 | + <dependent-module archiveName="cnlive_live_model-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_live_model/cnlive_live_model"> | ||
| 10 | + <dependency-type>uses</dependency-type> | ||
| 11 | + </dependent-module> | ||
| 12 | + <dependent-module archiveName="smart-plugin-rest-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-rest/smart-plugin-rest"> | ||
| 13 | + <dependency-type>uses</dependency-type> | ||
| 14 | + </dependent-module> | ||
| 15 | + <dependent-module archiveName="cnlive_ks3-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_ks3/cnlive_ks3"> | ||
| 16 | + <dependency-type>uses</dependency-type> | ||
| 17 | + </dependent-module> | ||
| 18 | + <dependent-module archiveName="smart-framework-4.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-framework/smart-framework"> | ||
| 19 | + <dependency-type>uses</dependency-type> | ||
| 20 | + </dependent-module> | ||
| 21 | + <dependent-module archiveName="smart-plugin-dbcp-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-dbcp/smart-plugin-dbcp"> | ||
| 22 | + <dependency-type>uses</dependency-type> | ||
| 23 | + </dependent-module> | ||
| 24 | + <dependent-module archiveName="smart-plugin-i18n-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-i18n/smart-plugin-i18n"> | ||
| 25 | + <dependency-type>uses</dependency-type> | ||
| 26 | + </dependent-module> | ||
| 27 | + <dependent-module archiveName="cnlive_mam_commons-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_mam_commons/cnlive_mam_commons"> | ||
| 28 | + <dependency-type>uses</dependency-type> | ||
| 29 | + </dependent-module> | ||
| 30 | + <property name="java-output-path" value="/cnlive_live_web/target/classes"/> | ||
| 31 | + <property name="context-root" value="cnlive_live_web"/> | ||
| 32 | + </wb-module> | ||
| 33 | +</project-modules> |
.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
0 → 100644
.settings/org.eclipse.wst.common.project.facet.core.xml
0 → 100644
| 1 | +++ a/.settings/org.eclipse.wst.common.project.facet.core.xml | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<faceted-project> | ||
| 3 | + <installed facet="jst.web" version="3.0"/> | ||
| 4 | + <installed facet="wst.jsdt.web" version="1.0"/> | ||
| 5 | + <installed facet="jst.jaxrs" version="1.1"/> | ||
| 6 | + <installed facet="java" version="1.6"/> | ||
| 7 | +</faceted-project> |
.settings/org.eclipse.wst.jsdt.ui.superType.container
0 → 100644
.settings/org.eclipse.wst.jsdt.ui.superType.name
0 → 100644
.settings/org.eclipse.wst.validation.prefs
0 → 100644
WebContent/META-INF/MANIFEST.MF
0 → 100644
pom.xml
0 → 100644
| 1 | +++ a/pom.xml | ||
| 1 | +<?xml version="1.0"?> | ||
| 2 | +<project | ||
| 3 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
| 4 | + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
| 5 | + <modelVersion>4.0.0</modelVersion> | ||
| 6 | + <parent> | ||
| 7 | + <groupId>com.cnlive.mz.live</groupId> | ||
| 8 | + <artifactId>cnlive_live_core</artifactId> | ||
| 9 | + <relativePath>../cnlive_live_core</relativePath> | ||
| 10 | + <version>1.0.0-SNAPSHOT</version> | ||
| 11 | + </parent> | ||
| 12 | + <groupId>com.cnlive.mz.live.web</groupId> | ||
| 13 | + <artifactId>cnlive_live_web</artifactId> | ||
| 14 | + <version>0.0.1-SNAPSHOT</version> | ||
| 15 | + <name>cnlive_live_web</name> | ||
| 16 | + <url>http://maven.apache.org</url> | ||
| 17 | + <properties> | ||
| 18 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| 19 | + </properties> | ||
| 20 | + <build> | ||
| 21 | + <plugins> | ||
| 22 | + <plugin> | ||
| 23 | + <groupId>org.apache.maven.plugins</groupId> | ||
| 24 | + <artifactId>maven-compiler-plugin</artifactId> | ||
| 25 | + <version>2.5.1</version> | ||
| 26 | + <configuration> | ||
| 27 | + <source>1.6</source> | ||
| 28 | + <target>1.6</target> | ||
| 29 | + </configuration> | ||
| 30 | + </plugin> | ||
| 31 | + </plugins> | ||
| 32 | + </build> | ||
| 33 | + <dependencies> | ||
| 34 | + <dependency> | ||
| 35 | + <groupId>javax.servlet.jsp</groupId> | ||
| 36 | + <artifactId>jsp-api</artifactId> | ||
| 37 | + <version>2.2</version> | ||
| 38 | + </dependency> | ||
| 39 | + <dependency> | ||
| 40 | + <groupId>javax.servlet</groupId> | ||
| 41 | + <artifactId>javax.servlet-api</artifactId> | ||
| 42 | + <version>3.0.1</version> | ||
| 43 | + </dependency> | ||
| 44 | + <dependency> | ||
| 45 | + <groupId>junit</groupId> | ||
| 46 | + <artifactId>junit</artifactId> | ||
| 47 | + <version>3.8.1</version> | ||
| 48 | + <scope>test</scope> | ||
| 49 | + </dependency> | ||
| 50 | + <!-- jstl --> | ||
| 51 | + <dependency> | ||
| 52 | + <groupId>javax.servlet</groupId> | ||
| 53 | + <artifactId>jstl</artifactId> | ||
| 54 | + <version>1.2</version> | ||
| 55 | + <scope>runtime</scope> | ||
| 56 | + </dependency> | ||
| 57 | + <dependency> | ||
| 58 | + <groupId>com.cnlive.mz.live.model</groupId> | ||
| 59 | + <artifactId>cnlive_live_model</artifactId> | ||
| 60 | + <version>0.0.1-SNAPSHOT</version> | ||
| 61 | + </dependency> | ||
| 62 | + <dependency> | ||
| 63 | + <groupId>org.smart4j</groupId> | ||
| 64 | + <artifactId>smart-plugin-rest</artifactId> | ||
| 65 | + <version>1.0</version> | ||
| 66 | + </dependency> | ||
| 67 | + <dependency> | ||
| 68 | + <groupId>com.cnlive</groupId> | ||
| 69 | + <artifactId>cnlive_media_tools</artifactId> | ||
| 70 | + <version>1.0.0</version> | ||
| 71 | + </dependency> | ||
| 72 | + </dependencies> | ||
| 73 | + <packaging>war</packaging> | ||
| 74 | +</project> |
src/main/java/com/cnlive/mz/live/LiveUtils.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/mz/live/LiveUtils.java | ||
| 1 | +package com.cnlive.mz.live; | ||
| 2 | + | ||
| 3 | +import java.util.Calendar; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 当前项目公共类 | ||
| 7 | + * | ||
| 8 | + * @author liujicheng | ||
| 9 | + * | ||
| 10 | + */ | ||
| 11 | +public class LiveUtils { | ||
| 12 | + public static String SESSION_KEY_NAME = "userName"; | ||
| 13 | + public static String SESSION_KEY_ID = "userId"; | ||
| 14 | + | ||
| 15 | + public static String SESSION_ROLE_ID = "roleId"; | ||
| 16 | + | ||
| 17 | + public static void main(String[] args) { | ||
| 18 | + String s = new LiveUtils().getRecentMonths(); | ||
| 19 | + System.out.println(s); | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + public static String getRecentMonths() { | ||
| 23 | + int month = Calendar.getInstance().get(Calendar.MONTH); | ||
| 24 | + StringBuffer sb = new StringBuffer(); | ||
| 25 | + if (month < 12) { | ||
| 26 | + month = month + 1; | ||
| 27 | + } | ||
| 28 | + for (int i = 1; i <= month; i++) { | ||
| 29 | + String m = "'" + i + "月" + "'"; | ||
| 30 | + sb.append(m); | ||
| 31 | + if (i != month) { | ||
| 32 | + sb.append(","); | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + return sb.toString(); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | +} |
src/main/java/com/cnlive/mz/live/action/ActivityAction.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/mz/live/action/ActivityAction.java | ||
| 1 | +/** | ||
| 2 | + * Project Name:cnlive_live_web | ||
| 3 | + * File Name:ActivityAction.java | ||
| 4 | + * Package Name:com.cnlive.mz.live.action | ||
| 5 | + * Date:2015年7月23日下午4:33:14 | ||
| 6 | + * Copyright (c) 2015, cnlive.com All Rights Reserved. | ||
| 7 | + * | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +package com.cnlive.mz.live.action; | ||
| 11 | + | ||
| 12 | +import java.io.IOException; | ||
| 13 | +import java.util.HashMap; | ||
| 14 | +import java.util.List; | ||
| 15 | +import java.util.Map; | ||
| 16 | + | ||
| 17 | +import org.smart4j.framework.dao.bean.Pager; | ||
| 18 | +import org.smart4j.framework.ioc.annotation.Inject; | ||
| 19 | +import org.smart4j.framework.mvc.DataContext; | ||
| 20 | +import org.smart4j.framework.mvc.annotation.Action; | ||
| 21 | +import org.smart4j.framework.mvc.annotation.Request; | ||
| 22 | +import org.smart4j.framework.mvc.bean.Params; | ||
| 23 | +import org.smart4j.framework.mvc.bean.Result; | ||
| 24 | +import org.smart4j.framework.mvc.bean.View; | ||
| 25 | +import org.smart4j.framework.util.CastUtil; | ||
| 26 | + | ||
| 27 | +import com.cnlive.mz.commons.Constants; | ||
| 28 | +import com.cnlive.mz.live.LiveUtils; | ||
| 29 | +import com.cnlive.mz.live.bean.Mp4File; | ||
| 30 | +import com.cnlive.mz.live.entity.TActivity; | ||
| 31 | +import com.cnlive.mz.live.entity.TActivityLog; | ||
| 32 | +import com.cnlive.mz.live.entity.TChannel; | ||
| 33 | +import com.cnlive.mz.live.entity.TDefaultVideo; | ||
| 34 | +import com.cnlive.mz.live.entity.TWowza; | ||
| 35 | +import com.cnlive.mz.live.entity.VActivityWidthUser; | ||
| 36 | +import com.cnlive.mz.live.entity.VChannel; | ||
| 37 | +import com.cnlive.mz.live.entity.VWowzaStream; | ||
| 38 | +import com.cnlive.mz.live.service.TActivityService; | ||
| 39 | +import com.cnlive.mz.live.service.TChannelService; | ||
| 40 | +import com.cnlive.mz.live.service.TSignalService; | ||
| 41 | +import com.cnlive.mz.live.service.TWowzaService; | ||
| 42 | + | ||
| 43 | +/** | ||
| 44 | + * TODO: 活动管理action<br/> | ||
| 45 | + * Date: 2015年7月23日 下午4:33:14 <br/> | ||
| 46 | + * | ||
| 47 | + * @author liujicheng | ||
| 48 | + * @version V1.0 | ||
| 49 | + * @since JDK 1.6 | ||
| 50 | + */ | ||
| 51 | +@Action | ||
| 52 | +public class ActivityAction { | ||
| 53 | + | ||
| 54 | + @Inject | ||
| 55 | + private TChannelService tChannelService; | ||
| 56 | + | ||
| 57 | + @Inject | ||
| 58 | + private TWowzaService tWowzaService; | ||
| 59 | + | ||
| 60 | + @Inject | ||
| 61 | + private TActivityService tActivityService; | ||
| 62 | + | ||
| 63 | + @Inject | ||
| 64 | + private TSignalService tSignalService; | ||
| 65 | + | ||
| 66 | + @Request.Get("/act/ks3/{id}") | ||
| 67 | + public Result ks3(int id) { | ||
| 68 | + TActivity tActivity = tActivityService.getTActivityById(id); | ||
| 69 | + try { | ||
| 70 | + tActivityService.sysToKs3_bak(tActivity); | ||
| 71 | + } catch (Exception e) { | ||
| 72 | + e.printStackTrace(); | ||
| 73 | + } | ||
| 74 | + return new Result(true); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + @Request.Get("/activity/preload") | ||
| 78 | + public View preload() { | ||
| 79 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 80 | + List<TDefaultVideo> tDefaultVideos = tActivityService.getTDefaultVideos(); | ||
| 81 | + List<TChannel> tChannels = tChannelService.getTChannels(user_id, 1); | ||
| 82 | + View view = new View("activity/activity_add.jsp"); | ||
| 83 | + view.data("tChannels", tChannels); | ||
| 84 | + view.data("tDefaultVideos", tDefaultVideos); | ||
| 85 | + return view; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + @Request.Get("/activity/preloadWowza/{id}") | ||
| 89 | + public View preloadWowza(int id) { | ||
| 90 | + TActivity tActivity = tActivityService.getTActivityById(id); | ||
| 91 | + List<TWowza> tWowzas = tWowzaService.getAllTWowzas(); | ||
| 92 | + List<TChannel> tChannels = tChannelService.getTChannelsByActivityId(tActivity.getId()); | ||
| 93 | + View view = new View("activity/activity_append_wowza.jsp"); | ||
| 94 | + view.data("tActivity", tActivity); | ||
| 95 | + view.data("tWowzas", tWowzas); | ||
| 96 | + view.data("tChannels", tChannels); | ||
| 97 | + return view; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + @Request.Get("/activity/list/{page_number}") | ||
| 101 | + public View list(int page_number) { | ||
| 102 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 103 | + int roleId=CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_ROLE_ID)); | ||
| 104 | + Pager<VActivityWidthUser> tActivitys =null; | ||
| 105 | + if (roleId==1) { | ||
| 106 | + //管理員 | ||
| 107 | + tActivitys = tActivityService.getTActivityPager(page_number, Constants.PAGE_SIZE); | ||
| 108 | + }else{ | ||
| 109 | + tActivitys = tActivityService.getTActivityPager(page_number, Constants.PAGE_SIZE, | ||
| 110 | + user_id); | ||
| 111 | + } | ||
| 112 | + return new View("activity/activity_management.jsp").data("tActivitys", tActivitys); | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + @Request.Get("/activity/detail/{id}") | ||
| 116 | + public View detail(int id) { | ||
| 117 | + List<VChannel> vChannels = tChannelService.getVChannelByActivityId(id); | ||
| 118 | + return new View("activity/activity_management.jsp").data("vChannels", vChannels); | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + @Request.Post("/activity/search/{page_number}") | ||
| 122 | + public View list(int page_number, Params params) { | ||
| 123 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 124 | + String name = params.getString("search_text"); | ||
| 125 | + Pager<VActivityWidthUser> tActivitys = tActivityService.getTActivityPagerSearch(page_number, | ||
| 126 | + Constants.PAGE_SIZE, user_id, name); | ||
| 127 | + return new View("activity/activity_management.jsp").data("tActivitys", tActivitys); | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + // 删除 | ||
| 131 | + @Request.Get("/activity/delete/{id}") | ||
| 132 | + public Result delete(int id) { | ||
| 133 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 134 | + return tActivityService.delete(id, user_id); | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + // 查看读取 | ||
| 138 | + @Request.Get("/activity/edit/{id}") | ||
| 139 | + public View edit(int id) { | ||
| 140 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 141 | + TActivity tActivity = tActivityService.getTActivityById(id); | ||
| 142 | + List<TChannel> tChannels = tChannelService.getTChannels(user_id, 1); | ||
| 143 | + View view = new View("activity/activity_add.jsp"); | ||
| 144 | + List<TDefaultVideo> tDefaultVideos = tActivityService.getTDefaultVideos(); | ||
| 145 | + view.data("tChannels", tChannels); | ||
| 146 | + view.data("tActivity", tActivity); | ||
| 147 | + view.data("tDefaultVideos", tDefaultVideos); | ||
| 148 | + return view; | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + @Request.Get("/activity/preview/{id}") | ||
| 152 | + public View preview(int id) { | ||
| 153 | + TActivity tActivity = tActivityService.getTActivityById(id); | ||
| 154 | + List<VChannel> vChannels = tChannelService.getVChannelByActivityId(id); | ||
| 155 | + View view = new View("activity/activity_preview.jsp"); | ||
| 156 | + view.data("tActivity", tActivity); | ||
| 157 | + view.data("vChannels", vChannels); | ||
| 158 | + return view; | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + // 修改直播时间 | ||
| 162 | + @Request.Post("/activity/update/time") | ||
| 163 | + public Result updateTime(Params params) { | ||
| 164 | + Map map = new HashMap(); | ||
| 165 | + String id = params.getString("id"); | ||
| 166 | + map.put("start_time", params.getString("start_time")); | ||
| 167 | + map.put("end_time", params.getString("end_time")); | ||
| 168 | + tActivityService.update(map, id); | ||
| 169 | + return new Result(true); | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + @Request.Post("/activity/appendStream") | ||
| 173 | + public Result appendStream(Params params) { | ||
| 174 | + boolean flag = tActivityService.appendStream(params); | ||
| 175 | + System.out.println("flag:" + flag); | ||
| 176 | + return new Result(flag); | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + @Request.Post("/activity/add") | ||
| 180 | + public Result add(Params params) { | ||
| 181 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 182 | + tActivityService.add(params, user_id); | ||
| 183 | + return new Result(true); | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + // 直播前 | ||
| 187 | + @Request.Get("/activity/stepBefore/{id}") | ||
| 188 | + public View stepBefore(int id) { | ||
| 189 | + TActivity tActivity = tActivityService.getTActivityById(id); | ||
| 190 | + List<VChannel> vChannels = tChannelService.getVChannelByActivityId(tActivity.getId()); | ||
| 191 | + View view = new View("activity/activity_step_before.jsp"); | ||
| 192 | + view.data("tActivity", tActivity); | ||
| 193 | + view.data("vChannels", vChannels); | ||
| 194 | + return view; | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + // 直播中 | ||
| 198 | + @Request.Get("/activity/stepIn/{id}") | ||
| 199 | + public View stepIn(int id) { | ||
| 200 | + TActivity tActivity = tActivityService.getTActivityById(id); | ||
| 201 | + List<VChannel> vChannels = tChannelService.getVChannelByActivityId(tActivity.getId()); | ||
| 202 | + View view = new View("activity/activity_step_in.jsp"); | ||
| 203 | + view.data("tActivity", tActivity); | ||
| 204 | + view.data("vChannels", vChannels); | ||
| 205 | + return view; | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + // 直播后 | ||
| 209 | + @Request.Get("/activity/stepAfter/{id}") | ||
| 210 | + public View stepAfter(int id) { | ||
| 211 | + TActivity tActivity = tActivityService.getTActivityById(id); | ||
| 212 | + List<VChannel> vChannels = tChannelService.getVChannelByActivityId(tActivity.getId()); | ||
| 213 | + View view = new View("activity/activity_step_after.jsp"); | ||
| 214 | + view.data("tActivity", tActivity); | ||
| 215 | + view.data("vChannels", vChannels); | ||
| 216 | + return view; | ||
| 217 | + } | ||
| 218 | + | ||
| 219 | + // 发布直播回放 | ||
| 220 | + @Request.Get("/activity/publishReview/{id}") | ||
| 221 | + public Result publishReview(int id) { | ||
| 222 | + boolean flag = tActivityService.publishReview(id); | ||
| 223 | + return new Result(flag); | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + // 切换 | ||
| 227 | + @Request.Get("/activity/doswitch/{id}") | ||
| 228 | + public Result doSwitch(int id) { | ||
| 229 | + tActivityService.doSwitch(id); | ||
| 230 | + return new Result(true); | ||
| 231 | + } | ||
| 232 | + | ||
| 233 | + @Request.Get("/activity/checkfile/{id}") | ||
| 234 | + public Result checkfile(int id) { | ||
| 235 | + List<String> list = tActivityService.checkfile(id); | ||
| 236 | + return new Result(true).data(list); | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + /** | ||
| 240 | + * 活动停止 | ||
| 241 | + * | ||
| 242 | + * @param id | ||
| 243 | + * @return | ||
| 244 | + */ | ||
| 245 | + @Request.Get("/activity/stop/{id}") | ||
| 246 | + public Result stop(int id) { | ||
| 247 | + tActivityService.stop(id); | ||
| 248 | + return new Result(true); | ||
| 249 | + } | ||
| 250 | + | ||
| 251 | + /** | ||
| 252 | + * 紧急插播宣传片 | ||
| 253 | + * | ||
| 254 | + * @param id | ||
| 255 | + * 活动id | ||
| 256 | + * @return | ||
| 257 | + */ | ||
| 258 | + @Request.Get("/activity/advideo/{id}") | ||
| 259 | + public Result advideo(int id) { | ||
| 260 | + boolean falg = tActivityService.advideo(id); | ||
| 261 | + return new Result(falg); | ||
| 262 | + } | ||
| 263 | + | ||
| 264 | + /** | ||
| 265 | + * 替换输出epg | ||
| 266 | + * | ||
| 267 | + * @param id | ||
| 268 | + * @return | ||
| 269 | + */ | ||
| 270 | + @Request.Get("/activity/epg/{id}") | ||
| 271 | + public Result replaceEpg(int id) { | ||
| 272 | + tActivityService.replaceEpg(id); | ||
| 273 | + return new Result(true); | ||
| 274 | + } | ||
| 275 | +} |
src/main/java/com/cnlive/mz/live/action/ChannelAction.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/mz/live/action/ChannelAction.java | ||
| 1 | +package com.cnlive.mz.live.action; | ||
| 2 | + | ||
| 3 | +import java.io.File; | ||
| 4 | +import java.io.IOException; | ||
| 5 | +import java.util.List; | ||
| 6 | +import java.util.Map; | ||
| 7 | + | ||
| 8 | +import org.apache.commons.io.FileUtils; | ||
| 9 | +import org.smart4j.framework.dao.bean.Pager; | ||
| 10 | +import org.smart4j.framework.ioc.annotation.Inject; | ||
| 11 | +import org.smart4j.framework.mvc.DataContext; | ||
| 12 | +import org.smart4j.framework.mvc.annotation.Action; | ||
| 13 | +import org.smart4j.framework.mvc.annotation.Request; | ||
| 14 | +import org.smart4j.framework.mvc.bean.Multipart; | ||
| 15 | +import org.smart4j.framework.mvc.bean.Multiparts; | ||
| 16 | +import org.smart4j.framework.mvc.bean.Params; | ||
| 17 | +import org.smart4j.framework.mvc.bean.Result; | ||
| 18 | +import org.smart4j.framework.mvc.bean.View; | ||
| 19 | +import org.smart4j.framework.util.CastUtil; | ||
| 20 | + | ||
| 21 | +import com.cnlive.mz.commons.CnliveUtil; | ||
| 22 | +import com.cnlive.mz.commons.Constants; | ||
| 23 | +import com.cnlive.mz.live.LiveUtils; | ||
| 24 | +import com.cnlive.mz.live.bean.TWowzaSignalBean; | ||
| 25 | +import com.cnlive.mz.live.entity.TChannel; | ||
| 26 | +import com.cnlive.mz.live.entity.TWowza; | ||
| 27 | +import com.cnlive.mz.live.entity.VChannel; | ||
| 28 | +import com.cnlive.mz.live.service.TChannelService; | ||
| 29 | +import com.cnlive.mz.live.service.TWowzaService; | ||
| 30 | + | ||
| 31 | +@Action | ||
| 32 | +public class ChannelAction { | ||
| 33 | + | ||
| 34 | + @Inject | ||
| 35 | + private TChannelService tChannelService; | ||
| 36 | + | ||
| 37 | + @Inject | ||
| 38 | + private TWowzaService tWowzaService; | ||
| 39 | + | ||
| 40 | + @Request.Get("/channel/preload") | ||
| 41 | + public View preload() { | ||
| 42 | + List<TWowza> tWowzas = tWowzaService.getAllTWowzas(); | ||
| 43 | + View view = new View("channel/channel_add.jsp"); | ||
| 44 | + view.data("tWowzas", tWowzas); | ||
| 45 | + return view; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + @Request.Get("/channel/list/{page_number}") | ||
| 49 | + public View list(int page_number) { | ||
| 50 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 51 | + Pager<VChannel> tChannels = tChannelService.getTChannelPager(page_number, Constants.PAGE_SIZE, user_id); | ||
| 52 | + return new View("channel/channel_management.jsp").data("tChannels", tChannels); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 删除 | ||
| 57 | + * | ||
| 58 | + * @param id | ||
| 59 | + * @return | ||
| 60 | + */ | ||
| 61 | + @Request.Get("/channel/delete/{id}") | ||
| 62 | + public Result delete(int id) { | ||
| 63 | + boolean success = tChannelService.delete(id); | ||
| 64 | + return new Result(success); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + // 查看读取 | ||
| 68 | + @Request.Get("/channel/edit/{id}") | ||
| 69 | + public View edit(int id) { | ||
| 70 | + TChannel tChannel = tChannelService.getTChannelById(id); | ||
| 71 | + List<TWowza> tWowzas = tWowzaService.getAllTWowzas(); | ||
| 72 | + TWowzaSignalBean tWowzaSignalBean = tWowzaService.getTWowzaStreamBeanById(tChannel | ||
| 73 | + .getDefault_t_wowza_stream_id()); | ||
| 74 | + View view = new View("channel/channel_add.jsp"); | ||
| 75 | + view.data("tChannel", tChannel); | ||
| 76 | + view.data("tWowzas", tWowzas); | ||
| 77 | + view.data("tWowzaSignalBean", tWowzaSignalBean); | ||
| 78 | + return view; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + @Request.Post("/channel/sort") | ||
| 82 | + public Result sort(Params params) { | ||
| 83 | + String id = params.getString("id"); | ||
| 84 | + String sort = params.getString("sort"); | ||
| 85 | + tChannelService.sort(Integer.parseInt(id), Integer.parseInt(sort)); | ||
| 86 | + return new Result(true); | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + // 频道预览 | ||
| 90 | + @Request.Get("/channel/preview/{id}") | ||
| 91 | + public View preview(int id) { | ||
| 92 | + TChannel tChannel = tChannelService.getTChannelById(id); | ||
| 93 | + int t_wowza_ref_id = tChannel.getT_wowza_stream_id(); | ||
| 94 | + int ref_id = 0; | ||
| 95 | + boolean isLive = true; | ||
| 96 | + if (t_wowza_ref_id > 0) { | ||
| 97 | + ref_id = t_wowza_ref_id; | ||
| 98 | + } else { | ||
| 99 | + isLive = false; | ||
| 100 | + ref_id = tChannel.getDefault_t_wowza_stream_id(); | ||
| 101 | + } | ||
| 102 | + TWowzaSignalBean tWowzaSignalBean = tWowzaService.getTWowzaStreamBeanById(ref_id); | ||
| 103 | + View view = new View("channel/channel_preview.jsp"); | ||
| 104 | + view.data("tChannel", tChannel); | ||
| 105 | + view.data("isLive", isLive); | ||
| 106 | + view.data("tWowzaSignalBean", tWowzaSignalBean); | ||
| 107 | + return view; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + // 添加 | ||
| 111 | + @Request.Post("/channel/add") | ||
| 112 | + public Result add(Params params) { | ||
| 113 | + tChannelService.add(params); | ||
| 114 | + return new Result(true); | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + @Request.Post("/channel/close") | ||
| 118 | + public Result close(Params params) { | ||
| 119 | + String id = params.getString("id"); | ||
| 120 | + String state = params.getString("state"); | ||
| 121 | + boolean success = tChannelService.close(id, state); | ||
| 122 | + return new Result(success); | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + @Request.Get("/channel/monitor/{type}") | ||
| 126 | + public View monitor(int type) { | ||
| 127 | + List<VChannel> vChannels = tChannelService.getVChannels(0, type); | ||
| 128 | + View view = new View("index/monitor.jsp"); | ||
| 129 | + view.data("vChannels", vChannels); | ||
| 130 | + return view; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + @Request.Post("/channel/poster") | ||
| 134 | + public Result upload_poster(Params params, Multiparts multiparts) { | ||
| 135 | + Map<String, Object> fieldMap = params.getFieldMap(); | ||
| 136 | + String image_name = (String) fieldMap.get("image_name"); | ||
| 137 | + Multipart multipart = multiparts.getOne(); | ||
| 138 | + String save_path = DataContext.getServletContext().getRealPath("") + "/static/images/"; | ||
| 139 | + String poser = tChannelService.uploadPoster(fieldMap, multipart, save_path); | ||
| 140 | + File srcFile = new File(poser); | ||
| 141 | + String suffix = CnliveUtil.getFileExtra(poser); | ||
| 142 | + String savePath = save_path + image_name + "." + suffix; | ||
| 143 | + try { | ||
| 144 | + new FileUtils().copyFile(srcFile, new File(savePath)); | ||
| 145 | + } catch (IOException e) { | ||
| 146 | + e.printStackTrace(); | ||
| 147 | + } | ||
| 148 | + return new Result(true).data(savePath); | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + // 复位-初始化 | ||
| 152 | + @Request.Get("/channel/init/{id}") | ||
| 153 | + public Result init(int id) { | ||
| 154 | + boolean isSuccess = tChannelService.init(id); | ||
| 155 | + return new Result(isSuccess); | ||
| 156 | + } | ||
| 157 | +} |
src/main/java/com/cnlive/mz/live/action/IndexAction.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/mz/live/action/IndexAction.java | ||
| 1 | +/** | ||
| 2 | + * Project Name:cnlive_live_web | ||
| 3 | + * File Name:IndexAction.java | ||
| 4 | + * Package Name:com.cnlive.mz.live.action | ||
| 5 | + * Date:2015年8月3日下午3:18:31 | ||
| 6 | + * Copyright (c) 2015, cnlive.com All Rights Reserved. | ||
| 7 | + * | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +package com.cnlive.mz.live.action; | ||
| 11 | + | ||
| 12 | +import java.io.IOException; | ||
| 13 | +import java.util.List; | ||
| 14 | +import java.util.Map; | ||
| 15 | + | ||
| 16 | +import javax.servlet.http.HttpSession; | ||
| 17 | + | ||
| 18 | +import org.smart4j.framework.core.ConfigHelper; | ||
| 19 | +import org.smart4j.framework.ioc.annotation.Inject; | ||
| 20 | +import org.smart4j.framework.mvc.DataContext; | ||
| 21 | +import org.smart4j.framework.mvc.annotation.Action; | ||
| 22 | +import org.smart4j.framework.mvc.annotation.Request; | ||
| 23 | +import org.smart4j.framework.mvc.bean.Params; | ||
| 24 | +import org.smart4j.framework.mvc.bean.Result; | ||
| 25 | +import org.smart4j.framework.mvc.bean.View; | ||
| 26 | +import org.smart4j.framework.util.CastUtil; | ||
| 27 | + | ||
| 28 | +import com.cnlive.mz.live.LiveUtils; | ||
| 29 | +import com.cnlive.mz.live.entity.TActivity; | ||
| 30 | +import com.cnlive.mz.live.entity.TUser; | ||
| 31 | +import com.cnlive.mz.live.entity.VChannel; | ||
| 32 | +import com.cnlive.mz.live.service.TActivityService; | ||
| 33 | +import com.cnlive.mz.live.service.TChannelService; | ||
| 34 | +import com.cnlive.mz.live.service.TUserService; | ||
| 35 | +import com.cnlive.mz.live.service.TWowzaService; | ||
| 36 | + | ||
| 37 | +/** | ||
| 38 | + * TODO: 首页:近期直播和频道播出统计 Date: 2015年8月3日 下午3:18:31 <br/> | ||
| 39 | + * | ||
| 40 | + * @author liujicheng | ||
| 41 | + * @version V1.0 | ||
| 42 | + * @since JDK 1.6 | ||
| 43 | + */ | ||
| 44 | +@Action | ||
| 45 | +public class IndexAction { | ||
| 46 | + @Inject | ||
| 47 | + private TChannelService tChannelService; | ||
| 48 | + @Inject | ||
| 49 | + private TActivityService tActivityService; | ||
| 50 | + @Inject | ||
| 51 | + private TWowzaService tWowzaService; | ||
| 52 | + | ||
| 53 | + @Inject | ||
| 54 | + private TUserService tUserService; | ||
| 55 | + | ||
| 56 | + | ||
| 57 | + int type = 1; | ||
| 58 | + | ||
| 59 | + @Request.Get("/index") | ||
| 60 | + public View index() { | ||
| 61 | + // 近期直播计划 | ||
| 62 | + List<TActivity> recentActivity = tActivityService.getRecentTActivity(5); | ||
| 63 | + // 正在直播中 | ||
| 64 | + List<TActivity> livingActivity = tActivityService.getLivingTActivity(2); | ||
| 65 | + // 频道统计 | ||
| 66 | + String channelCountJson = tChannelService.getChannelCount(); | ||
| 67 | + View view = new View("index/index.jsp"); | ||
| 68 | + view.data("recentActivity", recentActivity); | ||
| 69 | + view.data("livingActivity", livingActivity); | ||
| 70 | + view.data("channelCountJson", channelCountJson); | ||
| 71 | + view.data("recentMonths", LiveUtils.getRecentMonths()); | ||
| 72 | + return view; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + @Request.Get("/switch") | ||
| 76 | + public View forSwitch() { | ||
| 77 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 78 | + List<VChannel> vChannels = tChannelService.getVChannels(user_id, type); | ||
| 79 | + List<Map<String, Object>> wowzas_1 = tWowzaService.getWowzasWidthPublishPoint(1); | ||
| 80 | + List<Map<String, Object>> wowzas_2 = tWowzaService.getWowzasWidthPublishPoint(2); | ||
| 81 | + View view = new View("index/switch.jsp"); | ||
| 82 | + view.data("vChannels", vChannels); | ||
| 83 | + view.data("wowzas_1", wowzas_1); | ||
| 84 | + view.data("wowzas_2", wowzas_2); | ||
| 85 | + return view; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + // 切换 | ||
| 89 | + @Request.Post("/doswitch") | ||
| 90 | + public Result doSwitch(Params params) { | ||
| 91 | + String channel_ids = params.getString("channel_ids"); | ||
| 92 | + String wowza_id = params.getString("wowza_id"); | ||
| 93 | + tActivityService.doSwitch(channel_ids, Integer.parseInt(wowza_id)); | ||
| 94 | + return new Result(true); | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + @Request.Get("/login/success") | ||
| 98 | + public View loginSuccess(Params params) { | ||
| 99 | + String userName = params.getString("username"); | ||
| 100 | + TUser tUser = tUserService.login(userName); | ||
| 101 | + View view = null; | ||
| 102 | + if (tUser == null) { | ||
| 103 | + view = new View("index/loginfail.jsp"); | ||
| 104 | + } else { | ||
| 105 | + HttpSession session=DataContext.getRequest().getSession(); | ||
| 106 | + session.setAttribute(LiveUtils.SESSION_KEY_NAME, tUser.getName()); | ||
| 107 | + session.setAttribute(LiveUtils.SESSION_KEY_ID, tUser.getId()); | ||
| 108 | + session.setAttribute(LiveUtils.SESSION_ROLE_ID, tUser.getIs_admin()); | ||
| 109 | + // 近期直播计划 | ||
| 110 | + List<TActivity> recentActivity = tActivityService.getRecentTActivity(5); | ||
| 111 | + // 正在直播中 | ||
| 112 | + List<TActivity> livingActivity = tActivityService.getLivingTActivity(2); | ||
| 113 | + // 频道统计 | ||
| 114 | + String channelCountJson = tChannelService.getChannelCount(); | ||
| 115 | + view = new View("index/index.jsp"); | ||
| 116 | + view.data("recentActivity", recentActivity); | ||
| 117 | + view.data("livingActivity", livingActivity); | ||
| 118 | + view.data("channelCountJson", channelCountJson); | ||
| 119 | + view.data("recentMonths", LiveUtils.getRecentMonths()); | ||
| 120 | + } | ||
| 121 | + return view; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + @Request.Get("/logout") | ||
| 125 | + public void logout() { | ||
| 126 | + HttpSession session = DataContext.getRequest().getSession(); | ||
| 127 | + String logoutUrl = ConfigHelper.getString("auth.logout.url"); | ||
| 128 | + String webUrl= ConfigHelper.getString("website.url"); | ||
| 129 | + session.removeAttribute(LiveUtils.SESSION_KEY_NAME); | ||
| 130 | + session.removeAttribute(LiveUtils.SESSION_KEY_ID); | ||
| 131 | + session.invalidate(); | ||
| 132 | + try { | ||
| 133 | + DataContext.getResponse().sendRedirect(logoutUrl+webUrl+"/logout/success"); | ||
| 134 | + } catch (IOException e) { | ||
| 135 | + e.printStackTrace(); | ||
| 136 | + } | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + @Request.Get("/logout/success") | ||
| 140 | + public Result logoutSuccess() { | ||
| 141 | + return new Result(true).data("退出成功"); | ||
| 142 | + } | ||
| 143 | +} |
src/main/java/com/cnlive/mz/live/action/SignalAction.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/mz/live/action/SignalAction.java | ||
| 1 | +package com.cnlive.mz.live.action; | ||
| 2 | + | ||
| 3 | +import org.smart4j.framework.dao.bean.Pager; | ||
| 4 | +import org.smart4j.framework.ioc.annotation.Inject; | ||
| 5 | +import org.smart4j.framework.mvc.annotation.Action; | ||
| 6 | +import org.smart4j.framework.mvc.annotation.Request; | ||
| 7 | +import org.smart4j.framework.mvc.bean.Params; | ||
| 8 | +import org.smart4j.framework.mvc.bean.Result; | ||
| 9 | +import org.smart4j.framework.mvc.bean.View; | ||
| 10 | + | ||
| 11 | +import com.cnlive.mz.commons.Constants; | ||
| 12 | +import com.cnlive.mz.live.entity.TSignal; | ||
| 13 | +import com.cnlive.mz.live.service.TSignalService; | ||
| 14 | + | ||
| 15 | +@Action | ||
| 16 | +public class SignalAction { | ||
| 17 | + | ||
| 18 | + @Inject | ||
| 19 | + private TSignalService tSignalService; | ||
| 20 | + | ||
| 21 | + @Request.Get("/signal/preload") | ||
| 22 | + public View preload() { | ||
| 23 | + View view = new View("signal/signal_add.jsp"); | ||
| 24 | + return view; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + @Request.Get("/signal/list/{page_number}") | ||
| 28 | + public View list(int page_number) { | ||
| 29 | + Pager<TSignal> tSignals = tSignalService.getTSignalPager(page_number, Constants.PAGE_SIZE); | ||
| 30 | + return new View("signal/signal_management.jsp").data("tSignals", tSignals); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 删除 | ||
| 35 | + * | ||
| 36 | + * @param id | ||
| 37 | + * @return | ||
| 38 | + */ | ||
| 39 | + @Request.Post("/signal/delete/{id}") | ||
| 40 | + public Result delete(int id) { | ||
| 41 | + boolean success = tSignalService.delete(id); | ||
| 42 | + return new Result(success); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + // 查看读取 | ||
| 46 | + @Request.Get("/signal/edit/{id}") | ||
| 47 | + public View edit(int id) { | ||
| 48 | + TSignal tSignal = tSignalService.getTSignallById(id); | ||
| 49 | + View view = new View("signal/signal_add.jsp"); | ||
| 50 | + view.data("tSignal", tSignal); | ||
| 51 | + return view; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + // 添加 | ||
| 55 | + @Request.Post("/signal/add") | ||
| 56 | + public Result add(Params params) { | ||
| 57 | + boolean success = tSignalService.add(params); | ||
| 58 | + return new Result(success); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + @Request.Post("/signal/close") | ||
| 62 | + public Result close(Params params) { | ||
| 63 | + String id = params.getString("id"); | ||
| 64 | + String state = params.getString("state"); | ||
| 65 | + boolean success = tSignalService.close(id, state); | ||
| 66 | + return new Result(success); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | +} |
src/main/java/com/cnlive/mz/live/action/WowzaAction.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/mz/live/action/WowzaAction.java | ||
| 1 | +package com.cnlive.mz.live.action; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import java.util.Map; | ||
| 5 | + | ||
| 6 | +import org.smart4j.framework.dao.bean.Pager; | ||
| 7 | +import org.smart4j.framework.ioc.annotation.Inject; | ||
| 8 | +import org.smart4j.framework.mvc.annotation.Action; | ||
| 9 | +import org.smart4j.framework.mvc.annotation.Request; | ||
| 10 | +import org.smart4j.framework.mvc.bean.Params; | ||
| 11 | +import org.smart4j.framework.mvc.bean.Result; | ||
| 12 | +import org.smart4j.framework.mvc.bean.View; | ||
| 13 | + | ||
| 14 | +import com.cnlive.mz.commons.Constants; | ||
| 15 | +import com.cnlive.mz.live.entity.TChannel; | ||
| 16 | +import com.cnlive.mz.live.entity.TWowza; | ||
| 17 | +import com.cnlive.mz.live.entity.TWowzaStream; | ||
| 18 | +import com.cnlive.mz.live.entity.VWowzaStream; | ||
| 19 | +import com.cnlive.mz.live.service.TChannelService; | ||
| 20 | +import com.cnlive.mz.live.service.TSignalService; | ||
| 21 | +import com.cnlive.mz.live.service.TWowzaService; | ||
| 22 | + | ||
| 23 | +@Action | ||
| 24 | +public class WowzaAction { | ||
| 25 | + | ||
| 26 | + @Inject | ||
| 27 | + private TSignalService tSignalService; | ||
| 28 | + | ||
| 29 | + @Inject | ||
| 30 | + private TChannelService tChannelService; | ||
| 31 | + | ||
| 32 | + @Inject | ||
| 33 | + private TWowzaService tWowzaService; | ||
| 34 | + | ||
| 35 | + @Request.Get("/wowza/preload") | ||
| 36 | + public View preload() { | ||
| 37 | + List<Map<String, Object>> tSignals = tSignalService.getDefaultTSignals(); | ||
| 38 | + View view = new View("wowza/wowza_add.jsp"); | ||
| 39 | + view.data("tSignals", tSignals); | ||
| 40 | + return view; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + @Request.Get("/wowza/list/{page_number}") | ||
| 44 | + public View list(int page_number) { | ||
| 45 | + Pager<TWowza> tWowzas = tWowzaService.getTWowzaPager(page_number, Constants.PAGE_SIZE); | ||
| 46 | + return new View("wowza/wowza_management.jsp").data("tWowzas", tWowzas); | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + /** | ||
| 50 | + * 删除 | ||
| 51 | + * | ||
| 52 | + * @param id | ||
| 53 | + * @return | ||
| 54 | + */ | ||
| 55 | + @Request.Post("/wowza/delete/{id}") | ||
| 56 | + public Result delete(int id) { | ||
| 57 | + boolean success = tWowzaService.delete(id); | ||
| 58 | + return new Result(success); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + // 查看读取 | ||
| 62 | + @Request.Get("/wowza/edit/{id}") | ||
| 63 | + public View edit(int id) { | ||
| 64 | + TWowza tWowza = tWowzaService.getTWowzaById(id); | ||
| 65 | + View view = new View("wowza/wowza_add.jsp"); | ||
| 66 | + view.data("tWowza", tWowza); | ||
| 67 | + return view; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + @Request.Get("/wowza/preview/{id}") | ||
| 71 | + public View preview(int id) { | ||
| 72 | + TWowzaStream tWowzaStream = tWowzaService.getTWowzaStreamById(id); | ||
| 73 | + TWowza tWowza = tWowzaService.getTWowzaById(tWowzaStream.getT_wowza_id()); | ||
| 74 | + View view = new View("wowza/wowza_preview.jsp"); | ||
| 75 | + view.data("tWowza", tWowza); | ||
| 76 | + view.data("tWowzaStream", tWowzaStream); | ||
| 77 | + return view; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + // 修改 | ||
| 81 | + @Request.Post("/wowza/update") | ||
| 82 | + public Result update(Params params) { | ||
| 83 | + tWowzaService.update(params); | ||
| 84 | + return new Result(true); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + // 添加 | ||
| 88 | + @Request.Post("/wowza/add") | ||
| 89 | + public Result add(Params params) { | ||
| 90 | + tWowzaService.add(params); | ||
| 91 | + return new Result(true); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 同步wowza服务器 | ||
| 96 | + * | ||
| 97 | + * @param params | ||
| 98 | + * @return | ||
| 99 | + */ | ||
| 100 | + @Request.Post("/wowza/sys") | ||
| 101 | + public Result sys(Params params) { | ||
| 102 | + String ip = params.getString("ip"); | ||
| 103 | + List streams = tWowzaService.sysWowzaServer(ip); | ||
| 104 | + boolean success = true; | ||
| 105 | + if (streams == null || streams.size() <= 0) { | ||
| 106 | + success = false; | ||
| 107 | + } | ||
| 108 | + return new Result(success).data(streams); | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + @Request.Get("/wowza/tosys/{id}") | ||
| 112 | + public View toSys(int id) { | ||
| 113 | + TWowza tWowza = tWowzaService.getTWowzaById(id); | ||
| 114 | + List<VWowzaStream> vWSRList = tWowzaService.getVWowzaStream(id); | ||
| 115 | + //List<Map<String, Object>> signalMap = tWowzaService.getTSignalIpNames(id); | ||
| 116 | + List<Map<String, Object>> tSignals = tSignalService.getDefaultTSignals(); | ||
| 117 | + View view = new View("wowza/wowza_sys.jsp"); | ||
| 118 | + //view.data("signalMap", signalMap); | ||
| 119 | + view.data("tSignals", tSignals); | ||
| 120 | + view.data("tWowza", tWowza); | ||
| 121 | + view.data("vWSRList", vWSRList); | ||
| 122 | + return view; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + @Request.Post("/wowza/addStreams") | ||
| 126 | + public Result addStreams(Params params) { | ||
| 127 | + tWowzaService.addStreams(params); | ||
| 128 | + return new Result(true); | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + @Request.Get("/wowza/delStreams/{id}") | ||
| 132 | + public Result delStreams(int id) { | ||
| 133 | + List<TChannel> channels = tChannelService.getTChannelsByStreamId(id); | ||
| 134 | + boolean success = true; | ||
| 135 | + if (channels.size() > 0) { | ||
| 136 | + success = false; | ||
| 137 | + }else{ | ||
| 138 | + tWowzaService.delStreams(id); | ||
| 139 | + } | ||
| 140 | + return new Result(success); | ||
| 141 | + } | ||
| 142 | +} |
src/main/java/com/cnlive/mz/live/aspect/ActionAspect.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/mz/live/aspect/ActionAspect.java | ||
| 1 | +package com.cnlive.mz.live.aspect; | ||
| 2 | + | ||
| 3 | +import java.lang.reflect.Method; | ||
| 4 | + | ||
| 5 | +import javax.servlet.http.HttpServletRequest; | ||
| 6 | + | ||
| 7 | +import org.slf4j.Logger; | ||
| 8 | +import org.slf4j.LoggerFactory; | ||
| 9 | +import org.smart4j.framework.aop.AspectProxy; | ||
| 10 | +import org.smart4j.framework.aop.annotation.Aspect; | ||
| 11 | +import org.smart4j.framework.mvc.DataContext; | ||
| 12 | +import org.smart4j.framework.mvc.annotation.Action; | ||
| 13 | + | ||
| 14 | +@Aspect(annotation = Action.class) | ||
| 15 | +public class ActionAspect extends AspectProxy { | ||
| 16 | + | ||
| 17 | + | ||
| 18 | + @Override | ||
| 19 | + public void before(Class<?> cls, Method method, Object[] params) throws Throwable { | ||
| 20 | + String ip=this.getRemoteUserIp(DataContext.getRequest()); | ||
| 21 | + System.out.println("ip:"+ip); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + @Override | ||
| 25 | + public void after(Class<?> cls, Method method, Object[] params, Object result) throws Throwable { | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + private String getRemoteUserIp(HttpServletRequest request) { | ||
| 29 | + String ip = request.getHeader("x-forwarded-for"); | ||
| 30 | + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { | ||
| 31 | + ip = request.getHeader("Proxy-Client-IP"); | ||
| 32 | + } | ||
| 33 | + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { | ||
| 34 | + ip = request.getHeader("WL-Proxy-Client-IP"); | ||
| 35 | + } | ||
| 36 | + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { | ||
| 37 | + ip = request.getRemoteAddr(); | ||
| 38 | + } | ||
| 39 | + if (ip.contains(",")) { | ||
| 40 | + ip = ip.split(",")[0]; | ||
| 41 | + } | ||
| 42 | + if (ip.equals("0:0:0:0:0:0:0:1")) { | ||
| 43 | + ip = "127.0.0.1"; | ||
| 44 | + } | ||
| 45 | + return ip; | ||
| 46 | + } | ||
| 47 | +} |
src/main/java/com/cnlive/mz/live/aspect/AuthFilter.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/mz/live/aspect/AuthFilter.java | ||
| 1 | +package com.cnlive.mz.live.aspect; | ||
| 2 | + | ||
| 3 | +import java.io.IOException; | ||
| 4 | + | ||
| 5 | +import javax.servlet.Filter; | ||
| 6 | +import javax.servlet.FilterChain; | ||
| 7 | +import javax.servlet.FilterConfig; | ||
| 8 | +import javax.servlet.ServletContext; | ||
| 9 | +import javax.servlet.ServletException; | ||
| 10 | +import javax.servlet.ServletRequest; | ||
| 11 | +import javax.servlet.ServletResponse; | ||
| 12 | +import javax.servlet.annotation.WebFilter; | ||
| 13 | +import javax.servlet.http.HttpServletRequest; | ||
| 14 | +import javax.servlet.http.HttpServletResponse; | ||
| 15 | +import javax.servlet.http.HttpSession; | ||
| 16 | + | ||
| 17 | +import org.smart4j.framework.core.ConfigHelper; | ||
| 18 | +import org.smart4j.framework.orm.DataSet; | ||
| 19 | + | ||
| 20 | +import com.cnlive.mz.live.LiveUtils; | ||
| 21 | +import com.cnlive.mz.live.entity.TActivity; | ||
| 22 | +import com.cnlive.mz.live.entity.TUser; | ||
| 23 | + | ||
| 24 | +/* | ||
| 25 | + * | ||
| 26 | + | ||
| 27 | + 属性 是否必须 说明 | ||
| 28 | + asyncSupported 否 该Filter是否支持异步操作模式 | ||
| 29 | + dispatcherType 否 指定Filter对那种dispatcher模式进行过滤 该属性支持 Async,Error Forward,include,request | ||
| 30 | + displayName 否 File 显示的名称 | ||
| 31 | + filterName 是 Filter的名称 | ||
| 32 | + initParams 否 Filter的配置参数 | ||
| 33 | + servletNames 否 可以指定多个,表示对这几个特定的的serlet 进行过滤 | ||
| 34 | + urlPatterns/value 否 指定 Filter拦截的 URL | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + | ||
| 39 | + @WebFilter(filterName="log",urlPatterns={"/*"})*/ | ||
| 40 | +@WebFilter(filterName = "AuthFilter", urlPatterns = { "/activity/*", "/channel/*", "/signal/*", "/index/*", | ||
| 41 | + "/switch/*", "/doswitch/*", "/wowza/*" }) | ||
| 42 | +public class AuthFilter implements Filter { | ||
| 43 | + | ||
| 44 | + private FilterConfig config; | ||
| 45 | + | ||
| 46 | + @Override | ||
| 47 | + public void destroy() { | ||
| 48 | + this.config = null; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + @Override | ||
| 52 | + public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain chain) throws IOException, | ||
| 53 | + ServletException { | ||
| 54 | + HttpServletRequest request = (HttpServletRequest) arg0; | ||
| 55 | + HttpServletResponse response = (HttpServletResponse) arg1; | ||
| 56 | + String requestUrl = request.getRequestURI(); | ||
| 57 | + HttpSession session = request.getSession(); | ||
| 58 | + String webUrl = ConfigHelper.getString("website.url"); | ||
| 59 | + if (session.getAttribute(LiveUtils.SESSION_KEY_NAME) == null) { | ||
| 60 | + boolean authEnable = ConfigHelper.getBoolean("auth.enable"); | ||
| 61 | + String loginUrl = ConfigHelper.getString("auth.login.url"); | ||
| 62 | + if (authEnable) { | ||
| 63 | + //去登录认证 | ||
| 64 | + response.sendRedirect(loginUrl + webUrl+"/login/success"); | ||
| 65 | + return; | ||
| 66 | + } else { | ||
| 67 | + String userName = "liujicheng"; | ||
| 68 | + request.getSession().setAttribute(LiveUtils.SESSION_KEY_NAME, userName); | ||
| 69 | + request.getSession().setAttribute(LiveUtils.SESSION_KEY_ID, 1); | ||
| 70 | + } | ||
| 71 | + } else { | ||
| 72 | + chain.doFilter(arg0, arg1); | ||
| 73 | + } | ||
| 74 | + // 验证用户是否是退出,进行sessioin销毁 | ||
| 75 | + if (requestUrl.contains("logout")) { | ||
| 76 | + String logoutUrl = ConfigHelper.getString("auth.logout.url"); | ||
| 77 | + session.removeAttribute(LiveUtils.SESSION_KEY_NAME); | ||
| 78 | + session.removeAttribute(LiveUtils.SESSION_KEY_ID); | ||
| 79 | + session.invalidate(); | ||
| 80 | + response.sendRedirect(logoutUrl); | ||
| 81 | + } | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + @Override | ||
| 85 | + public void init(FilterConfig config) throws ServletException { | ||
| 86 | + this.config = config; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | +} |
src/main/java/com/cnlive/mz/live/rest/AjaxRest.java
0 → 100644
| 1 | +++ a/src/main/java/com/cnlive/mz/live/rest/AjaxRest.java | ||
| 1 | +package com.cnlive.mz.live.rest; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +import javax.ws.rs.Consumes; | ||
| 6 | +import javax.ws.rs.GET; | ||
| 7 | +import javax.ws.rs.Path; | ||
| 8 | +import javax.ws.rs.PathParam; | ||
| 9 | +import javax.ws.rs.Produces; | ||
| 10 | +import javax.ws.rs.core.MediaType; | ||
| 11 | + | ||
| 12 | +import org.smart4j.framework.orm.DataSet; | ||
| 13 | +import org.smart4j.framework.tx.annotation.Service; | ||
| 14 | +import org.smart4j.plugin.rest.Rest; | ||
| 15 | + | ||
| 16 | +import com.cnlive.mz.live.bean.WowzaBean; | ||
| 17 | +import com.cnlive.mz.live.entity.TChannel; | ||
| 18 | +import com.cnlive.mz.live.entity.TUser; | ||
| 19 | +import com.cnlive.mz.live.entity.TWowza; | ||
| 20 | +import com.cnlive.mz.live.entity.TWowzaStream; | ||
| 21 | +import com.cnlive.mz.live.entity.VWowzaStream; | ||
| 22 | + | ||
| 23 | +@Service | ||
| 24 | +@Rest("ajax") | ||
| 25 | +@Consumes(MediaType.APPLICATION_JSON) | ||
| 26 | +@Produces(MediaType.APPLICATION_JSON) | ||
| 27 | +public class AjaxRest { | ||
| 28 | + | ||
| 29 | + @GET | ||
| 30 | + @Path("/users/{name}") | ||
| 31 | + public List<TUser> getTUsers(@PathParam("name") String name) { | ||
| 32 | + return DataSet.selectListWithCondition(TUser.class, " name like ? order by id desc limit 20", "%" + name + "%"); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + // 全局切换页面,根据wowza 获取关联频道 | ||
| 36 | + @GET | ||
| 37 | + @Path("/ref/channels/{id}") | ||
| 38 | + public List<TChannel> getTChannels(@PathParam("id") String id) { | ||
| 39 | + return DataSet.selectListWithCondition(TChannel.class, " t_wowza_stream_id=? order by id desc", id); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + // 全局切换页面,根据频道获取wowza | ||
| 43 | + @GET | ||
| 44 | + @Path("/ref/wowza/{id}") | ||
| 45 | + public WowzaBean getTWowza(@PathParam("id") String id) { | ||
| 46 | + TChannel tChannel = DataSet.select(TChannel.class, "id=?", id); | ||
| 47 | + TWowzaStream tWowzaStream = DataSet.select(TWowzaStream.class, "id=?", tChannel.getT_wowza_stream_id()); | ||
| 48 | + if (tWowzaStream == null) { | ||
| 49 | + return null; | ||
| 50 | + } else { | ||
| 51 | + TWowza tWowza = DataSet.select(TWowza.class, "id=?", tWowzaStream.getT_wowza_id()); | ||
| 52 | + return new WowzaBean(tWowzaStream.getId(), tWowza.getLan_ip(), tWowzaStream.getStream_name()); | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + @GET | ||
| 57 | + @Path("/ref/wowzaStreams/{id}") | ||
| 58 | + public List<VWowzaStream> getTWowzaStreams(@PathParam("id") String id) { | ||
| 59 | + return DataSet.selectListWithCondition(VWowzaStream.class, " t_wowza_id=? and type=1", id); | ||
| 60 | + } | ||
| 61 | +} |
src/main/java/template.json
0 → 100644
| 1 | +++ a/src/main/java/template.json | ||
| 1 | +{ | ||
| 2 | + "MAM_Actors": "", | ||
| 3 | + "MAM_Airtime": "2016", | ||
| 4 | + "MAM_BigPostUrl": "", | ||
| 5 | + "MAM_CMCCID": "", | ||
| 6 | + "MAM_CPNAME": "视讯中国", | ||
| 7 | + "MAM_CreateDate": "", | ||
| 8 | + "MAM_Description": "", | ||
| 9 | + "MAM_Director": "", | ||
| 10 | + "MAM_Duration": "", | ||
| 11 | + "MAM_NodeID": "002", | ||
| 12 | + "MAM_NodeName": "娱乐", | ||
| 13 | + "MAM_PosterUrl": "", | ||
| 14 | + "MAM_PrgType": 2, | ||
| 15 | + "MAM_ProducerID": "", | ||
| 16 | + "MAM_PublishDate": "", | ||
| 17 | + "MAM_STAMPTIME": "", | ||
| 18 | + "MAM_SeriesOrder": 0, | ||
| 19 | + "MAM_SeriesSum": 0, | ||
| 20 | + "MAM_SmallPosterUrl": "", | ||
| 21 | + "MAM_SubTitle": "", | ||
| 22 | + "MAM_TVColumnMarkID": "", | ||
| 23 | + "MAM_TVColumnMarkName": "", | ||
| 24 | + "MAM_Tags": "", | ||
| 25 | + "MAM_Title": "", | ||
| 26 | + "MAM_UUID": "", | ||
| 27 | + "MAM_VideoEditor": "", | ||
| 28 | + "MAM_VideoFlashHUrl": "", | ||
| 29 | + "MAM_VideoFlashLUrl": "", | ||
| 30 | + "MAM_VideoFlashUHUrl": "", | ||
| 31 | + "MAM_VideoFlashUrl": "", | ||
| 32 | + "MAM_VideoHUrl": "", | ||
| 33 | + "MAM_VideoLUrl": "", | ||
| 34 | + "MAM_VideoUHUrl": "", | ||
| 35 | + "MAM_VideoUrl": "", | ||
| 36 | + "cms_column_id": "liveshow/", | ||
| 37 | + "cms_column_name": "LiveShow", | ||
| 38 | + "cms_id": 1, | ||
| 39 | + "copyright_id": "", | ||
| 40 | + "copyright_material_id": 0, | ||
| 41 | + "id": "", | ||
| 42 | + "site_id": "3", | ||
| 43 | + "source_path": "" | ||
| 44 | +} | ||
| 0 | \ No newline at end of file | 45 | \ No newline at end of file |
src/main/resources/VHost.xml.properties
0 → 100644
| 1 | +++ a/src/main/resources/VHost.xml.properties | ||
| 1 | + | ||
| 2 | +<HTTPProvider> | ||
| 3 | + <BaseClass>com.cnlive.wowza.plugins.RestartApplication</BaseClass> | ||
| 4 | + <RequestFilters>cnlive/restart*</RequestFilters> | ||
| 5 | + <AuthenticationMethod>none</AuthenticationMethod> | ||
| 6 | +</HTTPProvider> | ||
| 7 | +<HTTPProvider> | ||
| 8 | + <BaseClass>com.cnlive.wowza.plugins.HTTProviderInfoXML</BaseClass> | ||
| 9 | + <RequestFilters>cnlive/info*</RequestFilters> | ||
| 10 | + <AuthenticationMethod>none</AuthenticationMethod> | ||
| 11 | +</HTTPProvider> | ||
| 12 | +<HTTPProvider> | ||
| 13 | + <BaseClass>com.cnlive.wowza.plugins.HTTProviderSwitch</BaseClass> | ||
| 14 | + <RequestFilters>cnlive/switchStream*</RequestFilters> | ||
| 15 | + <AuthenticationMethod>none</AuthenticationMethod> | ||
| 16 | +</HTTPProvider> | ||
| 17 | +<HTTPProvider> | ||
| 18 | + <BaseClass>com.cnlive.wowza.plugins.HTTProviderStreams</BaseClass> | ||
| 19 | + <RequestFilters>cnlive/streams*</RequestFilters> | ||
| 20 | + <AuthenticationMethod>none</AuthenticationMethod> | ||
| 21 | +</HTTPProvider> | ||
| 22 | + | ||
| 0 | \ No newline at end of file | 23 | \ No newline at end of file |
src/main/resources/cnlive_live.sql
0 → 100644
| 1 | +++ a/src/main/resources/cnlive_live.sql | ||
| 1 | +/* | ||
| 2 | +Navicat MySQL Data Transfer | ||
| 3 | + | ||
| 4 | +Source Server : 101.251.198.175 | ||
| 5 | +Source Server Version : 50173 | ||
| 6 | +Source Host : 101.251.198.175:3306 | ||
| 7 | +Source Database : cnlive_live | ||
| 8 | + | ||
| 9 | +Target Server Type : MYSQL | ||
| 10 | +Target Server Version : 50173 | ||
| 11 | +File Encoding : 65001 | ||
| 12 | + | ||
| 13 | +Date: 2015-10-19 14:33:15 | ||
| 14 | +*/ | ||
| 15 | + | ||
| 16 | +SET FOREIGN_KEY_CHECKS=0; | ||
| 17 | + | ||
| 18 | +-- ---------------------------- | ||
| 19 | +-- Table structure for `t_activity` | ||
| 20 | +-- ---------------------------- | ||
| 21 | +DROP TABLE IF EXISTS `t_activity`; | ||
| 22 | +CREATE TABLE `t_activity` ( | ||
| 23 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
| 24 | + `name` varchar(50) DEFAULT NULL COMMENT '活动名称', | ||
| 25 | + `epg_name` varchar(50) DEFAULT NULL COMMENT 'epg 条目名称', | ||
| 26 | + `description` varchar(500) DEFAULT NULL COMMENT '活动描述', | ||
| 27 | + `place` varchar(255) DEFAULT NULL COMMENT '活动地点', | ||
| 28 | + `state` tinyint(2) DEFAULT NULL COMMENT '状态:0:未开始 1:直播中 2:结束 3: 回放同步中 4:同步完成', | ||
| 29 | + `start_time` datetime DEFAULT NULL COMMENT '活动开始时间', | ||
| 30 | + `end_time` datetime DEFAULT NULL COMMENT '活动结束时间', | ||
| 31 | + `contact_user` varchar(255) DEFAULT NULL COMMENT '业务负责人+联系电话', | ||
| 32 | + `user_id` int(11) DEFAULT NULL COMMENT '当前活动建立者', | ||
| 33 | + `v_count` int(11) DEFAULT NULL COMMENT '并发数', | ||
| 34 | + `is_free` tinyint(2) DEFAULT NULL COMMENT '是否免费: 0:收费 1:免费', | ||
| 35 | + `is_playback` tinyint(2) DEFAULT NULL COMMENT '是否启用回放: 0:不启用 1:启用', | ||
| 36 | + `logo` varchar(10) DEFAULT NULL COMMENT '画面logo', | ||
| 37 | + `notify_user` varchar(1024) DEFAULT NULL COMMENT '活动通知人cc', | ||
| 38 | + `uuid` varchar(50) DEFAULT NULL, | ||
| 39 | + `create_time` datetime DEFAULT NULL, | ||
| 40 | + `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 41 | + `playbak_url` varchar(255) DEFAULT NULL, | ||
| 42 | + `t_default_video_id` int(11) DEFAULT NULL, | ||
| 43 | + `chatroom_id` int(11) DEFAULT NULL, | ||
| 44 | + PRIMARY KEY (`id`), | ||
| 45 | + UNIQUE KEY `id` (`id`) | ||
| 46 | +) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; | ||
| 47 | + | ||
| 48 | +-- ---------------------------- | ||
| 49 | +-- Records of t_activity | ||
| 50 | +-- ---------------------------- | ||
| 51 | +INSERT INTO `t_activity` VALUES ('1', '毕夏《我的音乐故事》1', null, null, null, '0', '2015-07-21 15:06:10', '2015-07-30 21:30:13', null, '1', null, null, null, 'tv', 'liujicheng@cnlive.com', '2b088e657e634db6b0432e2d972b4398', '2015-07-30 15:06:13', '2015-09-18 09:47:18', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '1', null); | ||
| 52 | +INSERT INTO `t_activity` VALUES ('2', '毕夏《我的音乐故事》2', null, null, null, '0', '2015-10-21 15:06:10', '2015-07-30 21:30:13', null, '1', null, null, null, 'tv', null, '9961612a712d4ce1b602bd723fb818b2', '2015-07-30 15:06:13', '2015-09-18 09:47:19', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '2', null); | ||
| 53 | +INSERT INTO `t_activity` VALUES ('3', 'IBF西安区排名赛第3场', null, null, null, '0', '2015-07-21 15:06:10', '2015-07-30 21:30:13', null, '1', null, null, null, 'tv', null, '291f66ffeb544fbeafaf41d7a97f8462', '2015-07-30 15:06:13', '2015-09-18 09:47:19', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '2', null); | ||
| 54 | +INSERT INTO `t_activity` VALUES ('4', '徐怀钰内地首开演唱会', null, null, null, '0', '2015-09-21 15:06:10', '2015-07-30 21:30:13', null, '1', null, null, null, 'tv', null, '8d74bef00b194adeae52e16c90425237', '2015-07-30 15:06:13', '2015-09-18 09:47:19', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '2', null); | ||
| 55 | +INSERT INTO `t_activity` VALUES ('5', '毕夏《我的音乐故事》', null, null, null, '0', '2015-07-21 15:06:10', '2015-07-30 21:30:13', null, '1', null, null, null, 'tv', null, 'c8d21158e164433e9ca0d12752e5a43b', '2015-07-30 15:06:13', '2015-09-18 09:47:19', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '2', null); | ||
| 56 | +INSERT INTO `t_activity` VALUES ('6', '秦勇《我的音乐故事》', null, null, null, '1', '2015-07-21 15:06:10', '2015-07-30 21:30:13', null, '1', null, null, null, 'tv', null, '32dac8a68075470882515aa25d727b18', null, '2015-09-18 09:47:20', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '1', null); | ||
| 57 | +INSERT INTO `t_activity` VALUES ('7', 'IBF北京赛区第三场', null, null, null, '1', '2015-08-21 15:06:10', '2015-07-30 21:30:13', null, '1', null, null, null, 'tv', null, '8b72e0fa081640adb443b3a640202474', null, '2015-09-18 09:47:22', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '1', null); | ||
| 58 | +INSERT INTO `t_activity` VALUES ('8', '活动名称', 'EPG条目名', '', '活动地点', '0', '2015-08-07 11:55:00', '2015-08-07 11:55:00', '业务负责人', '1', '22', '1', '1', 'tv', '抄送相关人员', 'e301ca8176a24ba38ae3283541821caa', '2015-08-07 13:49:05', '2015-09-18 09:47:22', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '1', null); | ||
| 59 | +INSERT INTO `t_activity` VALUES ('10', '温岚唱响新赛歌音乐会', 'EPG条目名11', '活动简述11', '活动地点11', '0', '2015-08-10 08:40:00', '2015-08-11 09:25:00', '业务负责人11', '1', '222', '0', '1', 'tv', '抄送相关人员111', '83e52a91a0ac415c9d74fcfaef581d1a', '2015-08-10 13:44:43', '2015-09-18 09:47:23', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '1', null); | ||
| 60 | +INSERT INTO `t_activity` VALUES ('11', '金润吉《我的音乐故事》', 'EPG条目名11', '活动简述11', '活动地点11', '0', '2015-08-10 08:40:00', '2015-08-11 09:25:00', '业务负责人11', '1', '222', '0', '1', 'tv', '抄送相关人员111', '00ae64a18f244697bf0c44c6c463cd6a', '2015-08-10 13:45:38', '2015-09-18 09:47:17', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '1', null); | ||
| 61 | +INSERT INTO `t_activity` VALUES ('12', '温岚唱响新赛歌音乐会', 'EPG条目名11', '活动简述11', '活动地点11', '0', '2015-08-10 08:40:00', '2015-08-11 09:25:00', '业务负责人11', '1', '222', '0', '1', 'tv', '抄送相关人员111', '270e4319ec7345ba8aacdccacd3fd203', '2015-08-10 13:46:17', '2015-09-18 09:47:17', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '2', null); | ||
| 62 | +INSERT INTO `t_activity` VALUES ('13', '金润吉《我的音乐故事》', 'EPG条目名11', '活动简述111', '活动地点', '0', '2015-07-30 02:10:00', '2015-07-28 01:25:00', '务负责人', '1', '222', '1', '1', 'tv', '送相关人员', '5100ca532cb74524a342372bfa335af8', '2015-08-10 13:48:59', '2015-09-18 09:47:17', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '3', null); | ||
| 63 | +INSERT INTO `t_activity` VALUES ('14', '金润吉《我的音乐故事》', 'EPG条目名11', '活动简述111', '活动地点', '0', '2015-07-30 02:10:00', '2015-07-28 01:25:00', '务负责人', '1', '222', '1', '1', 'tv', '送相关人员', '2b4ac96ac8d44277baf020bacf4f5762', '2015-08-10 13:49:36', '2015-09-18 09:47:17', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '3', null); | ||
| 64 | +INSERT INTO `t_activity` VALUES ('15', '活动名称22', 'EPG条目名22', '活动简述22', '活动地点22', '0', '2015-08-10 05:25:00', '2015-08-04 05:25:00', '务负责人', '1', '299', '0', '1', 'tv', '抄送相关人员', 'b0e304bfa3204bbda06cd2c92325735b', '2015-08-10 13:53:01', '2015-09-18 09:47:16', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '3', null); | ||
| 65 | +INSERT INTO `t_activity` VALUES ('16', 'IBF杭州站第三场直播', 'EPG条目名44', '活动简述44', '活动简述44', '0', '2015-08-10 09:45:00', '2015-08-11 09:45:00', '务负责人', '1', '222', '1', '1', 'null', '抄送相关人员', '8a528fb09d1040b6894bce1d3f01c8cd', '2015-08-10 13:55:32', '2015-09-14 09:52:02', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '3', null); | ||
| 66 | +INSERT INTO `t_activity` VALUES ('17', '活动名称66', 'EPG条目名66', 'EPG条目名66', '活动地点66', '0', '2015-08-10 05:25:00', '2015-08-10 05:25:00', '业务负责人', '1', '33', '0', '0', 'null', '抄送相关人员', '94cc3a93ea0d4da1b1b35b8e23a9114a', '2015-08-10 13:57:00', '2015-09-14 09:52:02', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '3', null); | ||
| 67 | +INSERT INTO `t_activity` VALUES ('18', '活动名称77', 'EPG条目名77', '活动简述77', '活动地点77', '3', '2015-08-18 15:44:00', '2015-07-28 01:36:00', '业务负责人', '1', '399', '0', '0', 'null', '抄送相关人员', '50b609e8a4784a7baeb99b9ca13e6ac9', '2015-08-10 14:12:24', '2015-09-14 09:52:02', 'http://video00.cnlive.com/video/data2/2015/0823/d8ec60a93ae9454e944d492606be71ee_67857_200.mp4', '3', null); | ||
| 68 | +INSERT INTO `t_activity` VALUES ('19', '张学友北京演唱会', '张学友北京演唱会', '张学友北京演唱会', '北京工体', '0', '2015-09-10 20:00:00', '2015-09-10 22:00:00', '曹峰', '1', '333', '1', null, 'tv', 'liujicheng@cnlive.com', '1b4324e4964e4998b3647214d7927d7d', '2015-09-10 10:31:23', '2015-09-18 09:47:09', null, '3', null); | ||
| 69 | +INSERT INTO `t_activity` VALUES ('20', '刘德华北京终结演唱会', '刘德华北京终结演唱会', '刘德华北京终结演唱会', '刘德华北京终结演唱会', '0', '2015-09-18 11:00:00', '2015-09-17 12:00:00', '草鞥', '1', '200', '1', '1', 'tv', 'liujicheng@cnlive.com', '3e2ade3d2f954a6fab1e85bc803028a7', '2015-09-17 10:56:56', '2015-09-17 10:57:03', null, '1', null); | ||
| 70 | +INSERT INTO `t_activity` VALUES ('21', '刘德华北京终结演唱会', '刘德华北京终结演唱会', '刘德华北京终结演唱会', '刘德华北京终结演唱会', '0', '2015-09-17 10:00:00', '2015-09-17 10:55:00', '22', '1', '22', '1', '1', 'tv', 'liujicheng@cnlive.com', 'bf6b4c735b83491b83e9fc6578dbdf36', '2015-09-17 11:00:44', '2015-09-17 11:00:44', null, '1', null); | ||
| 71 | +INSERT INTO `t_activity` VALUES ('22', '刘德华北京终结演唱会', '刘德华北京终结演唱会', '刘德华北京终结演唱会', '刘德华北京终结演唱会', '0', '2015-10-27 14:50:00', '2015-10-27 22:50:00', '曹峰', '1', '200', '1', '1', 'tv', 'liujicheng@cnlive.com', '55a724c348774549bcb82dde4cd89f03', '2015-09-17 11:03:58', '2015-10-15 16:01:27', null, '2', '0'); | ||
| 72 | + | ||
| 73 | +-- ---------------------------- | ||
| 74 | +-- Table structure for `t_activity_log` | ||
| 75 | +-- ---------------------------- | ||
| 76 | +DROP TABLE IF EXISTS `t_activity_log`; | ||
| 77 | +CREATE TABLE `t_activity_log` ( | ||
| 78 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
| 79 | + `t_activity_id` int(11) NOT NULL COMMENT 't_activity 主键', | ||
| 80 | + `t_channel_id` int(11) NOT NULL COMMENT 't_channel 表主键', | ||
| 81 | + `state` tinyint(2) DEFAULT NULL COMMENT '0: 已经过期,1:正在使用', | ||
| 82 | + `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 83 | + PRIMARY KEY (`id`), | ||
| 84 | + UNIQUE KEY `id` (`id`) USING BTREE, | ||
| 85 | + KEY `t_activity_id` (`t_activity_id`) | ||
| 86 | +) ENGINE=MyISAM AUTO_INCREMENT=40 DEFAULT CHARSET=utf8; | ||
| 87 | + | ||
| 88 | +-- ---------------------------- | ||
| 89 | +-- Records of t_activity_log | ||
| 90 | +-- ---------------------------- | ||
| 91 | +INSERT INTO `t_activity_log` VALUES ('1', '1', '40', null, null); | ||
| 92 | +INSERT INTO `t_activity_log` VALUES ('2', '2', '40', null, null); | ||
| 93 | +INSERT INTO `t_activity_log` VALUES ('3', '3', '41', null, null); | ||
| 94 | +INSERT INTO `t_activity_log` VALUES ('4', '4', '41', null, null); | ||
| 95 | +INSERT INTO `t_activity_log` VALUES ('5', '5', '41', null, null); | ||
| 96 | +INSERT INTO `t_activity_log` VALUES ('6', '6', '43', null, null); | ||
| 97 | +INSERT INTO `t_activity_log` VALUES ('7', '7', '43', null, null); | ||
| 98 | +INSERT INTO `t_activity_log` VALUES ('8', '3', '43', null, null); | ||
| 99 | +INSERT INTO `t_activity_log` VALUES ('9', '4', '43', null, null); | ||
| 100 | +INSERT INTO `t_activity_log` VALUES ('10', '2', '43', null, null); | ||
| 101 | +INSERT INTO `t_activity_log` VALUES ('11', '15', '82', null, '2015-08-10 13:52:58'); | ||
| 102 | +INSERT INTO `t_activity_log` VALUES ('12', '15', '81', null, '2015-08-10 13:52:58'); | ||
| 103 | +INSERT INTO `t_activity_log` VALUES ('13', '15', '80', null, '2015-08-10 13:52:58'); | ||
| 104 | +INSERT INTO `t_activity_log` VALUES ('14', '15', '79', null, '2015-08-10 13:52:58'); | ||
| 105 | +INSERT INTO `t_activity_log` VALUES ('15', '16', '82', null, '2015-08-10 13:55:30'); | ||
| 106 | +INSERT INTO `t_activity_log` VALUES ('16', '16', '81', null, '2015-08-10 13:55:30'); | ||
| 107 | +INSERT INTO `t_activity_log` VALUES ('17', '16', '80', null, '2015-08-10 13:55:30'); | ||
| 108 | +INSERT INTO `t_activity_log` VALUES ('18', '17', '82', null, '2015-08-10 13:57:00'); | ||
| 109 | +INSERT INTO `t_activity_log` VALUES ('19', '17', '81', null, '2015-08-10 13:57:01'); | ||
| 110 | +INSERT INTO `t_activity_log` VALUES ('20', '17', '80', null, '2015-08-10 13:57:02'); | ||
| 111 | +INSERT INTO `t_activity_log` VALUES ('21', '18', '82', null, '2015-08-10 14:12:22'); | ||
| 112 | +INSERT INTO `t_activity_log` VALUES ('22', '18', '81', null, '2015-08-10 14:12:23'); | ||
| 113 | +INSERT INTO `t_activity_log` VALUES ('23', '18', '80', null, '2015-08-10 14:12:23'); | ||
| 114 | +INSERT INTO `t_activity_log` VALUES ('24', '18', '79', null, '2015-08-10 14:12:23'); | ||
| 115 | +INSERT INTO `t_activity_log` VALUES ('25', '19', '75', null, '2015-09-10 10:31:23'); | ||
| 116 | +INSERT INTO `t_activity_log` VALUES ('26', '19', '72', null, '2015-09-10 10:31:23'); | ||
| 117 | +INSERT INTO `t_activity_log` VALUES ('27', '19', '71', null, '2015-09-10 10:31:23'); | ||
| 118 | +INSERT INTO `t_activity_log` VALUES ('39', '22', '38', null, '2015-10-15 15:28:19'); | ||
| 119 | + | ||
| 120 | +-- ---------------------------- | ||
| 121 | +-- Table structure for `t_channel` | ||
| 122 | +-- ---------------------------- | ||
| 123 | +DROP TABLE IF EXISTS `t_channel`; | ||
| 124 | +CREATE TABLE `t_channel` ( | ||
| 125 | + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||
| 126 | + `name_zh` varchar(50) NOT NULL COMMENT '频道名称', | ||
| 127 | + `name_en` varchar(50) NOT NULL COMMENT '英文名称 如:news', | ||
| 128 | + `state` tinyint(2) NOT NULL COMMENT '状态:\r\n0 禁用 \r\n1 启用 \r\n2 直播信号\r\n3 滚播信号', | ||
| 129 | + `type` tinyint(2) DEFAULT '1' COMMENT '频道类型:\r\n1 自主频道\r\n2 运营商频道\r\n', | ||
| 130 | + `transcoder_ip` varchar(15) NOT NULL COMMENT '滚播播出设备ip', | ||
| 131 | + `transcoder_id` int(8) NOT NULL COMMENT '滚播播出设备对应发布点id', | ||
| 132 | + `chatroom_id` int(11) NOT NULL COMMENT '聊天室id', | ||
| 133 | + `default_t_wowza_signal_ref_id` int(11) DEFAULT NULL COMMENT '保留切换之前,上一次的wowzaid', | ||
| 134 | + `t_wowza_signal_ref_id` int(11) DEFAULT NULL COMMENT '当前流媒体服务器 stream name 对应的id \r\n(当前信号定义为主视角)', | ||
| 135 | + `t_activity_id` int(11) DEFAULT NULL COMMENT '当前直播活动id', | ||
| 136 | + `play_url` varchar(255) DEFAULT NULL COMMENT '播放地址', | ||
| 137 | + `poster` varchar(255) DEFAULT NULL COMMENT '海报', | ||
| 138 | + `uuid` varchar(50) DEFAULT NULL, | ||
| 139 | + `sort` int(11) DEFAULT NULL, | ||
| 140 | + `create_time` datetime NOT NULL, | ||
| 141 | + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 142 | + PRIMARY KEY (`id`), | ||
| 143 | + UNIQUE KEY `id` (`id`) | ||
| 144 | +) ENGINE=MyISAM AUTO_INCREMENT=85 DEFAULT CHARSET=utf8; | ||
| 145 | + | ||
| 146 | +-- ---------------------------- | ||
| 147 | +-- Records of t_channel | ||
| 148 | +-- ---------------------------- | ||
| 149 | +INSERT INTO `t_channel` VALUES ('47', 'E娱乐', 'eyule', '1', '1', '172.16.250.91', '37', '0', '60', null, null, null, null, null, '1', '2015-07-28 16:32:27', '2015-10-16 10:09:47'); | ||
| 150 | +INSERT INTO `t_channel` VALUES ('48', 'in乐台', 'inyuetai.stream', '1', '1', '172.16.250.91', '1', '0', '1', '2', null, null, null, null, '2', '2015-07-28 16:32:27', '2015-10-16 10:07:47'); | ||
| 151 | +INSERT INTO `t_channel` VALUES ('49', '文博会', 'wenbohui', '1', '1', '172.16.250.106', '1', '0', '2', '3', null, null, null, null, '2', '2015-07-28 16:32:27', '2015-10-16 10:07:48'); | ||
| 152 | +INSERT INTO `t_channel` VALUES ('50', '家有购物', 'jiayougouwu', '1', '1', '172.16.250.12', '12', '0', '3', '4', null, null, null, null, '3', '2015-07-28 16:32:27', '2015-10-16 10:07:48'); | ||
| 153 | +INSERT INTO `t_channel` VALUES ('51', 'I综艺', 'zzzzz', '0', '1', '172.16.250.91', '3', '0', '4', '5', '6', null, null, null, '4', '2015-07-28 16:32:27', '2015-10-16 10:07:48'); | ||
| 154 | +INSERT INTO `t_channel` VALUES ('52', '博博堂A', 'bobotanga', '0', '1', '172.16.250.91', '15', '0', '5', '6', null, null, null, null, '5', '2015-07-28 16:32:27', '2015-10-16 10:07:49'); | ||
| 155 | +INSERT INTO `t_channel` VALUES ('53', '博博堂B', 'bobotangb', '0', '1', '172.16.250.91', '16', '0', '6', '7', null, null, null, null, '6', '2015-07-28 16:32:27', '2015-10-16 10:07:49'); | ||
| 156 | +INSERT INTO `t_channel` VALUES ('54', '潮体育-联通', 'chaotiyu_lt', '1', '2', '172.16.250.12', '17', '0', '7', '8', null, null, null, null, '7', '2015-07-28 16:32:27', '2015-10-16 10:07:50'); | ||
| 157 | +INSERT INTO `t_channel` VALUES ('55', '潮体育-移动', 'chaotiyu_yd', '1', '2', '172.16.250.12', '18', '0', '8', '9', null, null, null, null, '8', '2015-07-28 16:32:27', '2015-10-16 10:07:50'); | ||
| 158 | +INSERT INTO `t_channel` VALUES ('56', '潮体育-电信', 'chaotiyu_dx', '1', '2', '172.16.250.106', '19', '0', '9', '55', '18', null, null, null, '56', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 159 | +INSERT INTO `t_channel` VALUES ('57', 'In乐台-联通', 'inyuetai_lt', '1', '2', '172.16.250.12', '20', '0', '8', '56', '18', null, null, null, '57', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 160 | +INSERT INTO `t_channel` VALUES ('58', 'In乐台-移动', 'inyuetai_yd', '0', '2', '172.16.250.12', '21', '0', '7', '57', '18', null, null, null, '58', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 161 | +INSERT INTO `t_channel` VALUES ('59', 'In乐台-电信', 'inyuetai_dx', '1', '2', '172.16.250.106', '22', '0', '6', '58', '18', null, null, null, '59', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 162 | +INSERT INTO `t_channel` VALUES ('60', 'I综艺-联通', 'izongyi_lt', '0', '2', '172.16.250.91', '23', '0', '5', '59', null, null, null, null, '60', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 163 | +INSERT INTO `t_channel` VALUES ('61', 'I综艺-移动', 'izongyi_yd', '1', '2', '172.16.250.12', '24', '0', '4', '60', null, null, null, null, '61', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 164 | +INSERT INTO `t_channel` VALUES ('62', 'I综艺-电信', 'izongyi_dx', '1', '2', '172.16.250.106', '25', '0', '3', '61', null, null, null, null, '62', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 165 | +INSERT INTO `t_channel` VALUES ('63', 'E娱乐-联通', 'eyule_lt', '1', '2', '172.16.250.12', '26', '0', '2', '62', null, null, null, null, '63', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 166 | +INSERT INTO `t_channel` VALUES ('64', 'E娱乐-移动', 'eyule_yd', '0', '2', '172.16.250.91', '27', '0', '1', '55', null, null, null, null, '64', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 167 | +INSERT INTO `t_channel` VALUES ('65', 'E娱乐-电信', 'eyule_dx', '1', '2', '172.16.250.106', '28', '0', '9', '56', null, null, null, null, '65', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 168 | +INSERT INTO `t_channel` VALUES ('66', '新影视-联通', 'xinyingshi_lt', '0', '2', '172.16.250.91', '29', '0', '8', '57', null, null, null, null, '66', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 169 | +INSERT INTO `t_channel` VALUES ('67', '新影视-移动', 'xinyingshi_yd', '1', '2', '172.16.250.91', '30', '0', '7', '58', null, null, null, null, '67', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 170 | +INSERT INTO `t_channel` VALUES ('68', '新影视-电信', 'xinyingshi_dx', '0', '2', '172.16.250.91', '31', '0', '6', '59', null, null, null, null, '68', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 171 | +INSERT INTO `t_channel` VALUES ('38', '幸福秀', 'jidongpindao', '1', '1', '172.16.250.91', '36', '0', '5', null, null, null, null, null, '38', '2015-07-28 16:32:26', '2015-09-21 16:08:30'); | ||
| 172 | +INSERT INTO `t_channel` VALUES ('39', '热动漫', 'redongman', '1', '1', '172.16.250.91', '13', '0', '4', '61', null, null, null, null, '39', '2015-07-28 16:32:26', '2015-09-21 16:08:30'); | ||
| 173 | +INSERT INTO `t_channel` VALUES ('40', '车视界', 'cheshijie', '1', '1', '172.16.250.91', '14', '0', '3', '62', null, null, null, null, '40', '2015-07-28 16:32:26', '2015-09-21 16:08:30'); | ||
| 174 | +INSERT INTO `t_channel` VALUES ('41', 'I综艺', 'izongyi', '2', '1', '172.16.250.91', '11', '0', '2', '55', '6', null, null, null, '41', '2015-07-28 16:32:26', '2015-09-21 16:08:30'); | ||
| 175 | +INSERT INTO `t_channel` VALUES ('42', 'LiveShow', 'liveshow', '2', '1', '172.16.250.107', '1', '0', '1', '56', '4', null, null, null, '42', '2015-07-28 16:32:26', '2015-09-21 16:08:30'); | ||
| 176 | +INSERT INTO `t_channel` VALUES ('43', '潮体育', 'chaotiyu', '2', '1', '172.16.250.107', '3', '0', '9', '98', '22', null, null, null, '43', '2015-07-28 16:32:26', '2015-10-15 15:44:06'); | ||
| 177 | +INSERT INTO `t_channel` VALUES ('44', '新影视', 'xinyingshi', '1', '1', '172.16.250.91', '4', '0', '8', '98', '22', null, null, null, '44', '2015-07-28 16:32:27', '2015-10-15 15:44:06'); | ||
| 178 | +INSERT INTO `t_channel` VALUES ('45', '炫韩娱', 'xuanhanyu', '1', '1', '172.16.250.12', '8', '0', '7', '98', '22', null, null, null, '45', '2015-07-28 16:32:27', '2015-10-15 15:44:06'); | ||
| 179 | +INSERT INTO `t_channel` VALUES ('46', '快新闻', 'news', '1', '1', '172.16.250.91', '5', '0', '6', '60', null, null, null, null, '46', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 180 | +INSERT INTO `t_channel` VALUES ('69', '快新闻-联通', 'news_lt', '0', '2', '172.16.250.12', '32', '0', '5', '61', null, null, null, null, '69', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 181 | +INSERT INTO `t_channel` VALUES ('70', '快新闻-移动', 'news_yd', '0', '2', '172.16.250.91', '33', '0', '4', '62', null, null, null, null, '70', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 182 | +INSERT INTO `t_channel` VALUES ('71', '快新闻-电信', 'news_dx', '1', '2', '172.16.250.106', '34', '0', '3', '3', '18', null, null, null, '71', '2015-07-28 16:32:27', '2015-09-21 16:08:30'); | ||
| 183 | +INSERT INTO `t_channel` VALUES ('72', '虚拟互动', 'vhd', '1', '1', '172.16.250.91', '35', '0', '2', '97', '19', null, null, null, '71', '2015-07-28 16:32:27', '2015-09-21 16:08:56'); | ||
| 184 | +INSERT INTO `t_channel` VALUES ('75', 'LiveShow-移动', 'yidongliveshow', '1', '2', '172.16.250.107', '2', '0', '1', '3', '18', null, null, null, '74', '2015-07-28 16:32:27', '2015-10-16 10:07:07'); | ||
| 185 | +INSERT INTO `t_channel` VALUES ('83', '频道名称', '324234', '1', '1', '2.222.2.222', '32432', '23423', '1', null, null, null, '', '4e7cae33cc284f679696db8837781c17', '76', '2015-09-15 13:29:57', '2015-10-16 10:07:02'); | ||
| 186 | + | ||
| 187 | +-- ---------------------------- | ||
| 188 | +-- Table structure for `t_channel_wowza_ref` | ||
| 189 | +-- ---------------------------- | ||
| 190 | +DROP TABLE IF EXISTS `t_channel_wowza_ref`; | ||
| 191 | +CREATE TABLE `t_channel_wowza_ref` ( | ||
| 192 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
| 193 | + `t_channel_id` int(11) DEFAULT NULL, | ||
| 194 | + `t_wowza_signal_ref_id` int(11) DEFAULT NULL, | ||
| 195 | + `type` tinyint(2) DEFAULT NULL COMMENT '1:边缘1视角\r\n2:边缘2视角\r\n3:边缘3视角', | ||
| 196 | + `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 197 | + PRIMARY KEY (`id`) | ||
| 198 | +) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
| 199 | + | ||
| 200 | +-- ---------------------------- | ||
| 201 | +-- Records of t_channel_wowza_ref | ||
| 202 | +-- ---------------------------- | ||
| 203 | + | ||
| 204 | +-- ---------------------------- | ||
| 205 | +-- Table structure for `t_default_video` | ||
| 206 | +-- ---------------------------- | ||
| 207 | +DROP TABLE IF EXISTS `t_default_video`; | ||
| 208 | +CREATE TABLE `t_default_video` ( | ||
| 209 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
| 210 | + `name` varchar(50) DEFAULT NULL, | ||
| 211 | + `stream_name` varchar(50) DEFAULT NULL, | ||
| 212 | + `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 213 | + PRIMARY KEY (`id`) | ||
| 214 | +) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; | ||
| 215 | + | ||
| 216 | +-- ---------------------------- | ||
| 217 | +-- Records of t_default_video | ||
| 218 | +-- ---------------------------- | ||
| 219 | +INSERT INTO `t_default_video` VALUES ('1', '视讯中国宣传片@tv', null, '2015-09-14 09:42:18'); | ||
| 220 | + | ||
| 221 | +-- ---------------------------- | ||
| 222 | +-- Table structure for `t_signal` | ||
| 223 | +-- ---------------------------- | ||
| 224 | +DROP TABLE IF EXISTS `t_signal`; | ||
| 225 | +CREATE TABLE `t_signal` ( | ||
| 226 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
| 227 | + `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||
| 228 | + `ip` varchar(15) DEFAULT NULL COMMENT '服务器ip地址', | ||
| 229 | + `state` tinyint(2) DEFAULT NULL COMMENT '0: 关闭, 1: 开启', | ||
| 230 | + `type` tinyint(2) DEFAULT NULL COMMENT '1:http 2: rtmp', | ||
| 231 | + `output_url` varchar(255) DEFAULT NULL, | ||
| 232 | + `admin_url` varchar(255) DEFAULT NULL COMMENT '信号源 后台管理地址', | ||
| 233 | + `create_time` datetime DEFAULT NULL, | ||
| 234 | + `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 235 | + PRIMARY KEY (`id`) | ||
| 236 | +) ENGINE=MyISAM AUTO_INCREMENT=47 DEFAULT CHARSET=utf8; | ||
| 237 | + | ||
| 238 | +-- ---------------------------- | ||
| 239 | +-- Records of t_signal | ||
| 240 | +-- ---------------------------- | ||
| 241 | +INSERT INTO `t_signal` VALUES ('43', '体彩信源', '192.168.100.240', '1', '2', 'ticai', 'http://192.168.100.240/live.html', '2015-09-16 13:26:49', '2015-09-16 13:26:48'); | ||
| 242 | +INSERT INTO `t_signal` VALUES ('2', 'a01', '172.000.000.001', '0', '1', null, 'www.baidu.com', '2015-07-28 17:07:59', '2015-09-06 13:30:29'); | ||
| 243 | +INSERT INTO `t_signal` VALUES ('5', 'in_live3', '192.168.100.21', '1', '2', null, 'http://192.168.100.21/admin', '2015-07-31 09:33:00', '2015-09-06 14:03:14'); | ||
| 244 | +INSERT INTO `t_signal` VALUES ('6', 'in_live4', '192.168.120.32', '0', '2', null, 'http://192.168.120.32/admin', '2015-07-31 09:33:04', '2015-09-06 13:30:29'); | ||
| 245 | +INSERT INTO `t_signal` VALUES ('7', 'in_live5', '192.168.100.21', '0', '1', null, 'http://192.168.100.21/admin', '2015-07-31 09:33:22', '2015-09-06 14:04:09'); | ||
| 246 | +INSERT INTO `t_signal` VALUES ('8', 'in_live6', '192.168.100.21', '0', '1', null, 'http://192.168.100.21/admin', '2015-07-31 09:33:22', '2015-09-06 14:04:09'); | ||
| 247 | +INSERT INTO `t_signal` VALUES ('9', 'in_live7', '192.168.100.21', '1', '2', null, 'http://192.168.100.21/admin', '2015-07-31 09:33:22', '2015-09-06 14:14:15'); | ||
| 248 | +INSERT INTO `t_signal` VALUES ('10', 'in_live_8', '192.168.100.21', '1', '2', null, 'http://192.168.100.21/admin', '2015-07-31 09:33:22', '2015-09-18 09:39:02'); | ||
| 249 | +INSERT INTO `t_signal` VALUES ('11', 'in_live_9', '192.168.100.21', '1', '2', 'rtmp://192.168.100.71:1935/live/_definst_/live13', 'http://192.168.100.21/admin', '2015-07-31 09:33:22', '2015-09-08 11:30:45'); | ||
| 250 | +INSERT INTO `t_signal` VALUES ('12', 'in_live_10', '192.168.100.21', '0', '2', 'rtmp://192.168.100.71:1935/live/_definst_/live12', 'http://192.168.100.21/admin', '2015-07-31 09:33:22', '2015-09-14 16:51:46'); | ||
| 251 | +INSERT INTO `t_signal` VALUES ('13', 'in_live_11', '192.168.100.21', '0', '2', 'rtmp://192.168.100.71:1935/live/_definst_/live11', 'http://192.168.100.21/admin', '2015-07-31 09:33:22', '2015-09-08 11:30:40'); | ||
| 252 | +INSERT INTO `t_signal` VALUES ('41', 'cncodec_name', '172.16.250.87', '0', '1', 'rtmp://192.168.100.71:1935/live/_definst_/live10', 'http://www.baidu.com', '2015-09-06 13:18:23', '2015-09-15 09:39:37'); | ||
| 253 | +INSERT INTO `t_signal` VALUES ('42', '信源名称11', '172.172.50.1', '1', '2', 'rtmp://172.16.250.100:1935/live/live1', 'http://172.16.250.11/live.html', '2015-09-15 09:46:06', '2015-09-15 09:46:04'); | ||
| 254 | +INSERT INTO `t_signal` VALUES ('44', 'cncodec76', '192.168.100.76', '1', '2', 'cp', 'http://192.168.100.240/live.html', '2015-09-17 17:33:33', '2015-09-17 17:33:32'); | ||
| 255 | +INSERT INTO `t_signal` VALUES ('46', 'cp', '192.168.100.76', '1', '2', 'cp', null, null, '2015-09-21 13:37:24'); | ||
| 256 | + | ||
| 257 | +-- ---------------------------- | ||
| 258 | +-- Table structure for `t_statistics` | ||
| 259 | +-- ---------------------------- | ||
| 260 | +DROP TABLE IF EXISTS `t_statistics`; | ||
| 261 | +CREATE TABLE `t_statistics` ( | ||
| 262 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
| 263 | + `t_channel_id` int(11) NOT NULL, | ||
| 264 | + `month` date DEFAULT NULL, | ||
| 265 | + `count` int(10) DEFAULT NULL, | ||
| 266 | + `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 267 | + PRIMARY KEY (`id`) | ||
| 268 | +) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; | ||
| 269 | + | ||
| 270 | +-- ---------------------------- | ||
| 271 | +-- Records of t_statistics | ||
| 272 | +-- ---------------------------- | ||
| 273 | +INSERT INTO `t_statistics` VALUES ('1', '47', '2015-01-01', '8', '2015-08-04 13:56:42'); | ||
| 274 | +INSERT INTO `t_statistics` VALUES ('2', '47', '2015-02-01', '4', '2015-08-04 14:01:53'); | ||
| 275 | +INSERT INTO `t_statistics` VALUES ('3', '47', '2015-03-01', '6', '2015-08-04 14:01:53'); | ||
| 276 | +INSERT INTO `t_statistics` VALUES ('4', '47', '2015-04-01', '2', '2015-08-04 14:01:54'); | ||
| 277 | +INSERT INTO `t_statistics` VALUES ('5', '47', '2015-05-01', '1', '2015-08-04 14:01:55'); | ||
| 278 | +INSERT INTO `t_statistics` VALUES ('6', '47', '2015-06-01', '5', '2015-08-04 14:01:55'); | ||
| 279 | +INSERT INTO `t_statistics` VALUES ('7', '47', '2015-07-01', '2', '2015-08-04 14:01:55'); | ||
| 280 | +INSERT INTO `t_statistics` VALUES ('8', '47', '2015-08-01', '6', '2015-08-04 14:01:56'); | ||
| 281 | +INSERT INTO `t_statistics` VALUES ('9', '42', '2015-01-01', '2', '2015-08-04 14:01:56'); | ||
| 282 | +INSERT INTO `t_statistics` VALUES ('10', '42', '2015-02-01', '6', '2015-08-04 14:01:58'); | ||
| 283 | +INSERT INTO `t_statistics` VALUES ('11', '42', '2015-03-01', '3', '2015-08-04 14:02:08'); | ||
| 284 | +INSERT INTO `t_statistics` VALUES ('12', '42', '2015-04-01', '8', '2015-08-04 14:02:08'); | ||
| 285 | +INSERT INTO `t_statistics` VALUES ('13', '42', '2015-05-01', '6', '2015-08-04 14:02:08'); | ||
| 286 | +INSERT INTO `t_statistics` VALUES ('14', '42', '2015-06-01', '9', '2015-08-04 14:02:09'); | ||
| 287 | +INSERT INTO `t_statistics` VALUES ('15', '42', '2015-07-01', '4', '2015-08-04 14:08:57'); | ||
| 288 | +INSERT INTO `t_statistics` VALUES ('16', '42', '2015-08-01', '6', '2015-08-04 14:08:57'); | ||
| 289 | + | ||
| 290 | +-- ---------------------------- | ||
| 291 | +-- Table structure for `t_user` | ||
| 292 | +-- ---------------------------- | ||
| 293 | +DROP TABLE IF EXISTS `t_user`; | ||
| 294 | +CREATE TABLE `t_user` ( | ||
| 295 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
| 296 | + `name` varchar(50) DEFAULT NULL, | ||
| 297 | + `is_admin` tinyint(2) DEFAULT NULL COMMENT '0 普通用户 1超级管理员', | ||
| 298 | + `t_channel_ids` varchar(255) DEFAULT NULL COMMENT '用户所负责频道id\r\n多个id通过逗号隔开', | ||
| 299 | + `t_signal_ids` varchar(255) DEFAULT NULL COMMENT '用户所负责信号源id,多个id通过逗号分隔开', | ||
| 300 | + `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, | ||
| 301 | + PRIMARY KEY (`id`) | ||
| 302 | +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; | ||
| 303 | + | ||
| 304 | +-- ---------------------------- | ||
| 305 | +-- Records of t_user | ||
| 306 | +-- ---------------------------- | ||
| 307 | +INSERT INTO `t_user` VALUES ('1', '刘基城', '1', '38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,75,76,77,78,79,80,81,82', null, '2015-08-11 15:26:53'); | ||
| 308 | +INSERT INTO `t_user` VALUES ('2', '郑香香', '1', '38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,75,76,77,78,79,80,81,82', null, '2015-08-11 15:26:54'); | ||
| 309 | + | ||
| 310 | +-- ---------------------------- | ||
| 311 | +-- Table structure for `t_wowza` | ||
| 312 | +-- ---------------------------- | ||
| 313 | +DROP TABLE IF EXISTS `t_wowza`; | ||
| 314 | +CREATE TABLE `t_wowza` ( | ||
| 315 | + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||
| 316 | + `name` varchar(32) DEFAULT NULL, | ||
| 317 | + `account` varchar(50) DEFAULT NULL COMMENT '账号密码通过@符合分隔开,如: root@cnlive', | ||
| 318 | + `web_account` varchar(50) DEFAULT NULL, | ||
| 319 | + `lan_ip` varchar(15) DEFAULT NULL COMMENT '172.16.250.111', | ||
| 320 | + `wan_ip` varchar(15) DEFAULT NULL COMMENT '外网ip', | ||
| 321 | + `state` tinyint(2) DEFAULT NULL COMMENT '0: 禁用 1:启用', | ||
| 322 | + `admin_url` varchar(255) DEFAULT NULL COMMENT '后台管理地址', | ||
| 323 | + `video_path` varchar(100) DEFAULT NULL COMMENT '录制文件存放路径', | ||
| 324 | + `create_time` datetime DEFAULT NULL, | ||
| 325 | + `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 326 | + PRIMARY KEY (`id`), | ||
| 327 | + UNIQUE KEY `id` (`id`) | ||
| 328 | +) ENGINE=MyISAM AUTO_INCREMENT=73 DEFAULT CHARSET=utf8; | ||
| 329 | + | ||
| 330 | +-- ---------------------------- | ||
| 331 | +-- Records of t_wowza | ||
| 332 | +-- ---------------------------- | ||
| 333 | +INSERT INTO `t_wowza` VALUES ('1', 'wowza_huayuanq_11', '系统账号', null, '172.16.250.11', null, '1', null, null, null, '2015-08-17 10:18:14'); | ||
| 334 | +INSERT INTO `t_wowza` VALUES ('2', 'wowza_huayuanq_11', '系统账号', null, '172.16.250.11', null, '1', null, null, null, '2015-08-17 10:18:16'); | ||
| 335 | +INSERT INTO `t_wowza` VALUES ('3', 'wowza_huayuanq_11', '系统账号', null, '172.16.250.11', null, '1', null, null, null, '2015-08-17 10:18:16'); | ||
| 336 | +INSERT INTO `t_wowza` VALUES ('4', 'wowza_huayuanq_11', '系统账号', null, '172.16.250.11', null, '1', null, null, null, '2015-08-17 10:18:17'); | ||
| 337 | +INSERT INTO `t_wowza` VALUES ('5', 'wowza_huayuanq_11', '系统账号', null, '172.16.250.11', null, '1', null, null, null, '2015-08-17 13:00:53'); | ||
| 338 | +INSERT INTO `t_wowza` VALUES ('6', 'wowza_huayuanq_19', '系统账号', null, '172.16.250.19', null, '1', null, null, null, '2015-08-17 10:18:22'); | ||
| 339 | +INSERT INTO `t_wowza` VALUES ('7', 'wowza_huayuanq_19', '系统账号', null, '172.16.250.19', null, '1', null, null, null, '2015-08-17 10:19:07'); | ||
| 340 | +INSERT INTO `t_wowza` VALUES ('8', 'wowza_huayuanq_19', '系统账号', null, '172.16.250.19', null, '1', null, null, null, '2015-08-17 10:19:07'); | ||
| 341 | +INSERT INTO `t_wowza` VALUES ('9', 'wowza_huayuanq_19', '系统账号', null, '172.16.250.19', null, '1', null, null, null, '2015-08-17 10:19:08'); | ||
| 342 | +INSERT INTO `t_wowza` VALUES ('11', 'wowza_huayuanq_19', '系统账号', null, '172.16.250.170', '172.16.250.170', '1', '111', '11', '2015-08-03 13:51:05', '2015-08-17 10:19:25'); | ||
| 343 | +INSERT INTO `t_wowza` VALUES ('54', 'wowza_idc_71', '系统账号', null, '192.168.100.71', '192.168.100.71', '1', 'http', '件存放目录', '2015-08-05 10:31:50', '2015-08-17 10:16:26'); | ||
| 344 | +INSERT INTO `t_wowza` VALUES ('55', 'wowza_idc_72', '系统账号', null, '192.168.100.71', '192.168.100.71', '1', 'http', '件存放目录', '2015-08-05 10:33:44', '2015-08-17 10:16:44'); | ||
| 345 | +INSERT INTO `t_wowza` VALUES ('57', 'wowza_idc_74', '系统账号', null, '192.168.100.73', '192.168.100.73', '1', '84', '8844', '2015-08-05 16:47:54', '2015-08-17 10:16:48'); | ||
| 346 | +INSERT INTO `t_wowza` VALUES ('68', 'wowza_test', 'root@cnlive', null, '172.16.250.254', '172.16.250.254', '1', null, null, null, '2015-09-10 13:10:51'); | ||
| 347 | +INSERT INTO `t_wowza` VALUES ('69', '花园桥wowza71', 'root@cnlive1', null, '172.16.250.111', '172.16.250.111', '1', 'http://172.16.250.111/wowzaeng/manager.html', '/usr/local/wowza', '2015-09-15 10:21:16', '2015-09-15 10:21:15'); | ||
| 348 | +INSERT INTO `t_wowza` VALUES ('70', '花园桥76服务器', 'root/cnLIVE#@76', 'root/cnlive', '192.168.100.76', '192.168.100.76', '1', 'http://192.168.100.76:8088', '/usr/local/WowzaStreamingEngine/content', '2015-09-16 14:21:09', '2015-09-16 14:21:07'); | ||
| 349 | +INSERT INTO `t_wowza` VALUES ('71', 'wowza76', 'root/cnlive', 'root/cnlive', '192.168.100.76', '192.168.100.76', '1', 'sf', 'e', '2015-09-18 14:10:06', '2015-09-18 14:10:04'); | ||
| 350 | + | ||
| 351 | +-- ---------------------------- | ||
| 352 | +-- Table structure for `t_wowza_signal_ref` | ||
| 353 | +-- ---------------------------- | ||
| 354 | +DROP TABLE IF EXISTS `t_wowza_signal_ref`; | ||
| 355 | +CREATE TABLE `t_wowza_signal_ref` ( | ||
| 356 | + `id` int(11) NOT NULL AUTO_INCREMENT, | ||
| 357 | + `t_wowza_id` int(11) DEFAULT NULL, | ||
| 358 | + `type` tinyint(2) DEFAULT NULL COMMENT '1: cncodec信号 2:transcoder 信号', | ||
| 359 | + `stream_name` varchar(50) DEFAULT NULL, | ||
| 360 | + `application_name` varchar(50) DEFAULT NULL, | ||
| 361 | + `publish_url` varchar(255) DEFAULT NULL, | ||
| 362 | + `t_signal_id` int(11) DEFAULT NULL, | ||
| 363 | + `uuid` varchar(50) DEFAULT NULL, | ||
| 364 | + `create_time` datetime DEFAULT NULL, | ||
| 365 | + `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 366 | + PRIMARY KEY (`id`), | ||
| 367 | + UNIQUE KEY `id` (`id`) | ||
| 368 | +) ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=utf8; | ||
| 369 | + | ||
| 370 | +-- ---------------------------- | ||
| 371 | +-- Records of t_wowza_signal_ref | ||
| 372 | +-- ---------------------------- | ||
| 373 | +INSERT INTO `t_wowza_signal_ref` VALUES ('1', '1', '2', 'out_zhonghuameishi', 'live7', 'rtmp://192.168.100.11:1935/live/_definst_/out_zhonghuameishi', '5', 'c0888816ede9453eb9f3e7423dd0e90d', '2015-07-31 13:39:22', '2015-09-21 13:20:00'); | ||
| 374 | +INSERT INTO `t_wowza_signal_ref` VALUES ('2', '2', '2', 'out_redongman', 'live7', 'rtmp://192.168.100.11:1935/live/_definst_/out_redongman', '6', '49b8dc7ba2064aa7a317bbfe5de938ad', '2015-07-31 13:39:22', '2015-09-21 13:19:59'); | ||
| 375 | +INSERT INTO `t_wowza_signal_ref` VALUES ('3', '3', '2', 'out_vhd', 'live6', 'rtmp://192.168.100.11:1935/live/_definst_/out_vhd', '7', '85471847dd3d4bd8a617f86ee98c01bf', '2015-07-31 13:39:22', '2015-09-21 13:19:56'); | ||
| 376 | +INSERT INTO `t_wowza_signal_ref` VALUES ('4', '4', '2', 'out_izongyi', 'live6', 'rtmp://192.168.100.11:1935/live/_definst_/out_izongyi', '8', '2b42e5b3e46f4bafa800f7fd763b5fd6', '2015-07-31 13:39:22', '2015-09-21 13:19:55'); | ||
| 377 | +INSERT INTO `t_wowza_signal_ref` VALUES ('5', '5', '2', 'out_jiayougouwu', 'live6', 'rtmp://192.168.100.101:1935/live/_definst_/out_jiayougouwu', '9', '98e5a877c1e64d14a30e39c9b0dae891', '2015-07-31 13:39:22', '2015-09-21 13:19:54'); | ||
| 378 | +INSERT INTO `t_wowza_signal_ref` VALUES ('6', '6', '2', 'out_caifutianxia', 'live5', 'rtmp://192.168.100.19:1935/live/_definst_/out_caifutianxia', '10', '02fec9d4f8c6496fb771469768f7793e', '2015-07-31 13:39:22', '2015-09-21 13:19:52'); | ||
| 379 | +INSERT INTO `t_wowza_signal_ref` VALUES ('7', '7', '2', 'out_zhonghuameishi', 'live5', 'rtmp://192.168.100.19:1935/live/_definst_/out_zhonghuameishi', '11', 'a3d90ef0a075451b9fa1bc98cec360a1', '2015-07-31 13:39:22', '2015-09-21 13:19:49'); | ||
| 380 | +INSERT INTO `t_wowza_signal_ref` VALUES ('8', '8', '2', 'out_cctvzhengquan', 'live4', 'rtmp://192.168.100.19:1935/live/_definst_/out_cctvzhengquan', '12', '96a75f70c06b4d62b4b6cb7416341ae0', '2015-07-31 13:39:22', '2015-09-21 13:19:48'); | ||
| 381 | +INSERT INTO `t_wowza_signal_ref` VALUES ('9', '9', '2', 'out_xinyingshi', 'live3', 'rtmp://192.168.100.19:1935/live/_definst_/out_xinyingshi', '13', '28100ca8c22149c290cd38add33d3e3e', '2015-07-31 13:39:22', '2015-09-21 13:19:47'); | ||
| 382 | +INSERT INTO `t_wowza_signal_ref` VALUES ('55', '54', '2', 'out_chaotiyu', 'live2', 'rtmp://192.168.100.71:1935/live/_definst_/out_chaotiyu', '1', '544c729945f24e489ecc5231999c237a', '2015-08-05 10:31:51', '2015-09-21 13:19:47'); | ||
| 383 | +INSERT INTO `t_wowza_signal_ref` VALUES ('56', '54', '2', 'out_eyule', 'live2', 'rtmp://192.168.100.71:1935/live/_definst_/out_eyule', '15', '5635a32674724ca1b8b73e23c33367ce', '2015-08-05 10:31:51', '2015-09-21 13:19:46'); | ||
| 384 | +INSERT INTO `t_wowza_signal_ref` VALUES ('57', '55', '2', 'out_liveshow', 'live1', 'rtmp://192.168.100.71:1935/live/_definst_/out_liveshow', '5', 'cfffc1498acf4e9fba3a0d8198989449', '2015-08-05 10:33:45', '2015-09-21 13:19:45'); | ||
| 385 | +INSERT INTO `t_wowza_signal_ref` VALUES ('58', '55', '2', 'out_kuaixinw', 'live1', 'rtmp://192.168.100.71:1935/live/_definst_/out_kuaixinw', '1', 'b1295bdd22fd4975985d2dc3e139cc49', '2015-08-05 10:33:45', '2015-09-21 13:19:46'); | ||
| 386 | +INSERT INTO `t_wowza_signal_ref` VALUES ('61', '57', '2', 'out_cheshijie', 'live', 'rtmp://192.168.100.71:1935/live/_definst_/out_cheshijie', '5', 'b87fc7830ec041c587c66540802784ac', '2015-08-05 16:47:54', '2015-09-21 13:19:32'); | ||
| 387 | +INSERT INTO `t_wowza_signal_ref` VALUES ('62', '57', '2', 'out_yeselive', 'live', 'rtmp://192.168.100.71:1935/live/_definst_/out_yeselive', '6', '129d4114e62449dda18a131c175972a1', '2015-08-05 16:47:54', '2015-09-21 13:19:32'); | ||
| 388 | +INSERT INTO `t_wowza_signal_ref` VALUES ('97', '70', '1', 'ticai', 'ticai', 'rtmp://192.168.100.76:1935/ticai/ticai', '43', '2f51daf7a6b14700831947597e514975', '2015-09-16 14:21:09', '2015-09-18 15:10:33'); | ||
| 389 | +INSERT INTO `t_wowza_signal_ref` VALUES ('89', '68', '1', 'live13', 'live', 'rtmp://192.168.100.71:1935/live/_definst_/live13', '12', '14d42baff5714f08a2c3811de8bc932b', null, '2015-09-21 13:19:30'); | ||
| 390 | +INSERT INTO `t_wowza_signal_ref` VALUES ('96', '69', '1', 'live9', 'live', 'rtmp://1811.1.1.1.1/live9', '42', '46b0d2c797aa437ab7779833a5a584f5', '2015-09-15 10:21:16', '2015-09-21 13:19:31'); | ||
| 391 | +INSERT INTO `t_wowza_signal_ref` VALUES ('98', '70', '1', 'cp', 'cp', 'rtmp://192.168.100.76:1935/ticai/cp', '46', null, null, '2015-09-18 15:07:45'); | ||
| 392 | +INSERT INTO `t_wowza_signal_ref` VALUES ('100', '71', '2', 'ticai', 'ticai', 'rtmp://192.168.100.76:1935/ticai/ticai', '43', '8e65a442521343daab5123d030c0edc5', '2015-09-18 14:16:20', '2015-09-18 15:10:43'); | ||
| 393 | + | ||
| 394 | +-- ---------------------------- | ||
| 395 | +-- View structure for `v_activity` | ||
| 396 | +-- ---------------------------- | ||
| 397 | +DROP VIEW IF EXISTS `v_activity`; | ||
| 398 | +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_activity` AS select `t_activity`.`id` AS `id`,`t_activity`.`name` AS `name`,`t_activity`.`epg_name` AS `epg_name`,`t_activity`.`description` AS `description`,`t_activity`.`place` AS `place`,`t_activity`.`state` AS `state`,`t_activity`.`start_time` AS `start_time`,`t_activity`.`end_time` AS `end_time`,`t_activity`.`contact_user` AS `contact_user`,`t_activity`.`user_id` AS `user_id`,`t_activity`.`v_count` AS `v_count`,`t_activity`.`is_free` AS `is_free`,`t_activity`.`is_playback` AS `is_playback`,`t_activity`.`logo` AS `logo`,`t_activity`.`notify_user` AS `notify_user`,`t_activity`.`create_time` AS `create_time`,`t_activity`.`update_time` AS `update_time`,`t_activity_log`.`t_channel_id` AS `t_channel_id`,`t_activity`.`playbak_url` AS `playbak_url`,`t_activity`.`t_default_video_id` AS `t_default_video_id`,`t_activity`.`uuid` AS `uuid` from (`t_activity_log` left join `t_activity` on((`t_activity_log`.`t_activity_id` = `t_activity`.`id`))) ; | ||
| 399 | + | ||
| 400 | +-- ---------------------------- | ||
| 401 | +-- View structure for `v_activity_channel` | ||
| 402 | +-- ---------------------------- | ||
| 403 | +DROP VIEW IF EXISTS `v_activity_channel`; | ||
| 404 | +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_activity_channel` AS select `t_activity_log`.`t_activity_id` AS `t_activity_id`,`t_activity_log`.`t_channel_id` AS `t_channel_id` from (`t_activity_log` left join `t_channel` on((`t_activity_log`.`t_channel_id` = `t_channel`.`id`))) ; | ||
| 405 | + | ||
| 406 | +-- ---------------------------- | ||
| 407 | +-- View structure for `v_activity_width_user` | ||
| 408 | +-- ---------------------------- | ||
| 409 | +DROP VIEW IF EXISTS `v_activity_width_user`; | ||
| 410 | +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_activity_width_user` AS select `t_activity`.`name` AS `name`,`t_activity`.`epg_name` AS `epg_name`,`t_activity`.`description` AS `description`,`t_activity`.`place` AS `place`,`t_activity`.`state` AS `state`,`t_activity`.`start_time` AS `start_time`,`t_activity`.`end_time` AS `end_time`,`t_activity`.`contact_user` AS `contact_user`,`t_activity`.`user_id` AS `user_id`,`t_activity`.`v_count` AS `v_count`,`t_activity`.`is_free` AS `is_free`,`t_activity`.`is_playback` AS `is_playback`,`t_activity`.`logo` AS `logo`,`t_activity`.`notify_user` AS `notify_user`,`t_activity`.`uuid` AS `uuid`,`t_activity`.`create_time` AS `create_time`,`t_activity`.`update_time` AS `update_time`,`t_activity`.`playbak_url` AS `playbak_url`,`t_activity`.`id` AS `id`,`t_user`.`name` AS `user_name`,`t_activity`.`t_default_video_id` AS `t_default_video_id` from (`t_activity` left join `t_user` on((`t_activity`.`user_id` = `t_user`.`id`))) ; | ||
| 411 | + | ||
| 412 | +-- ---------------------------- | ||
| 413 | +-- View structure for `v_channel` | ||
| 414 | +-- ---------------------------- | ||
| 415 | +DROP VIEW IF EXISTS `v_channel`; | ||
| 416 | +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_channel` AS select `t_channel`.`id` AS `id`,`t_channel`.`name_zh` AS `name_zh`,`t_channel`.`name_en` AS `name_en`,`t_channel`.`state` AS `state`,`t_channel`.`type` AS `type`,`t_channel`.`transcoder_ip` AS `transcoder_ip`,`t_channel`.`transcoder_id` AS `transcoder_id`,`t_channel`.`chatroom_id` AS `chatroom_id`,`t_channel`.`t_wowza_signal_ref_id` AS `t_wowza_signal_ref_id`,`t_channel`.`create_time` AS `create_time`,`t_channel`.`update_time` AS `update_time`,`t_wowza_signal_ref`.`publish_url` AS `publish_url`,`t_channel`.`t_activity_id` AS `t_activity_id`,`t_activity`.`name` AS `activity_name`,`t_channel`.`default_t_wowza_signal_ref_id` AS `default_t_wowza_signal_ref_id`,`t_channel`.`play_url` AS `play_url`,`t_channel`.`poster` AS `poster`,`t_wowza_signal_ref`.`stream_name` AS `stream_name`,`t_wowza_signal_ref`.`application_name` AS `application_name`,`t_wowza_signal_ref`.`uuid` AS `uuid`,`t_signal`.`ip` AS `t_signal_ip`,`t_signal`.`name` AS `t_signal_name`,`t_signal`.`admin_url` AS `t_signal_admin_url`,`default_t_wowza_signal_ref`.`stream_name` AS `default_stream_name`,`t_channel`.`sort` AS `sort` from ((((`t_channel` left join `t_wowza_signal_ref` on((`t_channel`.`t_wowza_signal_ref_id` = `t_wowza_signal_ref`.`id`))) left join `t_activity` on((`t_channel`.`t_activity_id` = `t_activity`.`id`))) left join `t_signal` on((`t_wowza_signal_ref`.`t_signal_id` = `t_signal`.`id`))) left join `t_wowza_signal_ref` `default_t_wowza_signal_ref` on((`t_channel`.`default_t_wowza_signal_ref_id` = `default_t_wowza_signal_ref`.`id`))) ; | ||
| 417 | + | ||
| 418 | +-- ---------------------------- | ||
| 419 | +-- View structure for `v_channel_count` | ||
| 420 | +-- ---------------------------- | ||
| 421 | +DROP VIEW IF EXISTS `v_channel_count`; | ||
| 422 | +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_channel_count` AS select `t_statistics`.`id` AS `id`,concat('\'',`t_channel`.`name_zh`,'\'') AS `name`,concat('[',cast(group_concat(`t_statistics`.`count` order by `t_statistics`.`month` ASC separator ',') as char charset utf8),']') AS `data` from (`t_statistics` left join `t_channel` on((`t_statistics`.`t_channel_id` = `t_channel`.`id`))) group by `t_statistics`.`t_channel_id` ; | ||
| 423 | + | ||
| 424 | +-- ---------------------------- | ||
| 425 | +-- View structure for `v_wowza_signal` | ||
| 426 | +-- ---------------------------- | ||
| 427 | +DROP VIEW IF EXISTS `v_wowza_signal`; | ||
| 428 | +CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_wowza_signal` AS select `t_wowza_signal_ref`.`id` AS `id`,`t_wowza_signal_ref`.`t_wowza_id` AS `t_wowza_id`,`t_wowza_signal_ref`.`publish_url` AS `publish_url`,`t_wowza_signal_ref`.`t_signal_id` AS `t_signal_id`,`t_wowza`.`name` AS `wowza_name`,`t_wowza`.`account` AS `wowza_account`,`t_wowza`.`lan_ip` AS `wowza_lan_ip`,`t_wowza`.`wan_ip` AS `wowza_wan_ip`,`t_wowza`.`state` AS `wowza_state`,`t_signal`.`name` AS `signal_name`,`t_signal`.`ip` AS `signal_ip`,`t_signal`.`type` AS `signal_type`,`t_wowza_signal_ref`.`stream_name` AS `stream_name`,`t_wowza_signal_ref`.`application_name` AS `application_name`,`t_wowza_signal_ref`.`type` AS `type` from ((`t_wowza_signal_ref` left join `t_wowza` on((`t_wowza_signal_ref`.`t_wowza_id` = `t_wowza`.`id`))) left join `t_signal` on((`t_wowza_signal_ref`.`t_signal_id` = `t_signal`.`id`))) ; |
src/main/resources/cnlive_wowza_plugins_v1.5.jar
0 → 100644
No preview for this file type
src/main/resources/i18n/i18n_en_US.properties
0 → 100644
src/main/resources/i18n/i18n_zh_CN.properties
0 → 100644
src/main/resources/log4j.properties
0 → 100644
| 1 | +++ a/src/main/resources/log4j.properties | ||
| 1 | +log4j.rootLogger=INFO,console,file | ||
| 2 | + | ||
| 3 | +log4j.appender.console=org.apache.log4j.ConsoleAppender | ||
| 4 | +log4j.appender.console.Target=System.out | ||
| 5 | +log4j.appender.console.layout=org.apache.log4j.PatternLayout | ||
| 6 | +log4j.appender.console.layout.ConversionPattern=%m%n | ||
| 7 | + | ||
| 8 | +log4j.appender.file=org.apache.log4j.DailyRollingFileAppender | ||
| 9 | +log4j.appender.file.File=${catalina.base}/logs/cnlive_live_web/log | ||
| 10 | +log4j.appender.file.DatePattern='_'yyyyMMdd | ||
| 11 | +log4j.appender.file.encoding=UTF-8 | ||
| 12 | +log4j.appender.file.layout=org.apache.log4j.PatternLayout | ||
| 13 | +log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} %p %c (%L) - %m%n | ||
| 14 | + | ||
| 15 | +log4j.logger.org.apache=ERROR | ||
| 16 | +log4j.logger.org.smart4j=DEBUG | ||
| 17 | + | ||
| 18 | + | ||
| 19 | +#log4j.logger.com.ksyun.ks3=DEBUG,stdout | ||
| 20 | +#log4j.logger.org.apache.http=DEBUG,stdout | ||
| 21 | +#log4j.logger.org.apache.http.wire=ERROR,stdout | ||
| 22 | + | ||
| 23 | +#log4j.addivity.org.apache=true | ||
| 24 | +#log4j.appender.stdout=org.apache.log4j.ConsoleAppender | ||
| 25 | +#log4j.appender.stdout.Target=System.out | ||
| 26 | +#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | ||
| 27 | +#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%t]%C{1}.%M(%L) - %m%n | ||
| 0 | \ No newline at end of file | 28 | \ No newline at end of file |
src/main/resources/smart.properties
0 → 100644
| 1 | +++ a/src/main/resources/smart.properties | ||
| 1 | +smart.framework.app.base_package=com.cnlive.mz.live | ||
| 2 | +smart.framework.app.home_page=/index | ||
| 3 | +smart.framework.app.www_path=/static/ | ||
| 4 | +smart.framework.app.jsp_path=/pages/ | ||
| 5 | +smart.framework.custom.ds_factory=org.smart4j.plugin.dbcp.DbcpDataSourceFactory | ||
| 6 | +#smart.framework.custom.ds_factory=org.smart4j.plugin.druid.DruidDataSourceFactory | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +smart.framework.jdbc.type=mysql | ||
| 10 | +smart.framework.jdbc.driver=com.mysql.jdbc.Driver | ||
| 11 | +smart.framework.jdbc.url=jdbc:mysql://101.251.198.175:3306/cnlive_live?autoReconnect=true&failOverReadOnly=false | ||
| 12 | +smart.framework.jdbc.username=cnlive_oa | ||
| 13 | +smart.framework.jdbc.password=H8rf#_3@ccx9( | ||
| 14 | +# | ||
| 15 | +smart.plugin.i18n.reloadable=true | ||
| 16 | +smart.plugin.rest.log=true | ||
| 17 | +smart.plugin.rest.jsonp=true | ||
| 18 | +smart.plugin.rest.jsonp.function=callback | ||
| 19 | + | ||
| 20 | +#smart.plugin.security.realms=custom | ||
| 21 | +#smart.plugin.security.custom.class=org.smart4j.sample.CustomSmartSecurity | ||
| 22 | +#smart.plugin.security.cacheable=true | ||
| 23 | + | ||
| 24 | +sample.upload_path=/www/upload/ | ||
| 25 | + | ||
| 26 | +mail.template_path=D:/apache-tomcat-7.0.61/webapps/cnlive_live_web/pages/mail.html | ||
| 27 | +website.url=http://localhost:8080/cnlive_live_web/ | ||
| 28 | +auth.enable=true | ||
| 29 | +auth.login.url=http://sso.staff.cnlive.com/CnliveSSO/login?from=mam-live&callbackUrl= | ||
| 30 | +auth.logout.url=http://sso.staff.cnlive.com/CnliveSSO/logOut?from=mam-live&callbackUrl= | ||
| 31 | +auth.userinfo.url=http://sso.staff.cnlive.com/CnliveSSO/getUserInfo?username= | ||
| 32 | + | ||
| 33 | + | ||
| 0 | \ No newline at end of file | 34 | \ No newline at end of file |
src/main/webapp/WEB-INF/fn.tld
0 → 100644
| 1 | +++ a/src/main/webapp/WEB-INF/fn.tld | ||
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | + | ||
| 3 | +<taglib xmlns="http://java.sun.com/xml/ns/j2ee" | ||
| 4 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 5 | + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" | ||
| 6 | + version="2.0"> | ||
| 7 | + | ||
| 8 | + <description>JSTL 1.1 functions library</description> | ||
| 9 | + <display-name>JSTL functions</display-name> | ||
| 10 | + <tlib-version>1.1</tlib-version> | ||
| 11 | + <short-name>fn</short-name> | ||
| 12 | + <uri>http://java.sun.com/jsp/jstl/functions</uri> | ||
| 13 | + | ||
| 14 | + <function> | ||
| 15 | + <description> | ||
| 16 | + Tests if an input string contains the specified substring. | ||
| 17 | + </description> | ||
| 18 | + <name>contains</name> | ||
| 19 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 20 | + <function-signature>boolean contains(java.lang.String, java.lang.String)</function-signature> | ||
| 21 | + <example> | ||
| 22 | + <c:if test="${fn:contains(name, searchString)}"> | ||
| 23 | + </example> | ||
| 24 | + </function> | ||
| 25 | + | ||
| 26 | + <function> | ||
| 27 | + <description> | ||
| 28 | + Tests if an input string contains the specified substring in a case insensitive way. | ||
| 29 | + </description> | ||
| 30 | + <name>containsIgnoreCase</name> | ||
| 31 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 32 | + <function-signature>boolean containsIgnoreCase(java.lang.String, java.lang.String)</function-signature> | ||
| 33 | + <example> | ||
| 34 | + <c:if test="${fn:containsIgnoreCase(name, searchString)}"> | ||
| 35 | + </example> | ||
| 36 | + </function> | ||
| 37 | + | ||
| 38 | + <function> | ||
| 39 | + <description> | ||
| 40 | + Tests if an input string ends with the specified suffix. | ||
| 41 | + </description> | ||
| 42 | + <name>endsWith</name> | ||
| 43 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 44 | + <function-signature>boolean endsWith(java.lang.String, java.lang.String)</function-signature> | ||
| 45 | + <example> | ||
| 46 | + <c:if test="${fn:endsWith(filename, ".txt")}"> | ||
| 47 | + </example> | ||
| 48 | + </function> | ||
| 49 | + | ||
| 50 | + <function> | ||
| 51 | + <description> | ||
| 52 | + Escapes characters that could be interpreted as XML markup. | ||
| 53 | + </description> | ||
| 54 | + <name>escapeXml</name> | ||
| 55 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 56 | + <function-signature>java.lang.String escapeXml(java.lang.String)</function-signature> | ||
| 57 | + <example> | ||
| 58 | + ${fn:escapeXml(param:info)} | ||
| 59 | + </example> | ||
| 60 | + </function> | ||
| 61 | + | ||
| 62 | + <function> | ||
| 63 | + <description> | ||
| 64 | + Returns the index withing a string of the first occurrence of a specified substring. | ||
| 65 | + </description> | ||
| 66 | + <name>indexOf</name> | ||
| 67 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 68 | + <function-signature>int indexOf(java.lang.String, java.lang.String)</function-signature> | ||
| 69 | + <example> | ||
| 70 | + ${fn:indexOf(name, "-")} | ||
| 71 | + </example> | ||
| 72 | + </function> | ||
| 73 | + | ||
| 74 | + <function> | ||
| 75 | + <description> | ||
| 76 | + Joins all elements of an array into a string. | ||
| 77 | + </description> | ||
| 78 | + <name>join</name> | ||
| 79 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 80 | + <function-signature>java.lang.String join(java.lang.String[], java.lang.String)</function-signature> | ||
| 81 | + <example> | ||
| 82 | + ${fn:join(array, ";")} | ||
| 83 | + </example> | ||
| 84 | + </function> | ||
| 85 | + | ||
| 86 | + <function> | ||
| 87 | + <description> | ||
| 88 | + Returns the number of items in a collection, or the number of characters in a string. | ||
| 89 | + </description> | ||
| 90 | + <name>length</name> | ||
| 91 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 92 | + <function-signature>int length(java.lang.Object)</function-signature> | ||
| 93 | + <example> | ||
| 94 | + You have ${fn:length(shoppingCart.products)} in your shopping cart. | ||
| 95 | + </example> | ||
| 96 | + </function> | ||
| 97 | + | ||
| 98 | + <function> | ||
| 99 | + <description> | ||
| 100 | + Returns a string resulting from replacing in an input string all occurrences | ||
| 101 | + of a "before" string into an "after" substring. | ||
| 102 | + </description> | ||
| 103 | + <name>replace</name> | ||
| 104 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 105 | + <function-signature>java.lang.String replace(java.lang.String, java.lang.String, java.lang.String)</function-signature> | ||
| 106 | + <example> | ||
| 107 | + ${fn:replace(text, "-", "•")} | ||
| 108 | + </example> | ||
| 109 | + </function> | ||
| 110 | + | ||
| 111 | + <function> | ||
| 112 | + <description> | ||
| 113 | + Splits a string into an array of substrings. | ||
| 114 | + </description> | ||
| 115 | + <name>split</name> | ||
| 116 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 117 | + <function-signature>java.lang.String[] split(java.lang.String, java.lang.String)</function-signature> | ||
| 118 | + <example> | ||
| 119 | + ${fn:split(customerNames, ";")} | ||
| 120 | + </example> | ||
| 121 | + </function> | ||
| 122 | + | ||
| 123 | + <function> | ||
| 124 | + <description> | ||
| 125 | + Tests if an input string starts with the specified prefix. | ||
| 126 | + </description> | ||
| 127 | + <name>startsWith</name> | ||
| 128 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 129 | + <function-signature>boolean startsWith(java.lang.String, java.lang.String)</function-signature> | ||
| 130 | + <example> | ||
| 131 | + <c:if test="${fn:startsWith(product.id, "100-")}"> | ||
| 132 | + </example> | ||
| 133 | + </function> | ||
| 134 | + | ||
| 135 | + <function> | ||
| 136 | + <description> | ||
| 137 | + Returns a subset of a string. | ||
| 138 | + </description> | ||
| 139 | + <name>substring</name> | ||
| 140 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 141 | + <function-signature>java.lang.String substring(java.lang.String, int, int)</function-signature> | ||
| 142 | + <example> | ||
| 143 | + P.O. Box: ${fn:substring(zip, 6, -1)} | ||
| 144 | + </example> | ||
| 145 | + </function> | ||
| 146 | + | ||
| 147 | + <function> | ||
| 148 | + <description> | ||
| 149 | + Returns a subset of a string following a specific substring. | ||
| 150 | + </description> | ||
| 151 | + <name>substringAfter</name> | ||
| 152 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 153 | + <function-signature>java.lang.String substringAfter(java.lang.String, java.lang.String)</function-signature> | ||
| 154 | + <example> | ||
| 155 | + P.O. Box: ${fn:substringAfter(zip, "-")} | ||
| 156 | + </example> | ||
| 157 | + </function> | ||
| 158 | + | ||
| 159 | + <function> | ||
| 160 | + <description> | ||
| 161 | + Returns a subset of a string before a specific substring. | ||
| 162 | + </description> | ||
| 163 | + <name>substringBefore</name> | ||
| 164 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 165 | + <function-signature>java.lang.String substringBefore(java.lang.String, java.lang.String)</function-signature> | ||
| 166 | + <example> | ||
| 167 | + Zip (without P.O. Box): ${fn:substringBefore(zip, "-")} | ||
| 168 | + </example> | ||
| 169 | + </function> | ||
| 170 | + | ||
| 171 | + <function> | ||
| 172 | + <description> | ||
| 173 | + Converts all of the characters of a string to lower case. | ||
| 174 | + </description> | ||
| 175 | + <name>toLowerCase</name> | ||
| 176 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 177 | + <function-signature>java.lang.String toLowerCase(java.lang.String)</function-signature> | ||
| 178 | + <example> | ||
| 179 | + Product name: ${fn.toLowerCase(product.name)} | ||
| 180 | + </example> | ||
| 181 | + </function> | ||
| 182 | + | ||
| 183 | + <function> | ||
| 184 | + <description> | ||
| 185 | + Converts all of the characters of a string to upper case. | ||
| 186 | + </description> | ||
| 187 | + <name>toUpperCase</name> | ||
| 188 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 189 | + <function-signature>java.lang.String toUpperCase(java.lang.String)</function-signature> | ||
| 190 | + <example> | ||
| 191 | + Product name: ${fn.UpperCase(product.name)} | ||
| 192 | + </example> | ||
| 193 | + </function> | ||
| 194 | + | ||
| 195 | + <function> | ||
| 196 | + <description> | ||
| 197 | + Removes white spaces from both ends of a string. | ||
| 198 | + </description> | ||
| 199 | + <name>trim</name> | ||
| 200 | + <function-class>org.apache.taglibs.standard.functions.Functions</function-class> | ||
| 201 | + <function-signature>java.lang.String trim(java.lang.String)</function-signature> | ||
| 202 | + <example> | ||
| 203 | + Name: ${fn.trim(name)} | ||
| 204 | + </example> | ||
| 205 | + </function> | ||
| 206 | + | ||
| 207 | +</taglib> |
src/main/webapp/WEB-INF/tags/pager.tag
0 → 100644
| 1 | +++ a/src/main/webapp/WEB-INF/tags/pager.tag | ||
| 1 | +<%@ tag pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<%@ attribute name="id" required="true" type="java.lang.String"%> | ||
| 4 | +<%@ attribute name="pager" required="true" type="org.smart4j.framework.dao.bean.Pager"%> | ||
| 5 | +<c:set var="pageNumber" value="${pager.pageNumber}" /> | ||
| 6 | +<c:set var="pageSize" value="${pager.pageSize}" /> | ||
| 7 | +<c:set var="totalRecord" value="${pager.totalRecord}" /> | ||
| 8 | +<c:set var="totalPage" value="${pager.totalPage}" /> | ||
| 9 | + | ||
| 10 | +<div class="css-row"> | ||
| 11 | + <div class="css-right"> | ||
| 12 | + <div id="${id}"> | ||
| 13 | + <!-- <span>每页记录数:</span> | ||
| 14 | + ${pageSize} --> | ||
| 15 | + <div class="css-button-group ext-pager-button"> | ||
| 16 | + <c:choose> | ||
| 17 | + <c:when test="${pageNumber > 1 && pageNumber <= totalPage}"> | ||
| 18 | + <button class="btn btn-xs btn-danger" type="button" onclick="next_page(1);" data-pn="1">|第一页</button> | ||
| 19 | + <button class="btn btn-xs btn-danger" type="button" onclick="next_page(${pageNumber - 1});" data-pn="${pageNumber - 1}"><上一页</button> | ||
| 20 | + </c:when> | ||
| 21 | + <c:otherwise> | ||
| 22 | + <button class="btn btn-xs btn-danger" type="button" disabled>|<首页</button> | ||
| 23 | + <button class="btn btn-xs btn-danger" type="button" disabled><上一页</button> | ||
| 24 | + </c:otherwise> | ||
| 25 | + </c:choose> | ||
| 26 | + <span class="green middle bolder">${pageNumber}/${totalPage}</span> | ||
| 27 | + <c:choose> | ||
| 28 | + <c:when test="${pageNumber < totalPage}"> | ||
| 29 | + <button class="btn btn-xs btn-danger" type="button" onclick="next_page(${pageNumber + 1});" data-pn="${pageNumber + 1}">下一页></button> | ||
| 30 | + <button class="btn btn-xs btn-danger" type="button" onclick="next_page(${totalPage});" data-pn="${totalPage}">最后一页>|</button> | ||
| 31 | + </c:when> | ||
| 32 | + <c:otherwise> | ||
| 33 | + <button class="btn btn-xs btn-danger" type="button" disabled>下一页></button> | ||
| 34 | + <button class="btn btn-xs btn-danger" type="button" disabled>最后一页>|</button> | ||
| 35 | + </c:otherwise> | ||
| 36 | + </c:choose> | ||
| 37 | + <span class="green middle bolder">总记录数:${totalRecord}</span> | ||
| 38 | + </div> | ||
| 39 | + </div> | ||
| 40 | + </div> | ||
| 41 | +</div> | ||
| 0 | \ No newline at end of file | 42 | \ No newline at end of file |
src/main/webapp/pages/activity/activity_add.jsp
0 → 100644
| 1 | +++ a/src/main/webapp/pages/activity/activity_add.jsp | ||
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>新建活动 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | + | ||
| 13 | +<style type="text/css"> | ||
| 14 | + span.error{ | ||
| 15 | + padding-left: 15px; | ||
| 16 | + color: red; | ||
| 17 | + } | ||
| 18 | + </style> | ||
| 19 | +<link | ||
| 20 | + href="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/css/datetimepicker.css" | ||
| 21 | + rel="stylesheet"> | ||
| 22 | +</head> | ||
| 23 | +<body class="skin-blue fixed "> | ||
| 24 | + <div class="wrapper"> | ||
| 25 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 26 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 27 | + <div class="content-wrapper"> | ||
| 28 | + <section class="content-header"> | ||
| 29 | + <h1>${empty tActivity.id ? '新建活动':'编辑活动'} | ||
| 30 | + <small>${tActivity.name}</small> <small class="label label-warning" | ||
| 31 | + style="display: none" id="info_tab_span"><i | ||
| 32 | + class="fa fa-bell-o"></i>保存成功</small> | ||
| 33 | + </h1> | ||
| 34 | + <ol class="breadcrumb"> | ||
| 35 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 36 | + <li class="active">新增活动</li> | ||
| 37 | + </ol> | ||
| 38 | + </section> | ||
| 39 | + <!-- Main content --> | ||
| 40 | + <section class="content"> | ||
| 41 | + <form role="form" name="activityForm" method="post" | ||
| 42 | + id="activityForm"> | ||
| 43 | + <div class="row"> | ||
| 44 | + <!-- right column --> | ||
| 45 | + <div class="col-md-12"> | ||
| 46 | + <!-- general form elements disabled --> | ||
| 47 | + <div class="box box-warning"> | ||
| 48 | + <div class="box-body"> | ||
| 49 | + <div class="form-group"> | ||
| 50 | + <label> 活动名称 </label> | ||
| 51 | + <div class="input-group"> | ||
| 52 | + <span class="input-group-addon"><i class="fa fa-font"></i> | ||
| 53 | + </span> <input type="text" value="${tActivity.name }" name="name" | ||
| 54 | + id="name" class="form-control" placeholder="如:《我的音乐故事》于湉专场"> | ||
| 55 | + <input type="text" id="activity_id" name="activity_id" value="${tActivity.id}" hidden=""> | ||
| 56 | + </div> | ||
| 57 | + </div> | ||
| 58 | + <div class="form-group"> | ||
| 59 | + <label> EPG条目名 </label> | ||
| 60 | + <div class="input-group"> | ||
| 61 | + <span class="input-group-addon"><i | ||
| 62 | + class="fa fa-navicon "></i> </span> <input type="text" | ||
| 63 | + class="form-control" value="${tActivity.epg_name}" | ||
| 64 | + name="epg_name" id="epg_name" placeholder="如: 于湉做客北京壹空间"> | ||
| 65 | + <span class="input-group-btn"> | ||
| 66 | + <button class="btn btn-info btn-flat" onclick="copy_name();" | ||
| 67 | + type="button">同上</button> | ||
| 68 | + </span> | ||
| 69 | + </div> | ||
| 70 | + </div> | ||
| 71 | + <div class="form-group"> | ||
| 72 | + <label> 活动简述 </label> | ||
| 73 | + <div class="input-group"> | ||
| 74 | + <span class="input-group-addon"><i | ||
| 75 | + class="fa fa-file-word-o"></i> </span> <input type="text" | ||
| 76 | + class="form-control" value="${tActivity.description}" | ||
| 77 | + name="description" id="description" placeholder="简述"> | ||
| 78 | + </div> | ||
| 79 | + </div> | ||
| 80 | + <div class="form-group"> | ||
| 81 | + <label> 活动地点 </label> | ||
| 82 | + <div class="input-group"> | ||
| 83 | + <span class="input-group-addon"><i | ||
| 84 | + class="fa fa-street-view"></i> </span> <input type="text" | ||
| 85 | + class="form-control" value="${tActivity.place}" name="place" | ||
| 86 | + id="place" placeholder="如: 北京市朝阳区工人体育场"> | ||
| 87 | + </div> | ||
| 88 | + </div> | ||
| 89 | + <div class="form-group"> | ||
| 90 | + <label> 直播时间 </label> | ||
| 91 | + <div class="row"> | ||
| 92 | + <div class="col-lg-6"> | ||
| 93 | + <div class="input-group"> | ||
| 94 | + <span class="input-group-addon"> 开始时间 </span> <input | ||
| 95 | + type="text" class="form-control form_datetime" | ||
| 96 | + value="<fmt:formatDate value="${tActivity.start_time}" pattern="yyyy-MM-dd HH:mm"/>" | ||
| 97 | + name="start_time" id="start_time" | ||
| 98 | + data-inputmask="'alias': 'yyyy-MM-dd HH:mm'" data-mask="" /> | ||
| 99 | + </div> | ||
| 100 | + </div> | ||
| 101 | + <div class="col-lg-6"> | ||
| 102 | + <div class="input-group"> | ||
| 103 | + <span class="input-group-addon"> 结束时间</span> <input | ||
| 104 | + type="text" class="form-control form_datetime" | ||
| 105 | + value="<fmt:formatDate value="${tActivity.end_time}" pattern="yyyy-MM-dd HH:mm"/>" | ||
| 106 | + name="end_time" id="end_time" | ||
| 107 | + data-inputmask="'alias': 'yyyy-MM-dd HH:mm'" data-mask=""> | ||
| 108 | + </div> | ||
| 109 | + </div> | ||
| 110 | + </div> | ||
| 111 | + </div> | ||
| 112 | + <div class="form-group"> | ||
| 113 | + <label> 业务负责人 </label> | ||
| 114 | + <div class="input-group"> | ||
| 115 | + <span class="input-group-addon"><i class="fa fa-user"></i> | ||
| 116 | + </span> <input type="text" class="form-control" | ||
| 117 | + value="${tActivity.contact_user}" name="contact_user" | ||
| 118 | + id="contact_user" placeholder="如:曹峰-186110110" /> | ||
| 119 | + </div> | ||
| 120 | + </div> | ||
| 121 | + <div class="form-group"> | ||
| 122 | + <label> 预计并发人数 </label> | ||
| 123 | + <div class="input-group"> | ||
| 124 | + <span class="input-group-addon"><i | ||
| 125 | + class="fa fa-user-plus"></i> </span> <input type="text" | ||
| 126 | + class="form-control" value="${tActivity.v_count}" | ||
| 127 | + name="v_count" id="v_count" placeholder="如:200"> | ||
| 128 | + </div> | ||
| 129 | + </div> | ||
| 130 | + <div class="form-group"> | ||
| 131 | + <label> 抄送相关人员 </label> | ||
| 132 | + <div class="input-group"> | ||
| 133 | + <span class="input-group-addon"><i | ||
| 134 | + class="fa fa-user-md"></i> </span> <input type="text" | ||
| 135 | + class="form-control" value="${tActivity.notify_user }" | ||
| 136 | + name="notify_user" id="notify_user" | ||
| 137 | + placeholder="如:zhengxiangxiang@cnlive.com;liujicheng@cnlive.com"> | ||
| 138 | + </div> | ||
| 139 | + </div> | ||
| 140 | + <div class="form-group"> | ||
| 141 | + <label> 是否免费 </label> | ||
| 142 | + <div class="box box-warning"> | ||
| 143 | + <div class="box-body"> | ||
| 144 | + <div class="form-group"> | ||
| 145 | + <label> <input type="radio" | ||
| 146 | + ${tActivity.is_free==1 ? 'checked':''} name="is_free" | ||
| 147 | + value="1" class="flat-red" /> 是 | ||
| 148 | + </label> | ||
| 149 | + </div> | ||
| 150 | + <div class="form-group"> | ||
| 151 | + <label> <input type="radio" | ||
| 152 | + ${tActivity.is_free==0 ? 'checked':''} name="is_free" | ||
| 153 | + value="0" class="flat-red" /> 否 | ||
| 154 | + </label> | ||
| 155 | + </div> | ||
| 156 | + </div> | ||
| 157 | + </div> | ||
| 158 | + </div> | ||
| 159 | + <div class="form-group"> | ||
| 160 | + <label> 启用回放 </label> | ||
| 161 | + <div class="box box-warning"> | ||
| 162 | + <div class="box-body"> | ||
| 163 | + <div class="form-group"> | ||
| 164 | + <label> <input type="radio" name="is_playback" | ||
| 165 | + ${tActivity.is_playback==1 ? 'checked':''} value="1" | ||
| 166 | + class="flat-red" /> 是 | ||
| 167 | + </label> | ||
| 168 | + </div> | ||
| 169 | + <div class="form-group"> | ||
| 170 | + <label> <input type="radio" name="is_playback" | ||
| 171 | + ${tActivity.is_playback==0 ? 'checked':''} value="0" | ||
| 172 | + class="flat-red" /> 否 | ||
| 173 | + </label> | ||
| 174 | + </div> | ||
| 175 | + </div> | ||
| 176 | + </div> | ||
| 177 | + </div> | ||
| 178 | + <div class="form-group"> | ||
| 179 | + <label> 画面logo </label> | ||
| 180 | + <div class="box box-warning"> | ||
| 181 | + <div class="box-body"> | ||
| 182 | + <div class="form-group"> | ||
| 183 | + <label> <input type="radio" name="logo" value="tv" | ||
| 184 | + ${tActivity.logo=='tv' ? 'checked':''} class="flat-red" | ||
| 185 | + checked /> @TV | ||
| 186 | + </label> | ||
| 187 | + </div> | ||
| 188 | + <div class="form-group"> | ||
| 189 | + <label> <input type="radio" name="logo" | ||
| 190 | + ${tActivity.logo=='liveshow' ? 'checked':''} | ||
| 191 | + value="liveshow" class="flat-red" /> LiveShow | ||
| 192 | + </label> | ||
| 193 | + </div> | ||
| 194 | + <div class="form-group"> | ||
| 195 | + <label> <input type="radio" name="logo" | ||
| 196 | + value="null" ${tActivity.logo=='null' ? 'checked':''} | ||
| 197 | + class="flat-red" /> 无 | ||
| 198 | + </label> | ||
| 199 | + </div> | ||
| 200 | + </div> | ||
| 201 | + </div> | ||
| 202 | + </div> | ||
| 203 | + | ||
| 204 | + <div class="form-group"> | ||
| 205 | + <label> 垫片 </label> | ||
| 206 | + <div class="box box-warning"> | ||
| 207 | + <div class="box-body"> | ||
| 208 | + <div class="form-group"> | ||
| 209 | + <select class="form-control" name="t_default_video_id" | ||
| 210 | + id="t_default_video_id"> | ||
| 211 | + <c:forEach var="item" items="${tDefaultVideos}" | ||
| 212 | + varStatus="stat"> | ||
| 213 | + <option id="default_video_${item.id}" ${item.id==tActivity.t_default_video_id ? 'selected="selected"':''} value="${item.id}">${item.name}</option> | ||
| 214 | + </c:forEach> | ||
| 215 | + </select> | ||
| 216 | + </div> | ||
| 217 | + </div> | ||
| 218 | + </div> | ||
| 219 | + </div> | ||
| 220 | + <!-- 特殊情况下需要手动输入uuid | ||
| 221 | + <c:choose> | ||
| 222 | + <c:when test="${empty tActivity.id}"> | ||
| 223 | + <div class="form-group"> | ||
| 224 | + <label>UUID </label> | ||
| 225 | + <div class="input-group"> | ||
| 226 | + <span class="input-group-addon"><i | ||
| 227 | + class="fa fa-user"></i> </span> <input type="text" | ||
| 228 | + class="form-control" value="${tActivity.uuid}" name="uuid" | ||
| 229 | + id="uuid" placeholder="输入在ICMS新建的直播活动uuid" /> | ||
| 230 | + </div> | ||
| 231 | + </div> | ||
| 232 | + </c:when> | ||
| 233 | + </c:choose>--> | ||
| 234 | + <div class="form-group"> | ||
| 235 | + <label>聊天室ID </label> | ||
| 236 | + <div class="input-group"> | ||
| 237 | + <span class="input-group-addon"><i | ||
| 238 | + class="fa fa-user"></i> </span> <input type="text" | ||
| 239 | + class="form-control" value="${empty tActivity.chatroom_id ? '10001':tActivity.chatroom_id}" name="chatroom_id" | ||
| 240 | + id="chatroom_id" /> | ||
| 241 | + </div> | ||
| 242 | + </div> | ||
| 243 | + <div class="form-group"> | ||
| 244 | + <label> 输出频道 </label> | ||
| 245 | + <div class="row"> | ||
| 246 | + <div class="col-md-12"> | ||
| 247 | + <div class="box box-solid box-warning"> | ||
| 248 | + <div class="box-header"> | ||
| 249 | + <h3 class="box-title">请选择以下频道</h3> | ||
| 250 | + </div> | ||
| 251 | + <div class="box-body"> | ||
| 252 | + <c:forEach var="item" items="${tChannels}" | ||
| 253 | + varStatus="stat"> | ||
| 254 | + <div class="col-sm-3"> | ||
| 255 | + <div class="small-box bg-aqua" | ||
| 256 | + id="div_channel_box_${item.id}" | ||
| 257 | + onclick="select_channel(${item.id});"> | ||
| 258 | + <div class="inner"> | ||
| 259 | + <h2>${item.name_zh}</h2> | ||
| 260 | + <input type="checkbox" disabled="disabled" | ||
| 261 | + name="channel_id" title="${item.name_zh}" | ||
| 262 | + value="${item.id}" class="flat-red" />${item.id} | ||
| 263 | + </div> | ||
| 264 | + <a class="small-box-footer">主通道: | ||
| 265 | + <input type="radio" | ||
| 266 | + name="is_main" id="is_main" | ||
| 267 | + value="${item.id}" class="flat-red" /></a> | ||
| 268 | + </div> | ||
| 269 | + </div> | ||
| 270 | + </c:forEach> | ||
| 271 | + </div> | ||
| 272 | + </div> | ||
| 273 | + </div> | ||
| 274 | + </div> | ||
| 275 | + </div> | ||
| 276 | + <div class="box-footer"> | ||
| 277 | + <button type="button" id="t_activity_save_btn" | ||
| 278 | + name="t_activity_save_btn" onclick="toSubmit();" | ||
| 279 | + class="btn btn-success"> | ||
| 280 | + <i class="fa fa-save "></i> 保存 | ||
| 281 | + </button> | ||
| 282 | + </div> | ||
| 283 | + </div> | ||
| 284 | + </div> | ||
| 285 | + </div> | ||
| 286 | + </div> | ||
| 287 | + </form> | ||
| 288 | + </div> | ||
| 289 | + </section> | ||
| 290 | + </div> | ||
| 291 | + </div> | ||
| 292 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 293 | +</div> | ||
| 294 | + <!-- 信号选择结束 --> | ||
| 295 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 296 | + | ||
| 297 | + <script src="${BASE}/static/assets/cnlive/js/activity.js"></script> | ||
| 298 | + <script | ||
| 299 | + src="${BASE}/static/assets/cnlive/js/validate/validate_activity.js" | ||
| 300 | + type="text/javascript"></script> | ||
| 301 | + <c:forEach var="item" items="${tChannels}" varStatus="stat"> | ||
| 302 | + <c:if test="${item.t_activity_id==tActivity.id}"> | ||
| 303 | + <script type="text/javascript"> | ||
| 304 | + var selected_id=${item.id}; | ||
| 305 | + select_channel(selected_id); | ||
| 306 | + </script> | ||
| 307 | + </c:if> | ||
| 308 | + </c:forEach> | ||
| 309 | + <script type="text/javascript"> | ||
| 310 | + | ||
| 311 | + $(function () { | ||
| 312 | + //Money Euro | ||
| 313 | + $("[data-mask]").inputmask(); | ||
| 314 | + }); | ||
| 315 | + | ||
| 316 | + $(function () { | ||
| 317 | + $("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"}); | ||
| 318 | + //Datemask2 mm/dd/yyyy | ||
| 319 | + $("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"}); | ||
| 320 | + //Money Euro | ||
| 321 | + $("[data-mask]").inputmask(); | ||
| 322 | + | ||
| 323 | + //Date range picker | ||
| 324 | + $('#reservation').daterangepicker(); | ||
| 325 | + //Date range picker with time picker | ||
| 326 | + $('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A'}); | ||
| 327 | + //Date range as a button | ||
| 328 | + $('#daterange-btn').daterangepicker( | ||
| 329 | + { | ||
| 330 | + ranges: { | ||
| 331 | + 'Today': [moment(), moment()], | ||
| 332 | + 'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)], | ||
| 333 | + 'Last 7 Days': [moment().subtract('days', 6), moment()], | ||
| 334 | + 'Last 30 Days': [moment().subtract('days', 29), moment()], | ||
| 335 | + 'This Month': [moment().startOf('month'), moment().endOf('month')], | ||
| 336 | + 'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')] | ||
| 337 | + }, | ||
| 338 | + startDate: moment().subtract('days', 29), | ||
| 339 | + endDate: moment() | ||
| 340 | + }, | ||
| 341 | + function (start, end) { | ||
| 342 | + $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); | ||
| 343 | + } | ||
| 344 | + ); | ||
| 345 | + //Flat red color scheme for iCheck | ||
| 346 | + $('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({ | ||
| 347 | + checkboxClass: 'icheckbox_flat-green', | ||
| 348 | + radioClass: 'iradio_flat-green' | ||
| 349 | + }); | ||
| 350 | + }); | ||
| 351 | + </script> | ||
| 352 | + | ||
| 353 | + | ||
| 354 | + <!-- Le javascript | ||
| 355 | + ================================================== --> | ||
| 356 | + <script | ||
| 357 | + src="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script> | ||
| 358 | + | ||
| 359 | + <script type="text/javascript"> | ||
| 360 | + $(".form_datetime").datetimepicker({ | ||
| 361 | + //format: "dd MM yyyy - hh:ii", | ||
| 362 | + format: "yyyy-mm-dd hh:ii", | ||
| 363 | + autoclose: true, | ||
| 364 | + todayBtn: true, | ||
| 365 | + pickerPosition: "bottom-right" | ||
| 366 | + }); | ||
| 367 | +</script> | ||
| 368 | + <script type="text/javascript"> | ||
| 369 | + $(document).ready(function(){ | ||
| 370 | + $('input').iCheck({ | ||
| 371 | + checkboxClass: 'icheckbox_square-green', | ||
| 372 | + radioClass: 'iradio_square-green', | ||
| 373 | + increaseArea: '20%' // optional | ||
| 374 | + }); | ||
| 375 | +}); | ||
| 376 | + </script> | ||
| 377 | +</body> | ||
| 378 | +</html> |
src/main/webapp/pages/activity/activity_append_wowza.jsp
0 → 100644
| 1 | +++ a/src/main/webapp/pages/activity/activity_append_wowza.jsp | ||
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>设定输入信号 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +</head> | ||
| 13 | +<body class="skin-blue fixed "> | ||
| 14 | + <div class="wrapper"> | ||
| 15 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 16 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 17 | + <div class="content-wrapper"> | ||
| 18 | + <section class="content-header"> | ||
| 19 | + <h1> | ||
| 20 | + 设置输入信号 <small>${tActivity.name}</small> <small | ||
| 21 | + class="label label-warning" style="display: none" | ||
| 22 | + id="info_tab_span"><i class="fa fa-bell-o"></i>保存成功</small> | ||
| 23 | + </h1> | ||
| 24 | + <ol class="breadcrumb"> | ||
| 25 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 26 | + <li class="active">新增活动</li> | ||
| 27 | + </ol> | ||
| 28 | + </section> | ||
| 29 | + <!-- Main content --> | ||
| 30 | + <section class="content"> | ||
| 31 | + <div class="row"> | ||
| 32 | + <!-- right column --> | ||
| 33 | + <div class="col-md-12"> | ||
| 34 | + <!-- general form elements disabled --> | ||
| 35 | + <div class="col-md-12"> | ||
| 36 | + <div class="row"> | ||
| 37 | + <div class="col-md-6"> | ||
| 38 | + <div class="box box-primary"> | ||
| 39 | + <div class="box-header"> | ||
| 40 | + <h3 class="box-title text-blue">#选择Wowza服务器</h3> | ||
| 41 | + </div> | ||
| 42 | + <div class="box-body"> | ||
| 43 | + <c:forEach var="item" items="${tWowzas}" varStatus="stat"> | ||
| 44 | + <div class="form-group"> | ||
| 45 | + <label> <input type="radio" name="tWowza" | ||
| 46 | + value="${item.id}" class="flat-green" />${item.name}_${item.lan_ip} | ||
| 47 | + </label> | ||
| 48 | + </div> | ||
| 49 | + </c:forEach> | ||
| 50 | + </div> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | + <div class="col-md-6"> | ||
| 54 | + <div class="box box-warning"> | ||
| 55 | + <div class="box-header"> | ||
| 56 | + <h3 class="box-title text-yellow">#选择Wowza Stream</h3> | ||
| 57 | + </div> | ||
| 58 | + <div class="box-body" id="wowza_stream_body"></div> | ||
| 59 | + </div> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | + <div class="box-footer" style="text-align:center; margin:0 auto;"> | ||
| 64 | + <button type="button" id="append_wowza_btn" | ||
| 65 | + class="btn btn-danger" | ||
| 66 | + onclick="append_wowza(${tActivity.id});">确认保存</button> | ||
| 67 | + </div> | ||
| 68 | + | ||
| 69 | + <div class="box box-warning"> | ||
| 70 | + <div class="box-body"> | ||
| 71 | + <div class="col-md-12"> | ||
| 72 | + <div class="box-body"> | ||
| 73 | + <table class="table table-bordered"> | ||
| 74 | + <tr> | ||
| 75 | + <td colspan="3" align='center'><h2>${tActivity.name}</h2></td> | ||
| 76 | + </tr> | ||
| 77 | + <tr> | ||
| 78 | + <td style="width: 200pt">状态:</td> | ||
| 79 | + <td colspan="3"><span class="class label-danger"> | ||
| 80 | + <c:if test="${tActivity.state==0}">未开始</c:if> <c:if | ||
| 81 | + test="${tActivity.state==1}">直播中</c:if> <c:if | ||
| 82 | + test="${tActivity.state==2}">已结束</c:if> | ||
| 83 | + </span></td> | ||
| 84 | + </tr> | ||
| 85 | + <tr> | ||
| 86 | + <td>EPG条目:</td> | ||
| 87 | + <td colspan="3">${tActivity.epg_name}</td> | ||
| 88 | + </tr> | ||
| 89 | + <tr> | ||
| 90 | + <td>地点:</td> | ||
| 91 | + <td colspan="3">${tActivity.place}</td> | ||
| 92 | + </tr> | ||
| 93 | + <tr> | ||
| 94 | + <td>简介:</td> | ||
| 95 | + <td colspan="3">${tActivity.description}</td> | ||
| 96 | + </tr> | ||
| 97 | + <tr> | ||
| 98 | + <td>直播时间</td> | ||
| 99 | + <td colspan="3">${tActivity.start_time}</td> | ||
| 100 | + </tr> | ||
| 101 | + <tr> | ||
| 102 | + <td>直播地点</td> | ||
| 103 | + <td colspan="3">${tActivity.end_time}</td> | ||
| 104 | + </tr> | ||
| 105 | + <tr> | ||
| 106 | + <td>现场联系人</td> | ||
| 107 | + <td colspan="3">${tActivity.contact_user}</td> | ||
| 108 | + </tr> | ||
| 109 | + <tr> | ||
| 110 | + <td>邮件抄送</td> | ||
| 111 | + <td colspan="3">${tActivity.notify_user}</td> | ||
| 112 | + </tr> | ||
| 113 | + <tr> | ||
| 114 | + <td>并发用户数</td> | ||
| 115 | + <td colspan="3">${tActivity.v_count}</td> | ||
| 116 | + </tr> | ||
| 117 | + <tr> | ||
| 118 | + <td>画面LOGO</td> | ||
| 119 | + <td colspan="3">${tActivity.logo}</td> | ||
| 120 | + </tr> | ||
| 121 | + <tr> | ||
| 122 | + <td>UUID</td> | ||
| 123 | + <td colspan="3"><span class="class label-success">${tActivity.uuid}</span></td> | ||
| 124 | + </tr> | ||
| 125 | + <tr> | ||
| 126 | + <td>是否收费</td> | ||
| 127 | + <td colspan="3"><c:if test="${tActivity.is_free==0}">收费</c:if> | ||
| 128 | + <c:if test="${tActivity.is_free==1}">免费</c:if></td> | ||
| 129 | + </tr> | ||
| 130 | + <tr> | ||
| 131 | + <td>回放地址</td> | ||
| 132 | + <td colspan="3">${tActivity.playbak_url}</td> | ||
| 133 | + </tr> | ||
| 134 | + <tr> | ||
| 135 | + <td>播出频道:</td> | ||
| 136 | + <td colspan="3"><c:forEach var="item" | ||
| 137 | + items="${tChannels}" varStatus="stat"> | ||
| 138 | + ${item.name_zh}、 | ||
| 139 | + </c:forEach></td> | ||
| 140 | + </tr> | ||
| 141 | + <tr> | ||
| 142 | + <td>输入信号:</td> | ||
| 143 | + <td colspan="3"> | ||
| 144 | + stream_name:${vWowzaSignal.stream_name}、wowza_name:${vWowzaSignal.wowza_name}、wowza_lan_ip:${vWowzaSignal.wowza_lan_ip}、 | ||
| 145 | + </td> | ||
| 146 | + </tr> | ||
| 147 | + </table> | ||
| 148 | + </div> | ||
| 149 | + </div> | ||
| 150 | + | ||
| 151 | + </div> | ||
| 152 | + </div> | ||
| 153 | + </div> | ||
| 154 | + </div> | ||
| 155 | + </div> | ||
| 156 | + </section> | ||
| 157 | + </div> | ||
| 158 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 159 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 160 | + <script type="text/javascript"> | ||
| 161 | + $(document).ready(function(){ | ||
| 162 | + $("input[name='tWowza']").on('ifChecked', function(event){ | ||
| 163 | + var id=this.value; | ||
| 164 | + load_streams(id); | ||
| 165 | + }); | ||
| 166 | + $("input[name='tWowza']").iCheck({ | ||
| 167 | + radioClass: 'iradio_square-green', | ||
| 168 | + increaseArea: '20%' | ||
| 169 | + }); | ||
| 170 | +}); | ||
| 171 | + </script> | ||
| 172 | +</body> | ||
| 173 | +</html> |
src/main/webapp/pages/activity/activity_management.jsp
0 → 100644
| 1 | +++ a/src/main/webapp/pages/activity/activity_management.jsp | ||
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>活动管理 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +</head> | ||
| 13 | +<body class="skin-blue fixed "> | ||
| 14 | + <div class="wrapper"> | ||
| 15 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 16 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 17 | + <div class="content-wrapper"> | ||
| 18 | + <!-- Content Header (Page header) --> | ||
| 19 | + <section class="content-header"> | ||
| 20 | + <h1> | ||
| 21 | + 活动管理<small class="label label-warning" style="display: none" | ||
| 22 | + id="info_tab_span"><i class="fa fa-bell-o"></i></small> | ||
| 23 | + </h1> | ||
| 24 | + | ||
| 25 | + <ol class="breadcrumb"> | ||
| 26 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 27 | + <li class="active">活动管理</li> | ||
| 28 | + </ol> | ||
| 29 | + </section> | ||
| 30 | + <!-- Main content --> | ||
| 31 | + <section class="content"> | ||
| 32 | + <div class="row"> | ||
| 33 | + <div class="col-xs-12"> | ||
| 34 | + <div class="box box-warning"> | ||
| 35 | + <div class="box-header with-border"> | ||
| 36 | + <h3 class="box-title"></h3> | ||
| 37 | + <div class="box-tools"> | ||
| 38 | + <div class="input-group"> | ||
| 39 | + <form action="../search/1" method="post"> | ||
| 40 | + <div class="input-group"> | ||
| 41 | + <input type="text" name="search_text" id="search_text" | ||
| 42 | + class="form-control input-sm" style="width: 150px;" | ||
| 43 | + placeholder="Search" /> | ||
| 44 | + <button id="t_activity_search_btn" type="submit" | ||
| 45 | + class="btn btn-sm btn-default"> | ||
| 46 | + <i class="fa fa-search"></i>搜索 | ||
| 47 | + </button> | ||
| 48 | + </div> | ||
| 49 | + </form> | ||
| 50 | + </div> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | + <!-- /.box-header --> | ||
| 54 | + <div class="box-body"> | ||
| 55 | + <table class="table table-bordered"> | ||
| 56 | + <tr> | ||
| 57 | + <th>活动名称</th> | ||
| 58 | + <th>发起人</th> | ||
| 59 | + <th>开始时间</th> | ||
| 60 | + <th>结束时间</th> | ||
| 61 | + <th>状态</th> | ||
| 62 | + <c:if test="${sessionScope.roleId=='1'}"><th>追加信号</th></c:if> | ||
| 63 | + <th>直播前</th> | ||
| 64 | + <!-- <th>直播中</th> --> | ||
| 65 | + <th>直播后</th> | ||
| 66 | + <th>修改</th> | ||
| 67 | + <th>删除</th> | ||
| 68 | + </tr> | ||
| 69 | + <c:forEach var="item" items="${tActivitys.recordList}" | ||
| 70 | + varStatus="stat"> | ||
| 71 | + <tr> | ||
| 72 | + <td><a href="${BASE}/activity/preview/${item.id}">${item.name}</a> | ||
| 73 | + </td> | ||
| 74 | + <td>${item.user_name}</td> | ||
| 75 | + <td><fmt:formatDate value="${item.start_time}" | ||
| 76 | + pattern="yyyy-MM-dd HH:mm" /></td> | ||
| 77 | + <td>${fn:substringAfter(item.end_time, " ")}</td> | ||
| 78 | + <td> | ||
| 79 | + <c:if test="${item.state==0}"> | ||
| 80 | + <span class="badge bg-green">未开始</span> | ||
| 81 | + </c:if> <c:if test="${item.state==1}"> | ||
| 82 | + <span class="badge bg-red">直播中</span> | ||
| 83 | + </c:if> <c:if test="${item.state==2}"> | ||
| 84 | + <span class="badge">直播结束</span> | ||
| 85 | + </c:if> <c:if test="${item.state==3}"> | ||
| 86 | + <span class="badge">回放同步中</span> | ||
| 87 | + </c:if> <c:if test="${item.state==4}"> | ||
| 88 | + <span class="badge">同步完成</span> | ||
| 89 | + </c:if> | ||
| 90 | + </td> | ||
| 91 | + <c:if test="${sessionScope.roleId=='1'}"> | ||
| 92 | + <td> | ||
| 93 | + <button class="btn btn-danger btn-sm" | ||
| 94 | + onclick="preload_wowza(${item.id});"> | ||
| 95 | + <i class="fa fa-plus"></i> | ||
| 96 | + </button> | ||
| 97 | + </td> | ||
| 98 | + </c:if> | ||
| 99 | + <td> | ||
| 100 | + <!-- 直播前 --> | ||
| 101 | + <c:choose> | ||
| 102 | + <c:when test="${item.state==2}"> | ||
| 103 | + <button class="btn btn-success btn-sm" | ||
| 104 | + disabled="disabled"> | ||
| 105 | + <i class="fa fa-cogs"></i> | ||
| 106 | + </button> | ||
| 107 | + </c:when> | ||
| 108 | + <c:otherwise> | ||
| 109 | + <button class="btn btn-success btn-sm" | ||
| 110 | + onclick="to_step_before(${item.id});"> | ||
| 111 | + <i class="fa fa-cogs"></i> | ||
| 112 | + </button> | ||
| 113 | + </c:otherwise> | ||
| 114 | + </c:choose></td> | ||
| 115 | + <!-- <td><c:choose> | ||
| 116 | + <c:when test="${item.state==2}"> | ||
| 117 | + <button class="btn btn-success btn-sm" | ||
| 118 | + disabled="disabled"> | ||
| 119 | + <i class="fa fa-cogs"></i> | ||
| 120 | + </button> | ||
| 121 | + </c:when> | ||
| 122 | + <c:otherwise> | ||
| 123 | + <button class="btn btn-success btn-sm" | ||
| 124 | + onclick="to_step_in(${item.id});"> | ||
| 125 | + <i class="fa fa-cogs"></i> | ||
| 126 | + </button> | ||
| 127 | + </c:otherwise> | ||
| 128 | + </c:choose></td> --> | ||
| 129 | + <td> | ||
| 130 | + <!-- 直播后 --> | ||
| 131 | + <c:choose> | ||
| 132 | + <c:when test="${item.state==0}"> | ||
| 133 | + <button class="btn btn-success btn-sm" disabled="disabled"> | ||
| 134 | + <i class="fa fa-cogs"></i> | ||
| 135 | + </button> | ||
| 136 | + </c:when> | ||
| 137 | + <c:otherwise> | ||
| 138 | + <button class="btn btn-success btn-sm" | ||
| 139 | + onclick="to_step_after(${item.id});"> | ||
| 140 | + <i class="fa fa-cogs"></i> | ||
| 141 | + </button> | ||
| 142 | + </c:otherwise> | ||
| 143 | + </c:choose> | ||
| 144 | + </td> | ||
| 145 | + <td> | ||
| 146 | + <button class="btn btn-default btn-sm" | ||
| 147 | + onclick="t_activity_edit(${item.id});"> | ||
| 148 | + <i class="fa fa-edit"></i> | ||
| 149 | + </button> | ||
| 150 | + </td> | ||
| 151 | + <td> | ||
| 152 | + <button class="btn btn-danger btn-sm" | ||
| 153 | + onclick="t_activity_delete(${item.id});"> | ||
| 154 | + <i class="fa fa-close"></i> | ||
| 155 | + </button> | ||
| 156 | + </td> | ||
| 157 | + </tr> | ||
| 158 | + </c:forEach> | ||
| 159 | + </table> | ||
| 160 | + </div> | ||
| 161 | + <!-- /.box-body --> | ||
| 162 | + <div class="box-footer clearfix"> | ||
| 163 | + <center> | ||
| 164 | + <tag:pager id="product_pager" pager="${tActivitys}" /> | ||
| 165 | + </center> | ||
| 166 | + </div> | ||
| 167 | + </div> | ||
| 168 | + </div> | ||
| 169 | + </div> | ||
| 170 | + </div> | ||
| 171 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 172 | + </div> | ||
| 173 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 174 | +</body> | ||
| 175 | +</html> |
src/main/webapp/pages/activity/activity_preview.jsp
0 → 100644
| 1 | +++ a/src/main/webapp/pages/activity/activity_preview.jsp | ||
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>活动详情 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.js"></script> | ||
| 13 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.html5.js"></script> | ||
| 14 | +<script type="text/javascript">jwplayer.key="MGAzpXRYxGnaVXhH8jSdKXzDe7ucAAvZGWggIA==";</script> | ||
| 15 | +</head> | ||
| 16 | +<body class="skin-blue fixed "> | ||
| 17 | + <div class="wrapper"> | ||
| 18 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 19 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 20 | + <div class="content-wrapper"> | ||
| 21 | + <!-- Content Header (Page header) --> | ||
| 22 | + <section class="content-header"> | ||
| 23 | + <h1> | ||
| 24 | + 直播活动详情 <small>${tActivity.name}</small> | ||
| 25 | + </h1> | ||
| 26 | + <ol class="breadcrumb"> | ||
| 27 | + <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 28 | + <li><a href="#">直播详情</a></li> | ||
| 29 | + </ol> | ||
| 30 | + </section> | ||
| 31 | + <!-- Main content --> | ||
| 32 | + <section class="content"> | ||
| 33 | + <!-- row --> | ||
| 34 | + <div class="row"> | ||
| 35 | + <div class="col-md-12"> | ||
| 36 | + <!-- The time line --> | ||
| 37 | + <ul class="timeline"> | ||
| 38 | + <li class="time-label"><span class="bg-blue">活动信息详情</span></li> | ||
| 39 | + <li><i class="fa fa-gears bg-maroon"></i> | ||
| 40 | + <div class="timeline-item"> | ||
| 41 | + <div class="timeline-body"> | ||
| 42 | + <div class="row"> | ||
| 43 | + <div class="col-md-12"> | ||
| 44 | + <div class="box box-danger"> | ||
| 45 | + <div class="box-body"> | ||
| 46 | + <table class="table table-bordered"> | ||
| 47 | + <tr> | ||
| 48 | + <td colspan="3" align='center'><h2>${tActivity.name}</h2></td> | ||
| 49 | + </tr> | ||
| 50 | + <tr> | ||
| 51 | + <td style="width: 200pt">状态:</td> | ||
| 52 | + <td colspan="3"><span class="class label-danger"> | ||
| 53 | + <c:if test="${tActivity.state==0}">未开始</c:if> <c:if | ||
| 54 | + test="${tActivity.state==1}">直播中</c:if> <c:if | ||
| 55 | + test="${tActivity.state==2}">已结束</c:if> | ||
| 56 | + </span></td> | ||
| 57 | + </tr> | ||
| 58 | + <tr> | ||
| 59 | + <td>EPG条目:</td> | ||
| 60 | + <td colspan="3">${tActivity.epg_name}</td> | ||
| 61 | + </tr> | ||
| 62 | + <tr> | ||
| 63 | + <td>地点:</td> | ||
| 64 | + <td colspan="3">${tActivity.place}</td> | ||
| 65 | + </tr> | ||
| 66 | + <tr> | ||
| 67 | + <td>简介:</td> | ||
| 68 | + <td colspan="3">${tActivity.description}</td> | ||
| 69 | + </tr> | ||
| 70 | + <tr> | ||
| 71 | + <td>直播时间</td> | ||
| 72 | + <td colspan="3">${tActivity.start_time}</td> | ||
| 73 | + </tr> | ||
| 74 | + <tr> | ||
| 75 | + <td>直播地点</td> | ||
| 76 | + <td colspan="3">${tActivity.end_time}</td> | ||
| 77 | + </tr> | ||
| 78 | + <tr> | ||
| 79 | + <td>现场联系人</td> | ||
| 80 | + <td colspan="3">${tActivity.contact_user}</td> | ||
| 81 | + </tr> | ||
| 82 | +<tr> | ||
| 83 | + <td>邮件抄送</td> | ||
| 84 | + <td colspan="3">${tActivity.notify_user}</td> | ||
| 85 | + </tr> | ||
| 86 | + <tr> | ||
| 87 | + <td>并发用户数</td> | ||
| 88 | + <td colspan="3">${tActivity.v_count}</td> | ||
| 89 | + </tr> | ||
| 90 | + <tr> | ||
| 91 | + <td>画面LOGO</td> | ||
| 92 | + <td colspan="3">${tActivity.logo}</td> | ||
| 93 | + </tr> | ||
| 94 | + <tr> | ||
| 95 | + <td>UUID</td> | ||
| 96 | + <td colspan="3"><span class="class label-success">${tActivity.uuid}</span></td> | ||
| 97 | + </tr> | ||
| 98 | + <tr> | ||
| 99 | + <td>是否收费</td> | ||
| 100 | + <td colspan="3"><c:if | ||
| 101 | + test="${tActivity.is_free==0}">收费</c:if> <c:if | ||
| 102 | + test="${tActivity.is_free==1}">免费</c:if></td> | ||
| 103 | + </tr> | ||
| 104 | + <tr> | ||
| 105 | + <td>回放地址</td> | ||
| 106 | + <td colspan="3">${tActivity.playbak_url}</td> | ||
| 107 | + </tr> | ||
| 108 | + </table> | ||
| 109 | + </div> | ||
| 110 | + </div> | ||
| 111 | + </div> | ||
| 112 | + </div> | ||
| 113 | + </div> | ||
| 114 | + </div></li> | ||
| 115 | + <li class="time-label"><span class="bg-red">播出频道</span></li> | ||
| 116 | + <li><i class="fa fa-video-camera bg-maroon"></i> | ||
| 117 | + <div class="timeline-item"> | ||
| 118 | + <h3 class="timeline-header"> | ||
| 119 | + <a>频道名称(实际播放地址)</a> | ||
| 120 | + </h3> | ||
| 121 | + <div class="timeline-body"> | ||
| 122 | + <div class="row"> | ||
| 123 | + <c:forEach var="item" items="${vChannels}" varStatus="stat"> | ||
| 124 | + <div class="col-md-6"> | ||
| 125 | + <div class="box box-success box-solid"> | ||
| 126 | + <div class="box-header with-border"> | ||
| 127 | + <h3 class="box-title">${item.name_zh}</h3> | ||
| 128 | + <div class="box-tools pull-right"> | ||
| 129 | + <button class="btn btn-sm" id="play_button_${item.id}" | ||
| 130 | + onclick="play(${item.id});">重新载入</button> | ||
| 131 | + </div> | ||
| 132 | + </div> | ||
| 133 | + <div class="box-body"> | ||
| 134 | + <input type="hidden" name="play_url_${item.id}" | ||
| 135 | + id="play_url_${item.id}" value="${item.play_url}" /> <span | ||
| 136 | + class="mailbox-attachment-icon has-img" | ||
| 137 | + id="player_span_${item.id}"> <img | ||
| 138 | + src="${BASE}/static/assets/dist/img/photo2.png" | ||
| 139 | + alt="Attachment"> | ||
| 140 | + </span> | ||
| 141 | + </div> | ||
| 142 | + <div class="box-footer"></div> | ||
| 143 | + </div> | ||
| 144 | + </div> | ||
| 145 | + </c:forEach> | ||
| 146 | + </div> | ||
| 147 | + </div> | ||
| 148 | + <div class='timeline-footer'></div> | ||
| 149 | + </div></li> | ||
| 150 | + <li class="time-label"><span class="bg-yellow">流媒体服务器</span></li> | ||
| 151 | + <li><i class="fa fa-gears bg-aqua"></i> | ||
| 152 | + <div class="timeline-item"> | ||
| 153 | + <h3 class="timeline-header"> | ||
| 154 | + <a href="#">wowza 编解码地址</a> | ||
| 155 | + </h3> | ||
| 156 | + <div class="timeline-body"> | ||
| 157 | + <div class="row"> | ||
| 158 | + <c:forEach var="item" items="${vChannels}" varStatus="stat"> | ||
| 159 | + <div class="col-md-6"> | ||
| 160 | + <div class="box box-warning box-solid"> | ||
| 161 | + <div class="box-header with-border"> | ||
| 162 | + <h3 class="box-title">${item.application_name}/${item.stream_name}</h3> | ||
| 163 | + <div class="box-tools pull-right"> | ||
| 164 | + <button class="btn btn-sm" | ||
| 165 | + id="play_button_w_${item.uuid}" | ||
| 166 | + onclick="play_w('${item.uuid}');">重新载入</button> | ||
| 167 | + </div> | ||
| 168 | + </div> | ||
| 169 | + <div class="box-body"> | ||
| 170 | + <input type="hidden" | ||
| 171 | + name="play_url_w_${item.uuid}" | ||
| 172 | + id="play_url_w_${item.uuid}" | ||
| 173 | + value="${item.publish_url}" /> <span | ||
| 174 | + class="mailbox-attachment-icon has-img w" | ||
| 175 | + id="player_span_${item.uuid}"> <img | ||
| 176 | + src="${BASE}/static/assets/dist/img/photo2.png" | ||
| 177 | + alt="Attachment"> | ||
| 178 | + </span> | ||
| 179 | + </div> | ||
| 180 | + <div class="box-footer"></div> | ||
| 181 | + </div> | ||
| 182 | + </div> | ||
| 183 | + </c:forEach> | ||
| 184 | + </div> | ||
| 185 | + </div> | ||
| 186 | + </div></li> | ||
| 187 | + </ul> | ||
| 188 | + </div> | ||
| 189 | + </div> | ||
| 190 | + </section> | ||
| 191 | + </div> | ||
| 192 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 193 | + </div> | ||
| 194 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 195 | + <script src="${BASE}/static/assets/cnlive/js/player_6.js"></script> | ||
| 196 | +</body> | ||
| 197 | +</html> |
src/main/webapp/pages/activity/activity_step.jsp
0 → 100644
| 1 | +++ a/src/main/webapp/pages/activity/activity_step.jsp | ||
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>活动管理 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +<link rel="stylesheet" | ||
| 13 | + href="${BASE}/static/assets/plugins/countdown/countdown/jquery.countdown.css" /> | ||
| 14 | +<!-- Ion Slider --> | ||
| 15 | +<link href="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.css" | ||
| 16 | + rel="stylesheet" type="text/css" /> | ||
| 17 | +<!-- ion slider Nice --> | ||
| 18 | +<link | ||
| 19 | + href="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.skinNice.css" | ||
| 20 | + rel="stylesheet" type="text/css" /> | ||
| 21 | +<!-- bootstrap slider --> | ||
| 22 | +<link href="${BASE}/static/assets/plugins/bootstrap-slider/slider.css" | ||
| 23 | + rel="stylesheet" type="text/css" /> | ||
| 24 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.js"></script> | ||
| 25 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.html5.js"></script> | ||
| 26 | +<script type="text/javascript">jwplayer.key="MGAzpXRYxGnaVXhH8jSdKXzDe7ucAAvZGWggIA==";</script> | ||
| 27 | + | ||
| 28 | +</head> | ||
| 29 | +<body class="skin-blue fixed "> | ||
| 30 | + <div class="wrapper"> | ||
| 31 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 32 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 33 | + <div class="content-wrapper"> | ||
| 34 | + <section class="content-header"> | ||
| 35 | + <h1> | ||
| 36 | + 直播活动详情 <small>${tActivity.name}</small> <input type="hidden" | ||
| 37 | + name="activity_id" id="activity_id" value="${tActivity.id}" /> <small | ||
| 38 | + class="label label-warning" style="display: none" | ||
| 39 | + id="info_tab_span"><i class="fa fa-bell-o"></i>保存成功</small> | ||
| 40 | + </h1> | ||
| 41 | + <ol class="breadcrumb"> | ||
| 42 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 43 | + <li><a href="${BASE}/activity/list/1">活动管理</a></li> | ||
| 44 | + <li class="active">活动步骤</li> | ||
| 45 | + </ol> | ||
| 46 | + </section> | ||
| 47 | + <section class="content"> | ||
| 48 | + <div class="row"> | ||
| 49 | + <div class="box box-danger"> | ||
| 50 | + <div class="box-header"> | ||
| 51 | + <h3 class="box-title">直播倒计时:</h3> | ||
| 52 | + </div> | ||
| 53 | + <div class="box-body"> | ||
| 54 | + <div class="row"> | ||
| 55 | + <div class="col-xs-6"> | ||
| 56 | + <div class="form-group has-warning"> | ||
| 57 | + <label class="control-label" for="inputWarning"> <i | ||
| 58 | + class="fa fa-bell-o"></i> 提示:请根据直播操作流程严格执行以下任务流程! | ||
| 59 | + </label> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + <div class="col-xs-6" id="countdown"></div> | ||
| 63 | + <p id="note" style="display: none"></p> | ||
| 64 | + </div> | ||
| 65 | + </div> | ||
| 66 | + </div> | ||
| 67 | + </div> | ||
| 68 | + <div class="row"> | ||
| 69 | + <div class="col-md-12"> | ||
| 70 | + <ul class="timeline"> | ||
| 71 | + <li class="time-label" id="li_qian"><span class="bg-red">直播前操作流程 | ||
| 72 | + <i class="fa fa-clock-o"></i> <fmt:formatDate | ||
| 73 | + value="${tActivity.start_time}" pattern="yyyy-mm-dd HH:mm" /> | ||
| 74 | + 之前 | ||
| 75 | + </span></li> | ||
| 76 | + <li> | ||
| 77 | + <div class="timeline-item"> | ||
| 78 | + <div class="col-md-12"> | ||
| 79 | + <ul class="timeline"> | ||
| 80 | + <li class="time-label"><span class="bg-yellow"> | ||
| 81 | + step 1 </span></li> | ||
| 82 | + <li> | ||
| 83 | + <div class="timeline-item"> | ||
| 84 | + <h3 class="timeline-header"> | ||
| 85 | + <span class="handle ui-sortable-handle"> <i | ||
| 86 | + class="fa fa-ellipsis-v"></i> | ||
| 87 | + </span><a href="#">活动延迟</a> 推迟活动开始或者结束 | ||
| 88 | + </h3> | ||
| 89 | + <div class="timeline-body"> | ||
| 90 | + <div class="form-group"> | ||
| 91 | + <div class="row"> | ||
| 92 | + <div class="col-lg-4"> | ||
| 93 | + <div class="input-group"> | ||
| 94 | + <input type="hidden" name="start_time_hid" | ||
| 95 | + id="start_time_hid" | ||
| 96 | + value="<fmt:formatDate value="${tActivity.start_time}" pattern="yyyy-MM-dd HH:mm"/>" /> | ||
| 97 | + <span class="input-group-addon"> 开始时间 </span> <input | ||
| 98 | + type="text" class="form-control form_datetime" | ||
| 99 | + disabled="disabled" name="start_time" id="start_time" | ||
| 100 | + value="<fmt:formatDate value="${tActivity.start_time}" pattern="yyyy-MM-dd HH:mm"/>" /> | ||
| 101 | + </div> | ||
| 102 | + </div> | ||
| 103 | + <div class="col-lg-8"> | ||
| 104 | + <input id="start_range" type="text" name="start_range" | ||
| 105 | + value="" /> | ||
| 106 | + </div> | ||
| 107 | + </div> | ||
| 108 | + </div> | ||
| 109 | + <div class="form-group"> | ||
| 110 | + <div class="row"> | ||
| 111 | + <div class="col-lg-4"> | ||
| 112 | + <div class="input-group"> | ||
| 113 | + <input type="hidden" name="end_time_hid" | ||
| 114 | + id="end_time_hid" | ||
| 115 | + value="<fmt:formatDate value="${tActivity.end_time}" pattern="yyyy-MM-dd HH:mm"/>" /> | ||
| 116 | + <span class="input-group-addon"> 结束时间 </span> <input | ||
| 117 | + type="text" class="form-control form_datetime" | ||
| 118 | + name="end_time" id="end_time" disabled="disabled" | ||
| 119 | + value="<fmt:formatDate value="${tActivity.end_time}" pattern="yyyy-MM-dd HH:mm"/>" /> | ||
| 120 | + </div> | ||
| 121 | + </div> | ||
| 122 | + <div class="col-lg-8"> | ||
| 123 | + <input id="end_range" type="text" name="end_range" | ||
| 124 | + value="" /> | ||
| 125 | + </div> | ||
| 126 | + </div> | ||
| 127 | + </div> | ||
| 128 | + </div> | ||
| 129 | + <div class="timeline-footer"> | ||
| 130 | + <button type="button" id="update_time_btn" | ||
| 131 | + name="update_time_btn" onclick="update_activity_time();" | ||
| 132 | + class="btn btn-warning">执行修改</button> | ||
| 133 | + </div> | ||
| 134 | + </div> | ||
| 135 | + </li> | ||
| 136 | + <li class="time-label"><span class="bg-green"> | ||
| 137 | + step 2 </span></li> | ||
| 138 | + <li> | ||
| 139 | + <div class="timeline-item"> | ||
| 140 | + <h3 class="timeline-header"> | ||
| 141 | + <span class="handle ui-sortable-handle"> <i | ||
| 142 | + class="fa fa-ellipsis-v"></i> | ||
| 143 | + </span><a href="#">提前发布EPG</a> 将会修改以下频道的客户端播出epg信息 | ||
| 144 | + </h3> | ||
| 145 | + <div class="timeline-body"> | ||
| 146 | + <div class="row"> | ||
| 147 | + <c:forEach var="item" items="${vChannels}" | ||
| 148 | + varStatus="stat"> | ||
| 149 | + <div class="col-md-3"> | ||
| 150 | + <div class="info-box bg-red" style="padding: 10px;"> | ||
| 151 | + <span class="info-box-number">${item.name_zh }</span> | ||
| 152 | + <div class="progress"> | ||
| 153 | + <div class="progress-bar" style="width: 100%"></div> | ||
| 154 | + </div> | ||
| 155 | + <span class="progress-description">${item.name_en}</span> | ||
| 156 | + </div> | ||
| 157 | + </div> | ||
| 158 | + </c:forEach> | ||
| 159 | + </div> | ||
| 160 | + </div> | ||
| 161 | + <div class="timeline-footer"> | ||
| 162 | + <button type="button" id="btn_replace_epg" | ||
| 163 | + onclick="replace_epg(${tActivity.id});" | ||
| 164 | + class="btn btn-success">执行替换</button> | ||
| 165 | + </div> | ||
| 166 | + </div> | ||
| 167 | + </li> | ||
| 168 | + <li class="time-label"><span class="bg-blue"> | ||
| 169 | + step 3 </span></li> | ||
| 170 | + <li> | ||
| 171 | + <div class="timeline-item"> | ||
| 172 | + <c:forEach var="item" items="${vChannels}" varStatus="stat"> | ||
| 173 | + <c:if test="${status.count == 1}"> | ||
| 174 | + <h3 class="timeline-header"> | ||
| 175 | + <span class="handle ui-sortable-handle"> <i | ||
| 176 | + class="fa fa-ellipsis-v"></i> | ||
| 177 | + </span><a href="#">启动直播编码器</a> | ||
| 178 | + </h3> | ||
| 179 | + <div class="timeline-body"> | ||
| 180 | + 请登陆服务器 | ||
| 181 | + <code>${item.t_signal_ip}</code> | ||
| 182 | + 后,在导航栏找到编码器 | ||
| 183 | + <code>${item.t_signal_name}</code> | ||
| 184 | + ,点击启动。 | ||
| 185 | + </div> | ||
| 186 | + <div class="timeline-footer"> | ||
| 187 | + <button type="button" | ||
| 188 | + onclick="javascript:window.open('${item.t_signal_admin_url}')" | ||
| 189 | + class="btn btn-primary">登录</button> | ||
| 190 | + </div> | ||
| 191 | + </c:if> | ||
| 192 | + </c:forEach> | ||
| 193 | + </div> | ||
| 194 | + </li> | ||
| 195 | + <li id="view_video"> | ||
| 196 | + <div class="timeline-item"> | ||
| 197 | + <h3 class="timeline-header"> | ||
| 198 | + <span class="handle ui-sortable-handle"> <i | ||
| 199 | + class="fa fa-ellipsis-v"></i> | ||
| 200 | + </span><a href="#">wowza信号测试</a> | ||
| 201 | + </h3> | ||
| 202 | + <div class="timeline-body"> | ||
| 203 | + <c:forEach var="item" items="${vChannels}" | ||
| 204 | + varStatus="stat"> | ||
| 205 | + <div class="col-md-4"> | ||
| 206 | + <div class="box box-warning box-solid"> | ||
| 207 | + <div class="box-header with-border"> | ||
| 208 | + <h3 class="box-title">${item.name_zh}${item.application_name}/${item.stream_name}</h3> | ||
| 209 | + <div class="box-tools pull-right"> | ||
| 210 | + <button class="btn btn-sm" | ||
| 211 | + id="play_button_${item.id}" | ||
| 212 | + onclick="play_(${item.id});">重新载入</button> | ||
| 213 | + </div> | ||
| 214 | + </div> | ||
| 215 | + <div class="box-body"> | ||
| 216 | + <input type="hidden" name="play_url_${item.id}" | ||
| 217 | + id="play_url_${item.id}" | ||
| 218 | + value="${item.publish_url}" /> <span | ||
| 219 | + class="mailbox-attachment-icon has-img" | ||
| 220 | + id="player_span_${item.id}"> <img | ||
| 221 | + src="${BASE}/static/assets/dist/img/photo2.png" | ||
| 222 | + alt="Attachment"> | ||
| 223 | + </span> | ||
| 224 | + </div> | ||
| 225 | + <div class="box-footer"></div> | ||
| 226 | + </div> | ||
| 227 | + </div> | ||
| 228 | + </c:forEach> | ||
| 229 | + </div> | ||
| 230 | + <div class="timeline-footer"> | ||
| 231 | + . | ||
| 232 | + </div> | ||
| 233 | + </div> | ||
| 234 | + </li> | ||
| 235 | + <li class="time-label"><span class="bg-aqua"> | ||
| 236 | + step 4 </span></li> | ||
| 237 | + <li> | ||
| 238 | + <div class="timeline-item"> | ||
| 239 | + <h3 class="timeline-header"> | ||
| 240 | + <span class="handle ui-sortable-handle"> <i | ||
| 241 | + class="fa fa-ellipsis-v"></i> | ||
| 242 | + </span><a href="#">发送push消息</a> | ||
| 243 | + </h3> | ||
| 244 | + <div class="timeline-body">登录消息后台发送push消息</div> | ||
| 245 | + <div class="timeline-footer"> | ||
| 246 | + <button type="button" | ||
| 247 | + onclick="javascript:window.open('http://cnlive.com/CnAdmin/gotoPushCNLiveV5IphoneMsg.action')" | ||
| 248 | + class="btn btn-primary">登录</button> | ||
| 249 | + </div> | ||
| 250 | + </div> | ||
| 251 | + </li> | ||
| 252 | + <li class="time-label"><span class="bg-green"> | ||
| 253 | + step 5 </span></li> | ||
| 254 | + <li> | ||
| 255 | + <div class="timeline-item"> | ||
| 256 | + <h3 class="timeline-header"> | ||
| 257 | + <span class="handle ui-sortable-handle"> <i | ||
| 258 | + class="fa fa-ellipsis-v"></i> | ||
| 259 | + </span><a href="#">切入现场信号</a> | ||
| 260 | + </h3> | ||
| 261 | + <div class="timeline-body"> | ||
| 262 | + <div class="row"> | ||
| 263 | + <div class="col-md-4"> | ||
| 264 | + <button type="button" id="switch_btn" | ||
| 265 | + onclick="do_switch(${tActivity.id});" | ||
| 266 | + style="width: 250px; height: 100px" | ||
| 267 | + class="btn btn-block btn-lg btn-danger">切换信号</button> | ||
| 268 | + </div> | ||
| 269 | + <div class="col-md-4"> | ||
| 270 | + <button type="button" name="ad_btn" | ||
| 271 | + onclick="do_ad(${tActivity.id});" | ||
| 272 | + style="width: 250px; height: 100px" | ||
| 273 | + class="btn btn-block btn-lg btn-warning"> | ||
| 274 | + 紧急垫片<br> <small>(${tDefaultVideo.name})</small> | ||
| 275 | + </button> | ||
| 276 | + </div> | ||
| 277 | + <div class="col-md-4"> | ||
| 278 | + <button type="button" name="reset_btn" | ||
| 279 | + onclick="do_stop(${tActivity.id});" | ||
| 280 | + style="width: 250px; height: 100px" | ||
| 281 | + class="btn btn-block btn-lg btn-info">结束(信号复位)</button> | ||
| 282 | + </div> | ||
| 283 | + </div> | ||
| 284 | + </div> | ||
| 285 | + </div> | ||
| 286 | + </li> | ||
| 287 | + <li><i class="fa fa-clock-o bg-gray"></i></li> | ||
| 288 | + </ul> | ||
| 289 | + </div> | ||
| 290 | + </div> | ||
| 291 | + </li> | ||
| 292 | + <li class="time-label" id="li_zhong"><span class="bg-green">直播中操作流程 | ||
| 293 | + <i class="fa fa-clock-o"></i> <fmt:formatDate | ||
| 294 | + value="${tActivity.start_time}" pattern="HH:mm" />--<fmt:formatDate | ||
| 295 | + value="${tActivity.end_time}" pattern="HH:mm" /> | ||
| 296 | + </span></li> | ||
| 297 | + <li> | ||
| 298 | + <div class="timeline-item"> | ||
| 299 | + <div class="col-md-12"> | ||
| 300 | + <ul class="timeline"> | ||
| 301 | + <li class="time-label"><span class="bg-blue"> | ||
| 302 | + step 1 </span></li> | ||
| 303 | + <li> | ||
| 304 | + <div class="timeline-item"> | ||
| 305 | + <h3 class="timeline-header"> | ||
| 306 | + <span class="handle ui-sortable-handle"> <i | ||
| 307 | + class="fa fa-ellipsis-v"></i> | ||
| 308 | + </span><a href="#">录制回放检查</a> | ||
| 309 | + </h3> | ||
| 310 | + <div class="timeline-body">验证录制文件(MP4)信息</div> | ||
| 311 | + <div class="timeline-footer"> | ||
| 312 | + <p> | ||
| 313 | + <a class="btn btn-primary btn-xs">媒体信息:</a> | ||
| 314 | + </p> | ||
| 315 | + <p> | ||
| 316 | + <a class="btn btn-danger btn-xs">文件大小:3000kB</a> | ||
| 317 | + </p> | ||
| 318 | + </div> | ||
| 319 | + <div class="timeline-footer"> | ||
| 320 | + <button type="button" id="checkfile_btn" | ||
| 321 | + onclick="do_checkfile(${tActivity.id});" | ||
| 322 | + class="btn btn-primary">验证文件</button> | ||
| 323 | + </div> | ||
| 324 | + </div> | ||
| 325 | + </li> | ||
| 326 | + <li class="time-label"><span class="bg-aqua"> | ||
| 327 | + step 2 </span></li> | ||
| 328 | + <li> | ||
| 329 | + <div class="timeline-item"> | ||
| 330 | + <h3 class="timeline-header"> | ||
| 331 | + <span class="handle ui-sortable-handle"> <i | ||
| 332 | + class="fa fa-ellipsis-v"></i> | ||
| 333 | + </span><a href="#">监控直播画面</a> | ||
| 334 | + </h3> | ||
| 335 | + <div class="timeline-body"></div> | ||
| 336 | + <div class="timeline-footer"> | ||
| 337 | + <button type="button" | ||
| 338 | + onclick="to_view();" | ||
| 339 | + class="btn btn-primary">GO</button> | ||
| 340 | + </div> | ||
| 341 | + | ||
| 342 | + </div> | ||
| 343 | + </li> | ||
| 344 | + <li class="time-label"><span class="bg-yellow"> | ||
| 345 | + step 3 </span></li> | ||
| 346 | + <li> | ||
| 347 | + <div class="timeline-item"> | ||
| 348 | + <h3 class="timeline-header"> | ||
| 349 | + <span class="handle ui-sortable-handle"> <i | ||
| 350 | + class="fa fa-ellipsis-v"></i> | ||
| 351 | + </span><a href="#">紧急处理</a> | ||
| 352 | + </h3> | ||
| 353 | + <div class="timeline-body"> | ||
| 354 | + <div class="row"> | ||
| 355 | + <div class="col-md-4"> | ||
| 356 | + <button type="button" name="ad_btn" | ||
| 357 | + onclick="do_ad(${tActivity.id});" | ||
| 358 | + style="width: 250px; height: 100px" | ||
| 359 | + class="btn btn-block btn-lg btn-warning"> | ||
| 360 | + 紧急垫片<br> <small>(${tDefaultVideo.name})</small> | ||
| 361 | + </button> | ||
| 362 | + </div> | ||
| 363 | + <div class="col-md-4"> | ||
| 364 | + <button type="button" name="reset_btn" | ||
| 365 | + onclick="do_stop(${tActivity.id});" | ||
| 366 | + style="width: 250px; height: 100px" | ||
| 367 | + class="btn btn-block btn-lg btn-info">结束(信号复位)</button> | ||
| 368 | + </div> | ||
| 369 | + </div> | ||
| 370 | + </div> | ||
| 371 | + </div> | ||
| 372 | + </li> | ||
| 373 | + </ul> | ||
| 374 | + </div> | ||
| 375 | + </div> | ||
| 376 | + </li> | ||
| 377 | + <li class="time-label" id="li_hou"><span class="bg-yellow">直播后操作流程<i | ||
| 378 | + class="fa fa-clock-o"></i> 21:30 之后 | ||
| 379 | + </span></li> | ||
| 380 | + <li> | ||
| 381 | + <div class="timeline-item"> | ||
| 382 | + <div class="col-md-12"> | ||
| 383 | + <ul class="timeline"> | ||
| 384 | + <li class="time-label"><span class="bg-blue"> | ||
| 385 | + step 1 </span></li> | ||
| 386 | + <li> | ||
| 387 | + <div class="timeline-item"> | ||
| 388 | + <span class="time"> <small | ||
| 389 | + class="label label-warning" style="display: none" | ||
| 390 | + id="info_tab_span"><i class="fa fa-bell-o"></i>复位成功</small></span> | ||
| 391 | + <h3 class="timeline-header"> | ||
| 392 | + <span class="handle ui-sortable-handle"> <i | ||
| 393 | + class="fa fa-ellipsis-v"></i> | ||
| 394 | + </span><a href="#">直播信号复位</a> | ||
| 395 | + </h3> | ||
| 396 | + <div class="timeline-body"> | ||
| 397 | + 将以下频道信号恢复至默认信号: | ||
| 398 | + <c:forEach var="item" items="${vChannels}" | ||
| 399 | + varStatus="stat"> | ||
| 400 | + <code>${item.name_zh}</code>、 | ||
| 401 | + </c:forEach> | ||
| 402 | + </div> | ||
| 403 | + <div class="timeline-footer"> | ||
| 404 | + <button type="button" name="reset_btn" | ||
| 405 | + onclick="do_stop(${tActivity.id});" | ||
| 406 | + class="btn btn-danger">结束(信号复位)</button> | ||
| 407 | + </div> | ||
| 408 | + </div> | ||
| 409 | + </li> | ||
| 410 | + <li class="time-label"><span class="bg-aqua"> | ||
| 411 | + step 2 </span></li> | ||
| 412 | + <li> | ||
| 413 | + <div class="timeline-item"> | ||
| 414 | + <h3 class="timeline-header"> | ||
| 415 | + <span class="handle ui-sortable-handle"> <i | ||
| 416 | + class="fa fa-ellipsis-v"></i> | ||
| 417 | + </span><a href="#">录制回放检查</a> | ||
| 418 | + </h3> | ||
| 419 | + <div class="timeline-body"> | ||
| 420 | + <p> | ||
| 421 | + <a class="btn btn-primary btn-xs">媒体信息:</a> | ||
| 422 | + </p> | ||
| 423 | + <p> | ||
| 424 | + <a class="btn btn-danger btn-xs">文件大小:3000kB</a> | ||
| 425 | + </p> | ||
| 426 | + </div> | ||
| 427 | + <div class="timeline-footer"> | ||
| 428 | + <button type="button" id="checkfile_btn" | ||
| 429 | + onclick="do_checkfile(${tActivity.id});" | ||
| 430 | + class="btn btn-primary">验证文件</button> | ||
| 431 | + </div> | ||
| 432 | + </div> | ||
| 433 | + </li> | ||
| 434 | + <li class="time-label"><span class="bg-yellow"> | ||
| 435 | + step 3 </span></li> | ||
| 436 | + <li> | ||
| 437 | + <div class="timeline-item"> | ||
| 438 | + <h3 class="timeline-header"> | ||
| 439 | + <a href="#">推荐位下线</a> | ||
| 440 | + </h3> | ||
| 441 | + <div class="timeline-body">由此登录cms系统下线当前活动推荐位</div> | ||
| 442 | + <div class="timeline-footer"> | ||
| 443 | + <button type="button" onclick="javascript:window.open()" | ||
| 444 | + class="btn btn-warning">登录</button> | ||
| 445 | + </div> | ||
| 446 | + </div> | ||
| 447 | + </li> | ||
| 448 | + <li class="time-label"><span class="bg-green"> | ||
| 449 | + step 4 </span></li> | ||
| 450 | + <li> | ||
| 451 | + <div class="timeline-item"> | ||
| 452 | + <h3 class="timeline-header"> | ||
| 453 | + <span class="handle ui-sortable-handle"> <i | ||
| 454 | + class="fa fa-ellipsis-v"></i> | ||
| 455 | + </span><a href="#">发布直播回放</a> | ||
| 456 | + </h3> | ||
| 457 | + <div class="timeline-body"> | ||
| 458 | + <p> | ||
| 459 | + 登录媒资系统发布: | ||
| 460 | + <code> | ||
| 461 | + <a target="_blank" href="http://mz.cnlive.com/base/live">http://mz.cnlive.com/base/live</a> | ||
| 462 | + </code> | ||
| 463 | + </p> | ||
| 464 | + <table class="table table-bordered"> | ||
| 465 | + <tr> | ||
| 466 | + <td>当前同步状态:</td> | ||
| 467 | + <td><span class="class label-danger">同步中</span></td> | ||
| 468 | + </tr> | ||
| 469 | + <tr> | ||
| 470 | + <td width="15%">回放视频地址:</td> | ||
| 471 | + <td | ||
| 472 | + style="word-break: break-all; word-wrap: break-word;" | ||
| 473 | + width="85%">${tActivity.playbak_url}</td> | ||
| 474 | + </tr> | ||
| 475 | + </table> | ||
| 476 | + </div> | ||
| 477 | + <div class="timeline-footer"> | ||
| 478 | + <button type="button" | ||
| 479 | + onclick="javascript:window.open('http://mz.cnlive.com/base/live')" | ||
| 480 | + class="btn btn-success">登录</button> | ||
| 481 | + </div> | ||
| 482 | + </div> | ||
| 483 | + </li> | ||
| 484 | + <li><i class="fa fa-clock-o bg-gray"></i></li> | ||
| 485 | + </ul> | ||
| 486 | + </div> | ||
| 487 | + </div> | ||
| 488 | + </li> | ||
| 489 | + <li><i class="fa fa-clock-o bg-gray"></i></li> | ||
| 490 | + </ul> | ||
| 491 | + </div> | ||
| 492 | + </div> | ||
| 493 | + </section> | ||
| 494 | + </div> | ||
| 495 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 496 | + </div> | ||
| 497 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 498 | + <script | ||
| 499 | + src="${BASE}/static/assets/plugins/countdown/countdown/jquery.countdown.js"></script> | ||
| 500 | + <script src="${BASE}/static/assets/cnlive/js/player_4.js"></script> | ||
| 501 | + | ||
| 502 | + <!-- Ion Slider --> | ||
| 503 | + <script | ||
| 504 | + src="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.min.js" | ||
| 505 | + type="text/javascript"></script> | ||
| 506 | + | ||
| 507 | + <!-- Bootstrap slider --> | ||
| 508 | + <script | ||
| 509 | + src="${BASE}/static/assets/plugins/bootstrap-slider/bootstrap-slider.js" | ||
| 510 | + type="text/javascript"></script> | ||
| 511 | + | ||
| 512 | + <script type="text/javascript"> | ||
| 513 | +//锚点定位 | ||
| 514 | +var date = new Date(); | ||
| 515 | +var year = date.getFullYear(); | ||
| 516 | +var month = date.getMonth()+1; | ||
| 517 | +var day = date.getDate(); | ||
| 518 | +var hour = date.getHours(); | ||
| 519 | +var minute = date.getMinutes(); | ||
| 520 | +var second = date.getSeconds(); | ||
| 521 | +var currentTime=year+'/'+month+'/'+day+' '+hour+':'+minute; | ||
| 522 | +var nhour=hour+2; | ||
| 523 | +var nextTime=year+'/'+month+'/'+day+' '+nhour+':'+minute; | ||
| 524 | +var startTime=$("#startTime").val(); | ||
| 525 | +var endTime=$("#endTime").val(); | ||
| 526 | +var next=new Date(nextTime); | ||
| 527 | +var current=new Date(currentTime); | ||
| 528 | +var start=new Date(startTime); | ||
| 529 | +var end=new Date(endTime); | ||
| 530 | +if(current<start){ | ||
| 531 | + $("html,body").animate({scrollTop:$("#li_qian").offset().top},800) | ||
| 532 | +} | ||
| 533 | +if(current>start&¤t<end){ | ||
| 534 | + $("html,body").animate({scrollTop:$("#li_zhong").offset().top},800) | ||
| 535 | +} | ||
| 536 | +if(current<next&¤t>end){ | ||
| 537 | + $("html,body").animate({scrollTop:$("#li_hou").offset().top},800) | ||
| 538 | +} | ||
| 539 | +if(current>next){ | ||
| 540 | + $("html,body").animate({scrollTop:$("#li_qian").offset().top},800) | ||
| 541 | +} | ||
| 542 | + | ||
| 543 | +function to_view(){ | ||
| 544 | + $("html,body").animate({scrollTop:$("#view_video").offset().top},800) | ||
| 545 | +} | ||
| 546 | + | ||
| 547 | + $(function(){ | ||
| 548 | + | ||
| 549 | + var hid_s=$("#start_time_hid").val(); | ||
| 550 | + var time = new Date(hid_s.replace("-", "/")); | ||
| 551 | + var note = $('#note'), | ||
| 552 | + ts = new Date(2012, 0, 1), | ||
| 553 | + newYear = true; | ||
| 554 | + if((new Date()) > ts){ | ||
| 555 | + ts = time.getTime(); | ||
| 556 | + newYear = false; | ||
| 557 | + } | ||
| 558 | + console.log(time.getTime()); | ||
| 559 | + $('#countdown').countdown({ | ||
| 560 | + timestamp : ts, | ||
| 561 | + callback : function(days, hours, minutes, seconds){ | ||
| 562 | + var message = ""; | ||
| 563 | + message += days + " day" + ( days==1 ? '':'s' ) + ", "; | ||
| 564 | + message += hours + " hour" + ( hours==1 ? '':'s' ) + ", "; | ||
| 565 | + message += minutes + " minute" + ( minutes==1 ? '':'s' ) + " and "; | ||
| 566 | + message += seconds + " second" + ( seconds==1 ? '':'s' ) + " <br />"; | ||
| 567 | + if(newYear){ | ||
| 568 | + message += "left until the new year!"; | ||
| 569 | + } | ||
| 570 | + else { | ||
| 571 | + message += "left to 10 days from now!"; | ||
| 572 | + } | ||
| 573 | + note.html(message); | ||
| 574 | + } | ||
| 575 | + }); | ||
| 576 | + }); | ||
| 577 | + | ||
| 578 | + | ||
| 579 | + | ||
| 580 | + function fail_start_time(t) { | ||
| 581 | + var hid_s=$("#start_time_hid").val(); | ||
| 582 | + var time = new Date(hid_s.replace("-", "/")); | ||
| 583 | + time.setMinutes(time.getMinutes() + t, time.getSeconds(), 0); | ||
| 584 | + $("#start_time").val(time.format("yyyy-MM-dd hh:mm")); | ||
| 585 | + } | ||
| 586 | + | ||
| 587 | + function fail_end_time(t) { | ||
| 588 | + var hid_e=$("#end_time_hid").val(); | ||
| 589 | + var time = new Date(hid_e.replace("-", "/")); | ||
| 590 | + time.setMinutes(time.getMinutes() + t, time.getSeconds(), 0); | ||
| 591 | + $("#end_time").val(time.format("yyyy-MM-dd hh:mm")); | ||
| 592 | + } | ||
| 593 | + | ||
| 594 | + $(function () { | ||
| 595 | + /* BOOTSTRAP SLIDER */ | ||
| 596 | + $('.slider').slider(); | ||
| 597 | + $("#process_bar").ionRangeSlider({ | ||
| 598 | + min: 0, | ||
| 599 | + max: 100, | ||
| 600 | + from: 0, | ||
| 601 | + type: 'single', | ||
| 602 | + step: 1, | ||
| 603 | + postfix: "", | ||
| 604 | + prettify: false, | ||
| 605 | + hasGrid: true, | ||
| 606 | + onChange: function (obj) { | ||
| 607 | + var t =obj.fromNumber; | ||
| 608 | + fail_start_time(t); | ||
| 609 | + } | ||
| 610 | + }); | ||
| 611 | + | ||
| 612 | + | ||
| 613 | + $("#start_range").ionRangeSlider({ | ||
| 614 | + min: -50, | ||
| 615 | + max: 50, | ||
| 616 | + from: 0, | ||
| 617 | + type: 'single', | ||
| 618 | + step: 1, | ||
| 619 | + postfix: "<i class=\"fa fa-clock-o\"></i>", | ||
| 620 | + prettify: false, | ||
| 621 | + hasGrid: true, | ||
| 622 | + onChange: function (obj) { | ||
| 623 | + var t =obj.fromNumber; | ||
| 624 | + fail_start_time(t); | ||
| 625 | + } | ||
| 626 | + }); | ||
| 627 | + | ||
| 628 | + $("#end_range").ionRangeSlider({ | ||
| 629 | + min: -50, | ||
| 630 | + max: 50, | ||
| 631 | + from: 0, | ||
| 632 | + type: 'single', | ||
| 633 | + step: 1, | ||
| 634 | + postfix: "<i class=\"fa fa-clock-o\"></i>", | ||
| 635 | + prettify: false, | ||
| 636 | + hasGrid: true, | ||
| 637 | + onChange: function (obj) { | ||
| 638 | + console.log(obj.fromNumber); | ||
| 639 | + var t =obj.fromNumber; | ||
| 640 | + fail_end_time(t); | ||
| 641 | + }, | ||
| 642 | + }); | ||
| 643 | + | ||
| 644 | + }); | ||
| 645 | + </script> | ||
| 646 | +</body> | ||
| 647 | +</html> |
src/main/webapp/pages/activity/activity_step_after.jsp
0 → 100644
| 1 | +++ a/src/main/webapp/pages/activity/activity_step_after.jsp | ||
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>直播后管理 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +<link rel="stylesheet" | ||
| 13 | + href="${BASE}/static/assets/plugins/countdown/countdown/jquery.countdown.css" /> | ||
| 14 | +<!-- Ion Slider --> | ||
| 15 | +<link href="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.css" | ||
| 16 | + rel="stylesheet" type="text/css" /> | ||
| 17 | +<!-- ion slider Nice --> | ||
| 18 | +<link | ||
| 19 | + href="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.skinNice.css" | ||
| 20 | + rel="stylesheet" type="text/css" /> | ||
| 21 | +<!-- bootstrap slider --> | ||
| 22 | +<link href="${BASE}/static/assets/plugins/bootstrap-slider/slider.css" | ||
| 23 | + rel="stylesheet" type="text/css" /> | ||
| 24 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.js"></script> | ||
| 25 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.html5.js"></script> | ||
| 26 | +<script type="text/javascript">jwplayer.key="MGAzpXRYxGnaVXhH8jSdKXzDe7ucAAvZGWggIA==";</script> | ||
| 27 | + | ||
| 28 | +</head> | ||
| 29 | +<body class="skin-blue fixed "> | ||
| 30 | + <div class="wrapper"> | ||
| 31 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 32 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 33 | + <div class="content-wrapper"> | ||
| 34 | + <section class="content-header"> | ||
| 35 | + <h1> | ||
| 36 | + 直播活动详情 <small>${tActivity.name}</small> <input type="hidden" | ||
| 37 | + name="activity_id" id="activity_id" value="${tActivity.id}" /> <small | ||
| 38 | + class="label label-warning" style="display: none" | ||
| 39 | + id="info_tab_span"><i class="fa fa-bell-o"></i>保存成功</small> | ||
| 40 | + </h1> | ||
| 41 | + <ol class="breadcrumb"> | ||
| 42 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 43 | + <li><a href="${BASE}/activity/list/1">活动管理</a></li> | ||
| 44 | + <li class="active">活动步骤</li> | ||
| 45 | + </ol> | ||
| 46 | + </section> | ||
| 47 | + <section class="content"> | ||
| 48 | + <div class="row"> | ||
| 49 | + <div class="box box-danger"> | ||
| 50 | + <div class="box-header"> | ||
| 51 | + <h3 class="box-title">直播倒计时:</h3> | ||
| 52 | + </div> | ||
| 53 | + <div class="box-body"> | ||
| 54 | + <div class="row"> | ||
| 55 | + <div class="col-xs-6"> | ||
| 56 | + <div class="form-group has-warning"> | ||
| 57 | + <label class="control-label" for="inputWarning"> <i | ||
| 58 | + class="fa fa-bell-o"></i> 提示:请根据直播操作流程严格执行以下任务流程! <input | ||
| 59 | + type="hidden" name="start_time_hid" id="start_time_hid" | ||
| 60 | + value="<fmt:formatDate value="${tActivity.start_time}" pattern="yyyy-MM-dd HH:mm"/>" /> | ||
| 61 | + | ||
| 62 | + </label> | ||
| 63 | + </div> | ||
| 64 | + </div> | ||
| 65 | + <div class="col-xs-6" id="countdown"></div> | ||
| 66 | + <p id="note" style="display: none"></p> | ||
| 67 | + </div> | ||
| 68 | + </div> | ||
| 69 | + </div> | ||
| 70 | + </div> | ||
| 71 | + <div class="row"> | ||
| 72 | + <div class="col-md-12"> | ||
| 73 | + <ul class="timeline"> | ||
| 74 | + <li class="time-label"><span class="bg-blue"> step 1 | ||
| 75 | + </span></li> | ||
| 76 | + <li> | ||
| 77 | + <div class="timeline-item"> | ||
| 78 | + <span class="time"> <small class="label label-warning" | ||
| 79 | + style="display: none" id="info_tab_span"><i | ||
| 80 | + class="fa fa-bell-o"></i>复位成功</small></span> | ||
| 81 | + <h3 class="timeline-header"> | ||
| 82 | + <span class="handle ui-sortable-handle"> <i | ||
| 83 | + class="fa fa-ellipsis-v"></i> | ||
| 84 | + </span><a href="#">直播信号复位</a>将以下频道信号恢复至默认信号: | ||
| 85 | + <c:forEach var="item" items="${vChannels}" varStatus="stat"> | ||
| 86 | + <code>${item.name_zh}</code>、 | ||
| 87 | + </c:forEach> | ||
| 88 | + </h3> | ||
| 89 | + <div class="timeline-body"> | ||
| 90 | + <div class="row"> | ||
| 91 | + <div class="col-md-4"> | ||
| 92 | + <c:if test="${tActivity.state==0}"> | ||
| 93 | + <button type="button" style="width: 250px; height: 100px" disabled="disabled" | ||
| 94 | + class="btn btn-block btn-lg btn-warning">直播未开始</button> | ||
| 95 | + </c:if> | ||
| 96 | + <c:if test="${tActivity.state==1}"> | ||
| 97 | + <button type="button" id="reset_btn" | ||
| 98 | + style="width: 250px; height: 100px" | ||
| 99 | + class="btn btn-block btn-lg btn-danger" | ||
| 100 | + onclick="do_stop(${tActivity.id});">结束(信号复位)</button> | ||
| 101 | + </c:if> | ||
| 102 | + <c:if test="${tActivity.state==3}"> | ||
| 103 | + <button type="button" style="width: 250px; height: 100px" disabled="disabled" | ||
| 104 | + class="btn btn-block btn-lg btn-warning">视频同步中。。。</button> | ||
| 105 | + </c:if> | ||
| 106 | + <c:if test="${tActivity.state==4}"> | ||
| 107 | + <button type="button" style="width: 250px; height: 100px" disabled="disabled" | ||
| 108 | + class="btn btn-block btn-lg btn-warning">同步完成</button> | ||
| 109 | + </c:if> | ||
| 110 | + <c:if test="${tActivity.state==2}"> | ||
| 111 | + <button type="button" id="publishreview_btn" | ||
| 112 | + style="width: 250px; height: 100px" disabled="disabled" | ||
| 113 | + class="btn btn-block btn-lg btn-warning">直播已结束</button> | ||
| 114 | + </c:if> | ||
| 115 | + </div> | ||
| 116 | + <div class="col-md-4"></div> | ||
| 117 | + </div> | ||
| 118 | + </div> | ||
| 119 | + <div class="timeline-footer"></div> | ||
| 120 | + </div> | ||
| 121 | + </li> | ||
| 122 | + <li class="time-label"><span class="bg-aqua"> step 2 | ||
| 123 | + </span></li> | ||
| 124 | + <li> | ||
| 125 | + <div class="timeline-item"> | ||
| 126 | + <h3 class="timeline-header"> | ||
| 127 | + <span class="handle ui-sortable-handle"> <i | ||
| 128 | + class="fa fa-ellipsis-v"></i> | ||
| 129 | + </span><a href="#">录制回放检查</a> | ||
| 130 | + </h3> | ||
| 131 | + <div class="timeline-body" id="mp4_info"></div> | ||
| 132 | + <div class="timeline-footer"> | ||
| 133 | + <button type="button" id="checkfile_btn" | ||
| 134 | + onclick="do_checkfile(${tActivity.id});" | ||
| 135 | + class="btn btn-primary">验证文件</button> | ||
| 136 | + </div> | ||
| 137 | + </div> | ||
| 138 | + </li> | ||
| 139 | + <li class="time-label"><span class="bg-green"> step 3 | ||
| 140 | + </span></li> | ||
| 141 | + <li> | ||
| 142 | + <div class="timeline-item"> | ||
| 143 | + <h3 class="timeline-header"> | ||
| 144 | + <span class="handle ui-sortable-handle"> <i | ||
| 145 | + class="fa fa-ellipsis-v"></i> | ||
| 146 | + </span><a href="#">发布直播回放</a> | ||
| 147 | + </h3> | ||
| 148 | + <div class="timeline-body"> | ||
| 149 | + <div class="row"> | ||
| 150 | + <div class="col-md-4" id="publish_div"> | ||
| 151 | + <c:if test="${tActivity.state==0}"> | ||
| 152 | + 直播未开始 | ||
| 153 | + </c:if> | ||
| 154 | + <c:if test="${tActivity.state==1}"> | ||
| 155 | + 直播中。。 | ||
| 156 | + </c:if> | ||
| 157 | + <c:if test="${tActivity.state==3}"> | ||
| 158 | + 视频同步中。。。 | ||
| 159 | + </c:if> | ||
| 160 | + <c:if test="${tActivity.state==4||tActivity.state==2}"> | ||
| 161 | + <button type="button" id="publishreview_btn" | ||
| 162 | + style="width: 250px; height: 100px" | ||
| 163 | + class="btn btn-block btn-lg btn-warning" | ||
| 164 | + onclick="do_publishreview(${tActivity.id});" | ||
| 165 | + class="btn btn-warning">发布直播回放</button> | ||
| 166 | + </c:if> | ||
| 167 | + </div> | ||
| 168 | + <div class="col-md-4"></div> | ||
| 169 | + </div> | ||
| 170 | + </div> | ||
| 171 | + <div class="timeline-footer"></div> | ||
| 172 | + </div> | ||
| 173 | + </li> | ||
| 174 | + <li><i class="fa fa-clock-o bg-gray"></i></li> | ||
| 175 | + </ul> | ||
| 176 | + </div> | ||
| 177 | + </div> | ||
| 178 | + </div> | ||
| 179 | + </section> | ||
| 180 | + </div> | ||
| 181 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 182 | + </div> | ||
| 183 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 184 | + <script | ||
| 185 | + src="${BASE}/static/assets/plugins/countdown/countdown/jquery.countdown.js"></script> | ||
| 186 | + <script src="${BASE}/static/assets/cnlive/js/player_4.js"></script> | ||
| 187 | + | ||
| 188 | + <!-- Ion Slider --> | ||
| 189 | + <script | ||
| 190 | + src="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.min.js" | ||
| 191 | + type="text/javascript"></script> | ||
| 192 | + | ||
| 193 | + <!-- Bootstrap slider --> | ||
| 194 | + <script | ||
| 195 | + src="${BASE}/static/assets/plugins/bootstrap-slider/bootstrap-slider.js" | ||
| 196 | + type="text/javascript"></script> | ||
| 197 | + | ||
| 198 | + <script type="text/javascript"> | ||
| 199 | +//锚点定位 | ||
| 200 | +var date = new Date(); | ||
| 201 | +var year = date.getFullYear(); | ||
| 202 | +var month = date.getMonth()+1; | ||
| 203 | +var day = date.getDate(); | ||
| 204 | +var hour = date.getHours(); | ||
| 205 | +var minute = date.getMinutes(); | ||
| 206 | +var second = date.getSeconds(); | ||
| 207 | +var currentTime=year+'/'+month+'/'+day+' '+hour+':'+minute; | ||
| 208 | +var nhour=hour+2; | ||
| 209 | +var nextTime=year+'/'+month+'/'+day+' '+nhour+':'+minute; | ||
| 210 | +var startTime=$("#startTime").val(); | ||
| 211 | +var endTime=$("#endTime").val(); | ||
| 212 | +var next=new Date(nextTime); | ||
| 213 | +var current=new Date(currentTime); | ||
| 214 | +var start=new Date(startTime); | ||
| 215 | +var end=new Date(endTime); | ||
| 216 | +if(current<start){ | ||
| 217 | + $("html,body").animate({scrollTop:$("#li_qian").offset().top},800) | ||
| 218 | +} | ||
| 219 | +if(current>start&¤t<end){ | ||
| 220 | + $("html,body").animate({scrollTop:$("#li_zhong").offset().top},800) | ||
| 221 | +} | ||
| 222 | +if(current<next&¤t>end){ | ||
| 223 | + $("html,body").animate({scrollTop:$("#li_hou").offset().top},800) | ||
| 224 | +} | ||
| 225 | +if(current>next){ | ||
| 226 | + $("html,body").animate({scrollTop:$("#li_qian").offset().top},800) | ||
| 227 | +} | ||
| 228 | + | ||
| 229 | +function to_view(){ | ||
| 230 | + $("html,body").animate({scrollTop:$("#view_video").offset().top},800) | ||
| 231 | +} | ||
| 232 | + | ||
| 233 | + $(function(){ | ||
| 234 | + | ||
| 235 | + var hid_s=$("#start_time_hid").val(); | ||
| 236 | + var time = new Date(hid_s.replace("-", "/")); | ||
| 237 | + var note = $('#note'), | ||
| 238 | + ts = new Date(2012, 0, 1), | ||
| 239 | + newYear = true; | ||
| 240 | + if((new Date()) > ts){ | ||
| 241 | + ts = time.getTime(); | ||
| 242 | + newYear = false; | ||
| 243 | + } | ||
| 244 | + console.log(time.getTime()); | ||
| 245 | + $('#countdown').countdown({ | ||
| 246 | + timestamp : ts, | ||
| 247 | + callback : function(days, hours, minutes, seconds){ | ||
| 248 | + var message = ""; | ||
| 249 | + message += days + " day" + ( days==1 ? '':'s' ) + ", "; | ||
| 250 | + message += hours + " hour" + ( hours==1 ? '':'s' ) + ", "; | ||
| 251 | + message += minutes + " minute" + ( minutes==1 ? '':'s' ) + " and "; | ||
| 252 | + message += seconds + " second" + ( seconds==1 ? '':'s' ) + " <br />"; | ||
| 253 | + if(newYear){ | ||
| 254 | + message += "left until the new year!"; | ||
| 255 | + } | ||
| 256 | + else { | ||
| 257 | + message += "left to 10 days from now!"; | ||
| 258 | + } | ||
| 259 | + note.html(message); | ||
| 260 | + } | ||
| 261 | + }); | ||
| 262 | + }); | ||
| 263 | + | ||
| 264 | + | ||
| 265 | + | ||
| 266 | + function fail_start_time(t) { | ||
| 267 | + var hid_s=$("#start_time_hid").val(); | ||
| 268 | + var time = new Date(hid_s.replace("-", "/")); | ||
| 269 | + time.setMinutes(time.getMinutes() + t, time.getSeconds(), 0); | ||
| 270 | + $("#start_time").val(time.format("yyyy-MM-dd hh:mm")); | ||
| 271 | + } | ||
| 272 | + | ||
| 273 | + function fail_end_time(t) { | ||
| 274 | + var hid_e=$("#end_time_hid").val(); | ||
| 275 | + var time = new Date(hid_e.replace("-", "/")); | ||
| 276 | + time.setMinutes(time.getMinutes() + t, time.getSeconds(), 0); | ||
| 277 | + $("#end_time").val(time.format("yyyy-MM-dd hh:mm")); | ||
| 278 | + } | ||
| 279 | + | ||
| 280 | + $(function () { | ||
| 281 | + /* BOOTSTRAP SLIDER */ | ||
| 282 | + $('.slider').slider(); | ||
| 283 | + $("#process_bar").ionRangeSlider({ | ||
| 284 | + min: 0, | ||
| 285 | + max: 100, | ||
| 286 | + from: 0, | ||
| 287 | + type: 'single', | ||
| 288 | + step: 1, | ||
| 289 | + postfix: "", | ||
| 290 | + prettify: false, | ||
| 291 | + hasGrid: true, | ||
| 292 | + onChange: function (obj) { | ||
| 293 | + var t =obj.fromNumber; | ||
| 294 | + fail_start_time(t); | ||
| 295 | + } | ||
| 296 | + }); | ||
| 297 | + | ||
| 298 | + | ||
| 299 | + $("#start_range").ionRangeSlider({ | ||
| 300 | + min: -50, | ||
| 301 | + max: 50, | ||
| 302 | + from: 0, | ||
| 303 | + type: 'single', | ||
| 304 | + step: 1, | ||
| 305 | + postfix: "<i class=\"fa fa-clock-o\"></i>", | ||
| 306 | + prettify: false, | ||
| 307 | + hasGrid: true, | ||
| 308 | + onChange: function (obj) { | ||
| 309 | + var t =obj.fromNumber; | ||
| 310 | + fail_start_time(t); | ||
| 311 | + } | ||
| 312 | + }); | ||
| 313 | + | ||
| 314 | + $("#end_range").ionRangeSlider({ | ||
| 315 | + min: -50, | ||
| 316 | + max: 50, | ||
| 317 | + from: 0, | ||
| 318 | + type: 'single', | ||
| 319 | + step: 1, | ||
| 320 | + postfix: "<i class=\"fa fa-clock-o\"></i>", | ||
| 321 | + prettify: false, | ||
| 322 | + hasGrid: true, | ||
| 323 | + onChange: function (obj) { | ||
| 324 | + console.log(obj.fromNumber); | ||
| 325 | + var t =obj.fromNumber; | ||
| 326 | + fail_end_time(t); | ||
| 327 | + }, | ||
| 328 | + }); | ||
| 329 | + | ||
| 330 | + }); | ||
| 331 | + </script> | ||
| 332 | +</body> | ||
| 333 | +</html> |
src/main/webapp/pages/activity/activity_step_before.jsp
0 → 100644
| 1 | +++ a/src/main/webapp/pages/activity/activity_step_before.jsp | ||
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>直播前操作 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +<link rel="stylesheet" | ||
| 13 | + href="${BASE}/static/assets/plugins/countdown/countdown/jquery.countdown.css" /> | ||
| 14 | +<!-- Ion Slider --> | ||
| 15 | +<link href="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.css" | ||
| 16 | + rel="stylesheet" type="text/css" /> | ||
| 17 | +<!-- ion slider Nice --> | ||
| 18 | +<link | ||
| 19 | + href="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.skinNice.css" | ||
| 20 | + rel="stylesheet" type="text/css" /> | ||
| 21 | +<!-- bootstrap slider --> | ||
| 22 | +<link href="${BASE}/static/assets/plugins/bootstrap-slider/slider.css" | ||
| 23 | + rel="stylesheet" type="text/css" /> | ||
| 24 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.js"></script> | ||
| 25 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.html5.js"></script> | ||
| 26 | +<script type="text/javascript">jwplayer.key="MGAzpXRYxGnaVXhH8jSdKXzDe7ucAAvZGWggIA==";</script> | ||
| 27 | +<link | ||
| 28 | + href="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/css/datetimepicker.css" | ||
| 29 | + rel="stylesheet"> | ||
| 30 | +</head> | ||
| 31 | +<body class="skin-blue fixed "> | ||
| 32 | + <div class="wrapper"> | ||
| 33 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 34 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 35 | + <div class="content-wrapper"> | ||
| 36 | + <section class="content-header"> | ||
| 37 | + <h1> | ||
| 38 | + 直播活动详情 <small>${tActivity.name}</small> <input type="hidden" | ||
| 39 | + name="activity_id" id="activity_id" value="${tActivity.id}" /> <small | ||
| 40 | + class="label label-warning" style="display: none" | ||
| 41 | + id="info_tab_span"><i class="fa fa-bell-o"></i>保存成功</small> | ||
| 42 | + </h1> | ||
| 43 | + <ol class="breadcrumb"> | ||
| 44 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 45 | + <li><a href="${BASE}/activity/list/1">活动管理</a></li> | ||
| 46 | + <li class="active">活动步骤</li> | ||
| 47 | + </ol> | ||
| 48 | + </section> | ||
| 49 | + <section class="content"> | ||
| 50 | + <div class="row"> | ||
| 51 | + <div class="box box-danger"> | ||
| 52 | + <div class="box-header"> | ||
| 53 | + <h3 class="box-title">直播倒计时:</h3> | ||
| 54 | + </div> | ||
| 55 | + <div class="box-body"> | ||
| 56 | + <div class="row"> | ||
| 57 | + <div class="col-xs-6"> | ||
| 58 | + <div class="form-group has-warning"> | ||
| 59 | + <label class="control-label" for="inputWarning"> <i | ||
| 60 | + class="fa fa-bell-o"></i> 提示:请根据直播操作流程严格执行以下任务流程! | ||
| 61 | + </label> | ||
| 62 | + </div> | ||
| 63 | + </div> | ||
| 64 | + <div class="col-xs-6" id="countdown"></div> | ||
| 65 | + <p id="note" style="display: none"></p> | ||
| 66 | + </div> | ||
| 67 | + </div> | ||
| 68 | + </div> | ||
| 69 | + </div> | ||
| 70 | + <div class="row"> | ||
| 71 | + <div class="col-md-12"> | ||
| 72 | + <div class="timeline-item"> | ||
| 73 | + <div class="col-md-12"> | ||
| 74 | + <ul class="timeline"> | ||
| 75 | + <li class="time-label"><span class="bg-green"> step | ||
| 76 | + 1 </span></li> | ||
| 77 | + <li> | ||
| 78 | + <div class="timeline-item"> | ||
| 79 | + <span class="time"> | ||
| 80 | + <button onclick="show_time_div();" | ||
| 81 | + class="btn btn-info btn-sm">修改播出时间</button> | ||
| 82 | + </span> | ||
| 83 | + <h3 class="timeline-header"> | ||
| 84 | + <span class="handle ui-sortable-handle"> <i | ||
| 85 | + class="fa fa-ellipsis-v"></i> | ||
| 86 | + </span><a href="#">提前发布EPG</a> 将会修改以下频道的客户端播出epg信息 | ||
| 87 | + </h3> | ||
| 88 | + <div class="timeline-body"> | ||
| 89 | + <div class="row"> | ||
| 90 | + <c:forEach var="item" items="${vChannels}" varStatus="stat"> | ||
| 91 | + <div class="col-md-3"> | ||
| 92 | + <div class="info-box bg-red" style="padding: 10px;"> | ||
| 93 | + <span class="info-box-number">${item.name_zh }</span> | ||
| 94 | + <div class="progress"> | ||
| 95 | + <div class="progress-bar" style="width: 100%"></div> | ||
| 96 | + </div> | ||
| 97 | + <span class="progress-description">${item.name_en}</span> | ||
| 98 | + </div> | ||
| 99 | + </div> | ||
| 100 | + </c:forEach> | ||
| 101 | + </div> | ||
| 102 | + </div> | ||
| 103 | + <div class="timeline-footer"> | ||
| 104 | + <button type="button" id="btn_replace_epg" | ||
| 105 | + onclick="replace_epg(${tActivity.id});" | ||
| 106 | + class="btn btn-success">执行替换</button> | ||
| 107 | + </div> | ||
| 108 | + </div> | ||
| 109 | + </li> | ||
| 110 | + <li id="eidt_time_li" style="display: none"> | ||
| 111 | + <ul class="timeline"> | ||
| 112 | + <li> | ||
| 113 | + <div class="timeline-item"> | ||
| 114 | + <h3 class="timeline-header"> | ||
| 115 | + <span class="handle ui-sortable-handle"> <i | ||
| 116 | + class="fa fa-ellipsis-v"></i> | ||
| 117 | + </span><a href="#">活动延迟</a> 推迟活动开始或者结束 | ||
| 118 | + </h3> | ||
| 119 | + <div class="timeline-body"> | ||
| 120 | + <div class="form-group"> | ||
| 121 | + <div class="row"> | ||
| 122 | + <div class="col-lg-6"> | ||
| 123 | + <div class="input-group"> | ||
| 124 | + <span class="input-group-addon"> 开始时间 </span> <input | ||
| 125 | + type="text" class="form-control form_datetime" | ||
| 126 | + value="<fmt:formatDate value="${tActivity.start_time}" pattern="yyyy-MM-dd HH:mm"/>" | ||
| 127 | + name="start_time" id="start_time" | ||
| 128 | + data-inputmask="'alias': 'yyyy-MM-dd HH:mm'" | ||
| 129 | + data-mask="" /> | ||
| 130 | + </div> | ||
| 131 | + </div> | ||
| 132 | + <div class="col-lg-6"> | ||
| 133 | + <div class="input-group"> | ||
| 134 | + <span class="input-group-addon"> 结束时间</span> <input | ||
| 135 | + type="text" class="form-control form_datetime" | ||
| 136 | + value="<fmt:formatDate value="${tActivity.end_time}" pattern="yyyy-MM-dd HH:mm"/>" | ||
| 137 | + name="end_time" id="end_time" | ||
| 138 | + data-inputmask="'alias': 'yyyy-MM-dd HH:mm'" | ||
| 139 | + data-mask=""> | ||
| 140 | + </div> | ||
| 141 | + </div> | ||
| 142 | + </div> | ||
| 143 | + </div> | ||
| 144 | + </div> | ||
| 145 | + <div class="timeline-footer"> | ||
| 146 | + <button type="button" id="update_time_btn" | ||
| 147 | + name="update_time_btn" onclick="update_activity_time();" | ||
| 148 | + class="btn btn-warning">执行修改</button> | ||
| 149 | + </div> | ||
| 150 | + </div> | ||
| 151 | + </li> | ||
| 152 | + </ul> | ||
| 153 | + </li> | ||
| 154 | + | ||
| 155 | + | ||
| 156 | + <li class="time-label"><span class="bg-blue"> step | ||
| 157 | + 2 </span></li> | ||
| 158 | + <li id="view_video"> | ||
| 159 | + <div class="timeline-item"> | ||
| 160 | + <h3 class="timeline-header"> | ||
| 161 | + <span class="handle ui-sortable-handle"> <i | ||
| 162 | + class="fa fa-ellipsis-v"></i> | ||
| 163 | + </span><a href="#">wowza信号测试</a> | ||
| 164 | + </h3> | ||
| 165 | + <div class="timeline-body"> | ||
| 166 | + <div class="row"> | ||
| 167 | + <c:forEach var="item" items="${vChannels}" varStatus="stat"> | ||
| 168 | + <c:if test="${stat.count == 1}"> | ||
| 169 | + <div class="col-md-4"> | ||
| 170 | + <div class="box box-warning box-solid"> | ||
| 171 | + <div class="box-header with-border"> | ||
| 172 | + <h3 class="box-title">${item.application_name}/${item.stream_name}</h3> | ||
| 173 | + </div> | ||
| 174 | + <div class="box-body"> | ||
| 175 | + <input type="hidden" name="play_url_${item.id}" | ||
| 176 | + id="play_url_${item.id}" value="${item.publish_url}" /> | ||
| 177 | + <span class="mailbox-attachment-icon has-img" | ||
| 178 | + id="player_span_${item.id}"> <img | ||
| 179 | + src="${BASE}/static/assets/dist/img/photo2.png" | ||
| 180 | + alt="Attachment"> | ||
| 181 | + </span> | ||
| 182 | + </div> | ||
| 183 | + <div class="box-footer"></div> | ||
| 184 | + </div> | ||
| 185 | + </div> | ||
| 186 | + </c:if> | ||
| 187 | + </c:forEach> | ||
| 188 | + </div> | ||
| 189 | + <div class="timeline-footer">.</div> | ||
| 190 | + </div> | ||
| 191 | + </li> | ||
| 192 | + | ||
| 193 | + <li class="time-label"><span class="bg-green"> step | ||
| 194 | + 3 </span></li> | ||
| 195 | + <li> | ||
| 196 | + <div class="timeline-item"> | ||
| 197 | + <h3 class="timeline-header"> | ||
| 198 | + <span class="handle ui-sortable-handle"> <i | ||
| 199 | + class="fa fa-ellipsis-v"></i> | ||
| 200 | + </span><a href="#">切入现场信号</a> | ||
| 201 | + </h3> | ||
| 202 | + <div class="timeline-body"> | ||
| 203 | + <div class="row"> | ||
| 204 | + <div class="col-md-4"> | ||
| 205 | + <button type="button" id="switch_btn" | ||
| 206 | + onclick="do_switch(${tActivity.id});" | ||
| 207 | + style="width: 250px; height: 100px" | ||
| 208 | + class="btn btn-block btn-lg btn-danger">切换信号</button> | ||
| 209 | + </div> | ||
| 210 | + <div class="col-md-4"> | ||
| 211 | + <button type="button" name="ad_btn" | ||
| 212 | + onclick="do_ad(${tActivity.id});" | ||
| 213 | + style="width: 250px; height: 100px" | ||
| 214 | + class="btn btn-block btn-lg btn-warning"> | ||
| 215 | + 紧急垫片<br> | ||
| 216 | + </button> | ||
| 217 | + </div> | ||
| 218 | + </div> | ||
| 219 | + </div> | ||
| 220 | + </div> | ||
| 221 | + </li> | ||
| 222 | + <li><i class="fa fa-clock-o bg-gray"></i></li> | ||
| 223 | + </ul> | ||
| 224 | + </div> | ||
| 225 | + </div> | ||
| 226 | + </div> | ||
| 227 | + </div> | ||
| 228 | + </section> | ||
| 229 | + </div> | ||
| 230 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 231 | + </div> | ||
| 232 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 233 | + <script | ||
| 234 | + src="${BASE}/static/assets/plugins/countdown/countdown/jquery.countdown.js"></script> | ||
| 235 | + <script src="${BASE}/static/assets/cnlive/js/player_4.js"></script> | ||
| 236 | + | ||
| 237 | + <!-- Ion Slider --> | ||
| 238 | + <script | ||
| 239 | + src="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.min.js" | ||
| 240 | + type="text/javascript"></script> | ||
| 241 | + | ||
| 242 | + <!-- Bootstrap slider --> | ||
| 243 | + <script | ||
| 244 | + src="${BASE}/static/assets/plugins/bootstrap-slider/bootstrap-slider.js" | ||
| 245 | + type="text/javascript"></script> | ||
| 246 | + <script | ||
| 247 | + src="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script> | ||
| 248 | + | ||
| 249 | + <script type="text/javascript"> | ||
| 250 | + $(function(){ | ||
| 251 | + | ||
| 252 | + var hid_s=$("#start_time").val(); | ||
| 253 | + var time = new Date(hid_s.replace("-", "/")); | ||
| 254 | + var note = $('#note'), | ||
| 255 | + ts = new Date(2012, 0, 1), | ||
| 256 | + newYear = true; | ||
| 257 | + if((new Date()) > ts){ | ||
| 258 | + ts = time.getTime(); | ||
| 259 | + newYear = false; | ||
| 260 | + } | ||
| 261 | + | ||
| 262 | + $('#countdown').countdown({ | ||
| 263 | + timestamp : ts, | ||
| 264 | + callback : function(days, hours, minutes, seconds){ | ||
| 265 | + var message = ""; | ||
| 266 | + message += days + " day" + ( days==1 ? '':'s' ) + ", "; | ||
| 267 | + message += hours + " hour" + ( hours==1 ? '':'s' ) + ", "; | ||
| 268 | + message += minutes + " minute" + ( minutes==1 ? '':'s' ) + " and "; | ||
| 269 | + message += seconds + " second" + ( seconds==1 ? '':'s' ) + " <br />"; | ||
| 270 | + if(newYear){ | ||
| 271 | + message += "left until the new year!"; | ||
| 272 | + } | ||
| 273 | + else { | ||
| 274 | + message += "left to 10 days from now!"; | ||
| 275 | + } | ||
| 276 | + note.html(message); | ||
| 277 | + } | ||
| 278 | + }); | ||
| 279 | + }); | ||
| 280 | + $(".form_datetime").datetimepicker({ | ||
| 281 | + //format: "dd MM yyyy - hh:ii", | ||
| 282 | + format: "yyyy-mm-dd hh:ii", | ||
| 283 | + autoclose: true, | ||
| 284 | + todayBtn: true, | ||
| 285 | + pickerPosition: "bottom-right" | ||
| 286 | + }); | ||
| 287 | + </script> | ||
| 288 | +</body> | ||
| 289 | +</html> |
src/main/webapp/pages/activity/activity_step_in.jsp
0 → 100644
| 1 | +++ a/src/main/webapp/pages/activity/activity_step_in.jsp | ||
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>直播中管理 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +<link rel="stylesheet" | ||
| 13 | + href="${BASE}/static/assets/plugins/countdown/countdown/jquery.countdown.css" /> | ||
| 14 | +<!-- Ion Slider --> | ||
| 15 | +<link href="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.css" | ||
| 16 | + rel="stylesheet" type="text/css" /> | ||
| 17 | +<!-- ion slider Nice --> | ||
| 18 | +<link | ||
| 19 | + href="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.skinNice.css" | ||
| 20 | + rel="stylesheet" type="text/css" /> | ||
| 21 | +<!-- bootstrap slider --> | ||
| 22 | +<link href="${BASE}/static/assets/plugins/bootstrap-slider/slider.css" | ||
| 23 | + rel="stylesheet" type="text/css" /> | ||
| 24 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.js"></script> | ||
| 25 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.html5.js"></script> | ||
| 26 | +<script type="text/javascript">jwplayer.key="MGAzpXRYxGnaVXhH8jSdKXzDe7ucAAvZGWggIA==";</script> | ||
| 27 | + | ||
| 28 | +</head> | ||
| 29 | +<body class="skin-blue fixed "> | ||
| 30 | + <div class="wrapper"> | ||
| 31 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 32 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 33 | + <div class="content-wrapper"> | ||
| 34 | + <section class="content-header"> | ||
| 35 | + <h1> | ||
| 36 | + 直播活动详情 <small>${tActivity.name}</small> <input type="hidden" | ||
| 37 | + name="activity_id" id="activity_id" value="${tActivity.id}" /> <small | ||
| 38 | + class="label label-warning" style="display: none" | ||
| 39 | + id="info_tab_span"><i class="fa fa-bell-o"></i>保存成功</small> | ||
| 40 | + </h1> | ||
| 41 | + <ol class="breadcrumb"> | ||
| 42 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 43 | + <li><a href="${BASE}/activity/list/1">活动管理</a></li> | ||
| 44 | + <li class="active">活动步骤</li> | ||
| 45 | + </ol> | ||
| 46 | + </section> | ||
| 47 | + <section class="content"> | ||
| 48 | + <div class="row"> | ||
| 49 | + <div class="box box-danger"> | ||
| 50 | + <div class="box-header"> | ||
| 51 | + <h3 class="box-title">直播倒计时:</h3> | ||
| 52 | + </div> | ||
| 53 | + <div class="box-body"> | ||
| 54 | + <div class="row"> | ||
| 55 | + <div class="col-xs-6"> | ||
| 56 | + <div class="form-group has-warning"> | ||
| 57 | + <label class="control-label" for="inputWarning"> <i | ||
| 58 | + class="fa fa-bell-o"></i> 提示:请根据直播操作流程严格执行以下任务流程! <input | ||
| 59 | + type="hidden" name="start_time_hid" id="start_time_hid" | ||
| 60 | + value="<fmt:formatDate value="${tActivity.start_time}" pattern="yyyy-MM-dd HH:mm"/>" /> | ||
| 61 | + </label> | ||
| 62 | + </div> | ||
| 63 | + </div> | ||
| 64 | + <div class="col-xs-6" id="countdown"></div> | ||
| 65 | + <p id="note" style="display: none"></p> | ||
| 66 | + </div> | ||
| 67 | + </div> | ||
| 68 | + </div> | ||
| 69 | + </div> | ||
| 70 | + <div class="row"> | ||
| 71 | + <div class="col-md-12"> | ||
| 72 | + <ul class="timeline"> | ||
| 73 | + <li class="time-label" id="li_zhong"><span class="bg-green">直播中操作流程 | ||
| 74 | + <i class="fa fa-clock-o"></i> <fmt:formatDate | ||
| 75 | + value="${tActivity.start_time}" pattern="HH:mm" />--<fmt:formatDate | ||
| 76 | + value="${tActivity.end_time}" pattern="HH:mm" /> | ||
| 77 | + </span></li> | ||
| 78 | + <li> | ||
| 79 | + <div class="timeline-item"> | ||
| 80 | + <div class="col-md-12"> | ||
| 81 | + <ul class="timeline"> | ||
| 82 | + <li class="time-label"><span class="bg-blue"> | ||
| 83 | + step 1 </span></li> | ||
| 84 | + <li> | ||
| 85 | + <div class="timeline-item"> | ||
| 86 | + <h3 class="timeline-header"> | ||
| 87 | + <span class="handle ui-sortable-handle"> <i | ||
| 88 | + class="fa fa-ellipsis-v"></i> | ||
| 89 | + </span><a href="#">录制回放检查</a> | ||
| 90 | + </h3> | ||
| 91 | + <div class="timeline-body">验证录制文件(MP4)信息</div> | ||
| 92 | + <div class="timeline-footer" id="mp4_info"> | ||
| 93 | + | ||
| 94 | + | ||
| 95 | + </div> | ||
| 96 | + <div class="timeline-footer"> | ||
| 97 | + <button type="button" id="checkfile_btn" | ||
| 98 | + onclick="do_checkfile(${tActivity.id});" | ||
| 99 | + class="btn btn-primary">验证文件</button> | ||
| 100 | + </div> | ||
| 101 | + </div> | ||
| 102 | + </li> | ||
| 103 | + <!-- | ||
| 104 | + | ||
| 105 | + <li class="time-label"><span class="bg-aqua"> | ||
| 106 | + step 2 </span></li> | ||
| 107 | + <li> | ||
| 108 | + <div class="timeline-item"> | ||
| 109 | + <h3 class="timeline-header"> | ||
| 110 | + <span class="handle ui-sortable-handle"> <i | ||
| 111 | + class="fa fa-ellipsis-v"></i> | ||
| 112 | + </span><a href="#">监控直播画面</a> | ||
| 113 | + </h3> | ||
| 114 | + <div class="timeline-body"></div> | ||
| 115 | + <div class="timeline-footer"> | ||
| 116 | + <button type="button" onclick="to_view();" | ||
| 117 | + class="btn btn-primary">GO</button> | ||
| 118 | + </div> | ||
| 119 | + | ||
| 120 | + </div> | ||
| 121 | + </li> | ||
| 122 | + --> | ||
| 123 | + <li class="time-label"><span class="bg-yellow"> | ||
| 124 | + step 2 </span></li> | ||
| 125 | + <li> | ||
| 126 | + <div class="timeline-item"> | ||
| 127 | + <h3 class="timeline-header"> | ||
| 128 | + <span class="handle ui-sortable-handle"> <i | ||
| 129 | + class="fa fa-ellipsis-v"></i> | ||
| 130 | + </span><a href="#">紧急处理</a> | ||
| 131 | + </h3> | ||
| 132 | + <div class="timeline-body"> | ||
| 133 | + <div class="row"> | ||
| 134 | + <div class="col-md-4"> | ||
| 135 | + <button type="button" name="ad_btn" | ||
| 136 | + onclick="do_ad(${tActivity.id});" | ||
| 137 | + style="width: 250px; height: 100px" | ||
| 138 | + class="btn btn-block btn-lg btn-warning"> | ||
| 139 | + 紧急垫片<br> | ||
| 140 | + </button> | ||
| 141 | + </div> | ||
| 142 | + <div class="col-md-4"> | ||
| 143 | + <button type="button" name="reset_btn" | ||
| 144 | + onclick="do_stop(${tActivity.id});" | ||
| 145 | + style="width: 250px; height: 100px" | ||
| 146 | + class="btn btn-block btn-lg btn-info">结束(信号复位)</button> | ||
| 147 | + </div> | ||
| 148 | + </div> | ||
| 149 | + </div> | ||
| 150 | + </div> | ||
| 151 | + </li> | ||
| 152 | + </ul> | ||
| 153 | + </div> | ||
| 154 | + </div> | ||
| 155 | + </li> | ||
| 156 | + </ul> | ||
| 157 | + </div> | ||
| 158 | + </div> | ||
| 159 | + </section> | ||
| 160 | + </div> | ||
| 161 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 162 | + </div> | ||
| 163 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 164 | + <script | ||
| 165 | + src="${BASE}/static/assets/plugins/countdown/countdown/jquery.countdown.js"></script> | ||
| 166 | + <script src="${BASE}/static/assets/cnlive/js/player_4.js"></script> | ||
| 167 | + | ||
| 168 | + <!-- Ion Slider --> | ||
| 169 | + <script | ||
| 170 | + src="${BASE}/static/assets/plugins/ionslider/ion.rangeSlider.min.js" | ||
| 171 | + type="text/javascript"></script> | ||
| 172 | + | ||
| 173 | + <!-- Bootstrap slider --> | ||
| 174 | + <script | ||
| 175 | + src="${BASE}/static/assets/plugins/bootstrap-slider/bootstrap-slider.js" | ||
| 176 | + type="text/javascript"></script> | ||
| 177 | + | ||
| 178 | + <script type="text/javascript"> | ||
| 179 | +//锚点定位 | ||
| 180 | +var date = new Date(); | ||
| 181 | +var year = date.getFullYear(); | ||
| 182 | +var month = date.getMonth()+1; | ||
| 183 | +var day = date.getDate(); | ||
| 184 | +var hour = date.getHours(); | ||
| 185 | +var minute = date.getMinutes(); | ||
| 186 | +var second = date.getSeconds(); | ||
| 187 | +var currentTime=year+'/'+month+'/'+day+' '+hour+':'+minute; | ||
| 188 | +var nhour=hour+2; | ||
| 189 | +var nextTime=year+'/'+month+'/'+day+' '+nhour+':'+minute; | ||
| 190 | +var startTime=$("#startTime").val(); | ||
| 191 | +var endTime=$("#endTime").val(); | ||
| 192 | +var next=new Date(nextTime); | ||
| 193 | +var current=new Date(currentTime); | ||
| 194 | +var start=new Date(startTime); | ||
| 195 | +var end=new Date(endTime); | ||
| 196 | +if(current<start){ | ||
| 197 | + $("html,body").animate({scrollTop:$("#li_qian").offset().top},800) | ||
| 198 | +} | ||
| 199 | +if(current>start&¤t<end){ | ||
| 200 | + $("html,body").animate({scrollTop:$("#li_zhong").offset().top},800) | ||
| 201 | +} | ||
| 202 | +if(current<next&¤t>end){ | ||
| 203 | + $("html,body").animate({scrollTop:$("#li_hou").offset().top},800) | ||
| 204 | +} | ||
| 205 | +if(current>next){ | ||
| 206 | + $("html,body").animate({scrollTop:$("#li_qian").offset().top},800) | ||
| 207 | +} | ||
| 208 | + | ||
| 209 | +function to_view(){ | ||
| 210 | + $("html,body").animate({scrollTop:$("#view_video").offset().top},800) | ||
| 211 | +} | ||
| 212 | + | ||
| 213 | + $(function(){ | ||
| 214 | + | ||
| 215 | + var hid_s=$("#start_time_hid").val(); | ||
| 216 | + var time = new Date(hid_s.replace("-", "/")); | ||
| 217 | + var note = $('#note'), | ||
| 218 | + ts = new Date(2012, 0, 1), | ||
| 219 | + newYear = true; | ||
| 220 | + if((new Date()) > ts){ | ||
| 221 | + ts = time.getTime(); | ||
| 222 | + newYear = false; | ||
| 223 | + } | ||
| 224 | + console.log(time.getTime()); | ||
| 225 | + $('#countdown').countdown({ | ||
| 226 | + timestamp : ts, | ||
| 227 | + callback : function(days, hours, minutes, seconds){ | ||
| 228 | + var message = ""; | ||
| 229 | + message += days + " day" + ( days==1 ? '':'s' ) + ", "; | ||
| 230 | + message += hours + " hour" + ( hours==1 ? '':'s' ) + ", "; | ||
| 231 | + message += minutes + " minute" + ( minutes==1 ? '':'s' ) + " and "; | ||
| 232 | + message += seconds + " second" + ( seconds==1 ? '':'s' ) + " <br />"; | ||
| 233 | + if(newYear){ | ||
| 234 | + message += "left until the new year!"; | ||
| 235 | + } | ||
| 236 | + else { | ||
| 237 | + message += "left to 10 days from now!"; | ||
| 238 | + } | ||
| 239 | + note.html(message); | ||
| 240 | + } | ||
| 241 | + }); | ||
| 242 | + }); | ||
| 243 | + | ||
| 244 | + | ||
| 245 | + | ||
| 246 | + function fail_start_time(t) { | ||
| 247 | + var hid_s=$("#start_time_hid").val(); | ||
| 248 | + var time = new Date(hid_s.replace("-", "/")); | ||
| 249 | + time.setMinutes(time.getMinutes() + t, time.getSeconds(), 0); | ||
| 250 | + $("#start_time").val(time.format("yyyy-MM-dd hh:mm")); | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + function fail_end_time(t) { | ||
| 254 | + var hid_e=$("#end_time_hid").val(); | ||
| 255 | + var time = new Date(hid_e.replace("-", "/")); | ||
| 256 | + time.setMinutes(time.getMinutes() + t, time.getSeconds(), 0); | ||
| 257 | + $("#end_time").val(time.format("yyyy-MM-dd hh:mm")); | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | + $(function () { | ||
| 261 | + /* BOOTSTRAP SLIDER */ | ||
| 262 | + $('.slider').slider(); | ||
| 263 | + $("#process_bar").ionRangeSlider({ | ||
| 264 | + min: 0, | ||
| 265 | + max: 100, | ||
| 266 | + from: 0, | ||
| 267 | + type: 'single', | ||
| 268 | + step: 1, | ||
| 269 | + postfix: "", | ||
| 270 | + prettify: false, | ||
| 271 | + hasGrid: true, | ||
| 272 | + onChange: function (obj) { | ||
| 273 | + var t =obj.fromNumber; | ||
| 274 | + fail_start_time(t); | ||
| 275 | + } | ||
| 276 | + }); | ||
| 277 | + | ||
| 278 | + | ||
| 279 | + $("#start_range").ionRangeSlider({ | ||
| 280 | + min: -50, | ||
| 281 | + max: 50, | ||
| 282 | + from: 0, | ||
| 283 | + type: 'single', | ||
| 284 | + step: 1, | ||
| 285 | + postfix: "<i class=\"fa fa-clock-o\"></i>", | ||
| 286 | + prettify: false, | ||
| 287 | + hasGrid: true, | ||
| 288 | + onChange: function (obj) { | ||
| 289 | + var t =obj.fromNumber; | ||
| 290 | + fail_start_time(t); | ||
| 291 | + } | ||
| 292 | + }); | ||
| 293 | + | ||
| 294 | + $("#end_range").ionRangeSlider({ | ||
| 295 | + min: -50, | ||
| 296 | + max: 50, | ||
| 297 | + from: 0, | ||
| 298 | + type: 'single', | ||
| 299 | + step: 1, | ||
| 300 | + postfix: "<i class=\"fa fa-clock-o\"></i>", | ||
| 301 | + prettify: false, | ||
| 302 | + hasGrid: true, | ||
| 303 | + onChange: function (obj) { | ||
| 304 | + console.log(obj.fromNumber); | ||
| 305 | + var t =obj.fromNumber; | ||
| 306 | + fail_end_time(t); | ||
| 307 | + }, | ||
| 308 | + }); | ||
| 309 | + | ||
| 310 | + }); | ||
| 311 | + </script> | ||
| 312 | +</body> | ||
| 313 | +</html> |
src/main/webapp/pages/channel/channel_add.jsp
0 → 100644
| 1 | +++ a/src/main/webapp/pages/channel/channel_add.jsp | ||
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>新建频道 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +<link href="${BASE}/static/assets/plugins/uploadfile/css/fileinput.css" | ||
| 13 | + media="all" rel="stylesheet" type="text/css" /> | ||
| 14 | +<!--[if IE]> | ||
| 15 | + <script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script> | ||
| 16 | + <![endif]--> | ||
| 17 | +<style type="text/css"> | ||
| 18 | +input.error { | ||
| 19 | + border: 1px solid red; | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +span.error { | ||
| 23 | + padding-left: 15px; | ||
| 24 | + color: red; | ||
| 25 | +} | ||
| 26 | +</style> | ||
| 27 | +</head> | ||
| 28 | +<body class="skin-blue sidebar-mini"> | ||
| 29 | + <div class="wrapper"> | ||
| 30 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 31 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 32 | + <div class="content-wrapper"> | ||
| 33 | + <!-- Content Header (Page header) --> | ||
| 34 | + <section class="content-header"> | ||
| 35 | + <h1> | ||
| 36 | + ${empty tChannel.id ? '新建频道':'编辑频道'} <small>${tChannel.name_zh}</small> | ||
| 37 | + <small class="label label-warning" style="display: none" | ||
| 38 | + id="info_tab_span"><i class="fa fa-bell-o"></i>保存成功</small> | ||
| 39 | + </h1> | ||
| 40 | + <ol class="breadcrumb"> | ||
| 41 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 42 | + <li><a href="../channel/list/1">频道管理</a></li> | ||
| 43 | + <li class="active">新增频道</li> | ||
| 44 | + </ol> | ||
| 45 | + </section> | ||
| 46 | + <!-- Main content --> | ||
| 47 | + <section class="content"> | ||
| 48 | + <div class="row"> | ||
| 49 | + <div class="col-md-12"> | ||
| 50 | + <form role="form" name="channelForm" method="post" | ||
| 51 | + id="channelForm"> | ||
| 52 | + <div class="box box-success"> | ||
| 53 | + <div class="box-body"> | ||
| 54 | + <div class="form-group"> | ||
| 55 | + <label>频道名称 </label> | ||
| 56 | + <div class="input-group"> | ||
| 57 | + <span class="input-group-addon"><i class="fa fa-font"></i> | ||
| 58 | + </span> <input type="text" class="form-control" | ||
| 59 | + value="${tChannel.name_zh}" id="name_zh" name="name_zh" | ||
| 60 | + placeholder="如:快新闻"> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | + <div class="form-group"> | ||
| 64 | + <label> 频道代码 </label> | ||
| 65 | + <div class="input-group"> | ||
| 66 | + <span class="input-group-addon"><i class="fa fa-code"></i> | ||
| 67 | + </span> <input type="text" class="form-control" id="name_en" | ||
| 68 | + value="${tChannel.name_en}" name="name_en" | ||
| 69 | + placeholder="如:news"> | ||
| 70 | + </div> | ||
| 71 | + </div> | ||
| 72 | + <div class="form-group"> | ||
| 73 | + <label> 滚播IP </label> | ||
| 74 | + <div class="input-group"> | ||
| 75 | + <div class="input-group-addon"> | ||
| 76 | + <i class="fa fa-laptop"></i> | ||
| 77 | + </div> | ||
| 78 | + <input type="text" class="form-control" id="transcoder_ip" | ||
| 79 | + value="${tChannel.transcoder_ip}" name="transcoder_ip" | ||
| 80 | + data-inputmask="'alias': 'ip'" data-mask=""> | ||
| 81 | + </div> | ||
| 82 | + </div> | ||
| 83 | + <div class="form-group"> | ||
| 84 | + <label> Transcoder ID </label> | ||
| 85 | + <div class="input-group"> | ||
| 86 | + <div class="input-group-addon"> | ||
| 87 | + <i class="fa fa-list-ol"></i> | ||
| 88 | + </div> | ||
| 89 | + <input type="text" class="form-control" id="transcoder_id" | ||
| 90 | + value="${tChannel.transcoder_id}" name="transcoder_id" | ||
| 91 | + placeholder="如:15"> | ||
| 92 | + </div> | ||
| 93 | + </div> | ||
| 94 | + <div class="form-group"> | ||
| 95 | + <label>播出地址 </label> | ||
| 96 | + <div class="input-group"> | ||
| 97 | + <div class="input-group-addon"> | ||
| 98 | + <i class="fa fa-link"></i> | ||
| 99 | + </div> | ||
| 100 | + <input type="text" class="form-control" id="play_url" | ||
| 101 | + value="${tChannel.play_url}" name="play_url" | ||
| 102 | + placeholder="如:http://ips.cnlive.com/IPS/getPcEpg.action?cid=chaotiyu"> | ||
| 103 | + </div> | ||
| 104 | + </div> | ||
| 105 | + <div class="form-group"> | ||
| 106 | + <label> 类型 </label> | ||
| 107 | + <div class="box box-success"> | ||
| 108 | + <div class="box-body"> | ||
| 109 | + <div class="form-group"> | ||
| 110 | + <label> <input type="radio" name="type" value="1" | ||
| 111 | + <c:if test="${tChannel.type eq '1'}">checked="checked"</c:if> | ||
| 112 | + class="flat-red" /> 自主频道 | ||
| 113 | + </label> | ||
| 114 | + </div> | ||
| 115 | + <div class="form-group"> | ||
| 116 | + <label> <input type="radio" name="type" value="2" | ||
| 117 | + <c:if test="${tChannel.type eq '2'}">checked="checked"</c:if> | ||
| 118 | + class="flat-red" /> 运营商频道 | ||
| 119 | + </label> | ||
| 120 | + </div> | ||
| 121 | + </div> | ||
| 122 | + </div> | ||
| 123 | + </div> | ||
| 124 | + <div class="form-group"> | ||
| 125 | + <label> 聊天室 ID </label> | ||
| 126 | + <div class="input-group"> | ||
| 127 | + <div class="input-group-addon"> | ||
| 128 | + <i class="fa fa-wechat "></i> | ||
| 129 | + </div> | ||
| 130 | + <input type="text" class="form-control" id="chatroom_id" | ||
| 131 | + value="${tChannel.chatroom_id}" name="chatroom_id" | ||
| 132 | + placeholder="如:35521"> | ||
| 133 | + </div> | ||
| 134 | + </div> | ||
| 135 | + <div class="form-group"> | ||
| 136 | + <label>海报 </label> | ||
| 137 | + <div class="input-group"> | ||
| 138 | + <div class="input-group-addon"> | ||
| 139 | + <i class="fa fa-file-image-o"></i> | ||
| 140 | + </div> | ||
| 141 | + <form method="post" enctype="multipart/form-data"> | ||
| 142 | + <input id="poster" name="poster" class="file" type="file" | ||
| 143 | + multiple data-min-file-count="1"> | ||
| 144 | + </form> | ||
| 145 | + </div> | ||
| 146 | + </div> | ||
| 147 | + | ||
| 148 | + <div class="form-group"> | ||
| 149 | + <label>默认输入信号 </label> | ||
| 150 | + <div class="input-group"> | ||
| 151 | + <div class="col-md-12"></div> | ||
| 152 | + </div> | ||
| 153 | + <div class="box-footer"> | ||
| 154 | + <input type="hidden" name="image_name" id="image_name" | ||
| 155 | + value="" /> <input type="hidden" name="channel_id" | ||
| 156 | + id="channel_id" value="${tChannel.id }" /> | ||
| 157 | + <!-- <button type="button" id="t_channel_save_btn" | ||
| 158 | + onclick="t_channel_add_or_update(${empty tChannel.id ? '-1':tChannel.id});" | ||
| 159 | + class="btn btn-primary"> | ||
| 160 | + <i class="fa fa-save "></i> 保存 | ||
| 161 | + </button> --> | ||
| 162 | + </div> | ||
| 163 | + </div> | ||
| 164 | + </div> | ||
| 165 | + | ||
| 166 | + <div class="row"> | ||
| 167 | + <div class="col-md-6"> | ||
| 168 | + <div class="box box-primary"> | ||
| 169 | + <div class="box-header"> | ||
| 170 | + <h3 class="box-title">选择Wowza服务器</h3> | ||
| 171 | + </div> | ||
| 172 | + <div class="box-body"> | ||
| 173 | + <c:forEach var="item" items="${tWowzas}" varStatus="stat"> | ||
| 174 | + <div class="form-group"> | ||
| 175 | + <label> <input type="radio" name="tWowza" | ||
| 176 | + value="${item.id}" class="flat-green" />${item.name}_${item.lan_ip} | ||
| 177 | + </label> | ||
| 178 | + </div> | ||
| 179 | + </c:forEach> | ||
| 180 | + </div> | ||
| 181 | + </div> | ||
| 182 | + </div> | ||
| 183 | + <div class="col-md-6"> | ||
| 184 | + <div class="box box-warning"> | ||
| 185 | + <div class="box-header"> | ||
| 186 | + <h3 class="box-title">选择Wowza Stream</h3> | ||
| 187 | + </div> | ||
| 188 | + <div class="box-body" id="wowza_stream_body"></div> | ||
| 189 | + </div> | ||
| 190 | + </div> | ||
| 191 | + </div> | ||
| 192 | + <button type="submit" id="t_channel_save_btn" | ||
| 193 | + class="btn btn-primary"> | ||
| 194 | + <i class="fa fa-save "></i> 保存 | ||
| 195 | + </button> | ||
| 196 | + </form> | ||
| 197 | + </div> | ||
| 198 | + </div> | ||
| 199 | + </section> | ||
| 200 | + </div> | ||
| 201 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 202 | + </div> | ||
| 203 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 204 | + <script src="${BASE}/static/assets/cnlive/js/Math.uuid.js"></script> | ||
| 205 | + <script src="${BASE}/static/assets/cnlive/js/ajax_rest.js"></script> | ||
| 206 | + <script | ||
| 207 | + src="${BASE}/static/assets/cnlive/js/validate/validate_channel.js" | ||
| 208 | + type="text/javascript"></script> | ||
| 209 | + <script src="${BASE}/static/assets/plugins/uploadfile/js/fileinput.js" | ||
| 210 | + type="text/javascript"></script> | ||
| 211 | + <script | ||
| 212 | + src="${BASE}/static/assets/plugins/uploadfile/js/fileinput_locale_zh.js" | ||
| 213 | + type="text/javascript"></script> | ||
| 214 | + | ||
| 215 | +<script type="text/javascript"> | ||
| 216 | + $(document).ready(function(){ | ||
| 217 | + $("input[name='tWowza']").on('ifChecked', function(event){ | ||
| 218 | + var id=this.value; | ||
| 219 | + load_streams(id); | ||
| 220 | + }); | ||
| 221 | + $("input").iCheck({ | ||
| 222 | + radioClass: 'iradio_square-green', | ||
| 223 | + increaseArea: '20%' | ||
| 224 | + }); | ||
| 225 | +}); | ||
| 226 | + $("#poster").fileinput({ | ||
| 227 | + uploadUrl : BASE + '/channel/poster', | ||
| 228 | + allowedFileExtensions : [ 'jpg' ], | ||
| 229 | + overwriteInitial : false, | ||
| 230 | + uploadAsync : true, | ||
| 231 | + showUpload : true, | ||
| 232 | + maxFileSize : 1000, | ||
| 233 | + showCaption : false, | ||
| 234 | + uploadExtraData : { | ||
| 235 | + image_name : Math.uuid() + ".jpg" | ||
| 236 | + }, | ||
| 237 | + showUploadedThumbs : false, | ||
| 238 | + maxFilesNum : 10, | ||
| 239 | + //allowedFileTypes: ['image', 'video', 'flash'], | ||
| 240 | + slugCallback : function(filename) { | ||
| 241 | + return filename.replace('(', '_').replace(']', '_'); | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + }); | ||
| 245 | + | ||
| 246 | + $('#poster').on('filebatchuploadcomplete', | ||
| 247 | + function(event, files, extra) { | ||
| 248 | + // console.log(event); | ||
| 249 | + console.log(extra.image_name); | ||
| 250 | + $('#image_name').val(extra.image_name); | ||
| 251 | + //console.log(Math.uuid()); | ||
| 252 | + }); | ||
| 253 | + | ||
| 254 | + $(document).ready(function() { | ||
| 255 | + $("#test-upload").fileinput({ | ||
| 256 | + 'showPreview' : false, | ||
| 257 | + 'allowedFileExtensions' : [ 'jpg', 'png', 'gif' ], | ||
| 258 | + 'elErrorContainer' : '#errorBlock' | ||
| 259 | + }); | ||
| 260 | + }); | ||
| 261 | + </script> | ||
| 262 | +</body> | ||
| 263 | +</html> |