Commit b26b3ffed7f08ce25fdfe78a7cf33deed8589303
Merge branch 'master' of http://bj.gitlab.cnlive.com/liujicheng/cnlive_live_web into v532
# Conflicts: # .settings/org.eclipse.wst.common.component # target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.properties
Showing
24 changed files
with
2416 additions
and
2246 deletions
Too many changes to show.
To preserve performance only 24 of 36 files are displayed.
.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 excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
| 16 | - <attributes> | ||
| 17 | - <attribute name="maven.pomderived" value="true"/> | ||
| 18 | - </attributes> | ||
| 19 | - </classpathentry> | ||
| 20 | - <classpathentry kind="src" path="src/main/resources/i18n"/> | ||
| 21 | - <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| 22 | - <attributes> | ||
| 23 | - <attribute name="maven.pomderived" value="true"/> | ||
| 24 | - <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
| 25 | - </attributes> | ||
| 26 | - </classpathentry> | ||
| 27 | - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> | ||
| 28 | - <attributes> | ||
| 29 | - <attribute name="maven.pomderived" value="true"/> | ||
| 30 | - </attributes> | ||
| 31 | - </classpathentry> | ||
| 32 | - <classpathentry kind="output" path="target/classes"/> | ||
| 33 | -</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 excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
| 16 | + <attributes> | ||
| 17 | + <attribute name="maven.pomderived" value="true"/> | ||
| 18 | + </attributes> | ||
| 19 | + </classpathentry> | ||
| 20 | + <classpathentry kind="src" path="src/main/resources/i18n"/> | ||
| 21 | + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| 22 | + <attributes> | ||
| 23 | + <attribute name="maven.pomderived" value="true"/> | ||
| 24 | + <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
| 25 | + </attributes> | ||
| 26 | + </classpathentry> | ||
| 27 | + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | ||
| 28 | + <attributes> | ||
| 29 | + <attribute name="owner.project.facets" value="java"/> | ||
| 30 | + </attributes> | ||
| 31 | + </classpathentry> | ||
| 32 | + <classpathentry kind="output" path="target/classes"/> | ||
| 33 | +</classpath> |
.settings/org.eclipse.jdt.core.prefs
| 1 | eclipse.preferences.version=1 | 1 | eclipse.preferences.version=1 |
| 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled |
| 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate |
| 4 | -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 | 4 | +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 |
| 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve |
| 6 | -org.eclipse.jdt.core.compiler.compliance=1.6 | 6 | +org.eclipse.jdt.core.compiler.compliance=1.7 |
| 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate | 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate |
| 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate | 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate |
| 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate | 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate |
| 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
| 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
| 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning |
| 13 | -org.eclipse.jdt.core.compiler.source=1.6 | 13 | +org.eclipse.jdt.core.compiler.source=1.7 |
.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> | 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.7"/> | ||
| 7 | +</faceted-project> |
WebContent/META-INF/MANIFEST.MF
src/main/java/com/cnlive/mz/live/action/HttpPostArgumentTest2.java
| 1 | -package com.cnlive.mz.live.action; | ||
| 2 | - | ||
| 3 | -import java.io.File; | ||
| 4 | -import java.io.IOException; | ||
| 5 | - | ||
| 6 | -import org.apache.commons.httpclient.NameValuePair; | ||
| 7 | -import org.apache.commons.httpclient.params.HttpMethodParams; | ||
| 8 | -import org.apache.http.HttpEntity; | ||
| 9 | -import org.apache.http.HttpResponse; | ||
| 10 | -import org.apache.http.HttpStatus; | ||
| 11 | -import org.apache.http.ParseException; | ||
| 12 | -import org.apache.http.client.HttpClient; | ||
| 13 | -import org.apache.http.client.methods.HttpPost; | ||
| 14 | -import org.apache.http.entity.mime.MultipartEntity; | ||
| 15 | -import org.apache.http.entity.mime.content.FileBody; | ||
| 16 | -import org.apache.http.entity.mime.content.StringBody; | ||
| 17 | -import org.apache.http.impl.client.DefaultHttpClient; | ||
| 18 | -import org.apache.http.util.EntityUtils; | ||
| 19 | - | ||
| 20 | -import com.cnlive.mz.commons.net.HttpReq; | ||
| 21 | - | ||
| 22 | -public class HttpPostArgumentTest2 { | ||
| 23 | - | ||
| 24 | - private static String user_access_key = "cf34f28db21b46678237bfa849e239ea"; | ||
| 25 | - private static String app_access_key = "7338ebf9cab441c0843e437a18d85549"; | ||
| 26 | - | ||
| 27 | - public void SubmitPost(String url, String filepath) { | ||
| 28 | - HttpClient httpclient = new DefaultHttpClient(); | ||
| 29 | - try { | ||
| 30 | - HttpPost httppost = new HttpPost(url); | ||
| 31 | - FileBody bin = new FileBody(new File(filepath)); | ||
| 32 | - MultipartEntity reqEntity = new MultipartEntity(); | ||
| 33 | - // reqEntity.addPart("file", bin); | ||
| 34 | - reqEntity.addPart("app_access_key", new StringBody("7338ebf9cab441c0843e437a18d85549")); | ||
| 35 | - reqEntity.addPart("user_access_key", new StringBody("cf34f28db21b46678237bfa849e239ea")); | ||
| 36 | - reqEntity.addPart("direct", new StringBody("0")); | ||
| 37 | - reqEntity.addPart("upload_type", new StringBody("1")); | ||
| 38 | - reqEntity.addPart("md5", new StringBody("liujicheng")); | ||
| 39 | - reqEntity.addPart("title", new StringBody("title")); | ||
| 40 | - reqEntity.addPart("name", new StringBody("中投视频宣传片熊猫test")); | ||
| 41 | - reqEntity.addPart("server_access_key", new StringBody("3830ce241dad4b9f844d131c890231ae")); | ||
| 42 | - | ||
| 43 | - httppost.setEntity(reqEntity); | ||
| 44 | - HttpResponse response = httpclient.execute(httppost); | ||
| 45 | - int statusCode = response.getStatusLine().getStatusCode(); | ||
| 46 | - System.out.println(statusCode); | ||
| 47 | - System.out.println("服务器正常响应....."); | ||
| 48 | - HttpEntity resEntity = response.getEntity(); | ||
| 49 | - System.out.println(EntityUtils.toString(resEntity)); | ||
| 50 | - System.out.println(resEntity.getContent()); | ||
| 51 | - EntityUtils.consume(resEntity); | ||
| 52 | - | ||
| 53 | - } catch (ParseException e) { | ||
| 54 | - e.printStackTrace(); | ||
| 55 | - } catch (IOException e) { | ||
| 56 | - e.printStackTrace(); | ||
| 57 | - } finally { | ||
| 58 | - try { | ||
| 59 | - httpclient.getConnectionManager().shutdown(); | ||
| 60 | - } catch (Exception ignore) { | ||
| 61 | - ignore.printStackTrace(); | ||
| 62 | - } | ||
| 63 | - } | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | - public static void redirect() { | ||
| 67 | - NameValuePair[] param = { new NameValuePair("relation_id", "283645"), new NameValuePair("video_type", "3"), | ||
| 68 | - new NameValuePair("user_access_key", user_access_key), | ||
| 69 | - new NameValuePair("app_access_key", app_access_key) }; | ||
| 70 | - String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/redirect", param); | ||
| 71 | - System.out.println(c); | ||
| 72 | - } | ||
| 73 | - | ||
| 74 | - public static void delete() { | ||
| 75 | - NameValuePair[] param = { new NameValuePair("video_type", "2"), | ||
| 76 | - new NameValuePair("app_access_key", "7338ebf9cab441c0843e437a18d85549"), | ||
| 77 | - new NameValuePair("user_access_key", "cf34f28db21b46678237bfa849e239ea"), | ||
| 78 | - new NameValuePair("video_uuid", "a8794762b3e92c7d6589a6157cf1ef27,7e26dee78a584f8c5ab1d93a9c878f1d") }; | ||
| 79 | - String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/delete", param); | ||
| 80 | - System.out.println(c); | ||
| 81 | - } | ||
| 82 | - | ||
| 83 | - private static String md5 = "ffa699fb66750acab30b71b8ceb0172d1"; | ||
| 84 | - | ||
| 85 | - public static void supload() { | ||
| 86 | - NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | ||
| 87 | - new NameValuePair("user_access_key", user_access_key), new NameValuePair("video_type", "3"), | ||
| 88 | - new NameValuePair("upload_type", "0"), new NameValuePair("direct", "1"), new NameValuePair("md5", md5), | ||
| 89 | - new NameValuePair("title", "tit三道恩le1"), new NameValuePair("relation_id", "615207"), | ||
| 90 | - new NameValuePair("custom_args", "custom_args1"), new NameValuePair("name", "VID_20151224_105421.mp4"), | ||
| 91 | - new NameValuePair("server_access_key", "3830ce241dad4b9f844d131c890231ae") }; | ||
| 92 | - String c = HttpReq.postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/supload", param); | ||
| 93 | - System.out.println(c); | ||
| 94 | - } | ||
| 95 | - | ||
| 96 | - public static void uploadNotify() { | ||
| 97 | - NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | ||
| 98 | - new NameValuePair("user_access_key", user_access_key), new NameValuePair("upload_type", "1"), | ||
| 99 | - new NameValuePair("video_type", "2"), new NameValuePair("state", "200"), | ||
| 100 | - new NameValuePair("video_uuid", md5) }; | ||
| 101 | - String c = HttpReq | ||
| 102 | - .postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/uploadNotify", param); | ||
| 103 | - System.out.println(c); | ||
| 104 | - } | ||
| 105 | - | ||
| 106 | - public static void all() { | ||
| 107 | - NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | ||
| 108 | - new NameValuePair("relation_id", "498122"), | ||
| 109 | - | ||
| 110 | - new NameValuePair("user_access_key", user_access_key), new NameValuePair("upload_type", "1"), | ||
| 111 | - new NameValuePair("video_type", "2"), new NameValuePair("page_no", "1"), | ||
| 112 | - new NameValuePair("video_uuid", md5) }; | ||
| 113 | - String c = HttpReq.postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/all", param); | ||
| 114 | - System.out.println(c); | ||
| 115 | - } | ||
| 116 | - | ||
| 117 | - public static void main(String[] args) { | ||
| 118 | - // new HttpPostArgumentTest2().delete(); | ||
| 119 | - //HttpPostArgumentTest2.all(); | ||
| 120 | - HttpPostArgumentTest2.redirect(); | ||
| 121 | - // HttpReq.postRequestWidthResult("http://120.132.76.51:9696/cnlive_encoding_job/task", | ||
| 122 | - // "json", "jsonjsonjsonjson");r | ||
| 123 | - } | ||
| 124 | - | ||
| 125 | -} | 1 | +package com.cnlive.mz.live.action; |
| 2 | + | ||
| 3 | +import java.io.File; | ||
| 4 | +import java.io.IOException; | ||
| 5 | + | ||
| 6 | +import org.apache.commons.httpclient.NameValuePair; | ||
| 7 | +import org.apache.commons.httpclient.params.HttpMethodParams; | ||
| 8 | +import org.apache.http.HttpEntity; | ||
| 9 | +import org.apache.http.HttpResponse; | ||
| 10 | +import org.apache.http.HttpStatus; | ||
| 11 | +import org.apache.http.ParseException; | ||
| 12 | +import org.apache.http.client.HttpClient; | ||
| 13 | +import org.apache.http.client.methods.HttpPost; | ||
| 14 | +import org.apache.http.entity.mime.MultipartEntity; | ||
| 15 | +import org.apache.http.entity.mime.content.FileBody; | ||
| 16 | +import org.apache.http.entity.mime.content.StringBody; | ||
| 17 | +import org.apache.http.impl.client.DefaultHttpClient; | ||
| 18 | +import org.apache.http.util.EntityUtils; | ||
| 19 | + | ||
| 20 | +import com.cnlive.mz.commons.net.HttpReq; | ||
| 21 | + | ||
| 22 | +public class HttpPostArgumentTest2 { | ||
| 23 | + | ||
| 24 | + private static String user_access_key = "cf34f28db21b46678237bfa849e239ea"; | ||
| 25 | + private static String app_access_key = "7338ebf9cab441c0843e437a18d85549"; | ||
| 26 | + | ||
| 27 | + public void SubmitPost(String url, String filepath) { | ||
| 28 | + HttpClient httpclient = new DefaultHttpClient(); | ||
| 29 | + try { | ||
| 30 | + HttpPost httppost = new HttpPost(url); | ||
| 31 | + FileBody bin = new FileBody(new File(filepath)); | ||
| 32 | + MultipartEntity reqEntity = new MultipartEntity(); | ||
| 33 | + // reqEntity.addPart("file", bin); | ||
| 34 | + reqEntity.addPart("app_access_key", new StringBody("7338ebf9cab441c0843e437a18d85549")); | ||
| 35 | + reqEntity.addPart("user_access_key", new StringBody("cf34f28db21b46678237bfa849e239ea")); | ||
| 36 | + reqEntity.addPart("direct", new StringBody("0")); | ||
| 37 | + reqEntity.addPart("upload_type", new StringBody("1")); | ||
| 38 | + reqEntity.addPart("md5", new StringBody("liujicheng")); | ||
| 39 | + reqEntity.addPart("title", new StringBody("title")); | ||
| 40 | + reqEntity.addPart("name", new StringBody("中投视频宣传片熊猫test")); | ||
| 41 | + reqEntity.addPart("server_access_key", new StringBody("3830ce241dad4b9f844d131c890231ae")); | ||
| 42 | + | ||
| 43 | + httppost.setEntity(reqEntity); | ||
| 44 | + HttpResponse response = httpclient.execute(httppost); | ||
| 45 | + int statusCode = response.getStatusLine().getStatusCode(); | ||
| 46 | + System.out.println(statusCode); | ||
| 47 | + System.out.println("服务器正常响应....."); | ||
| 48 | + HttpEntity resEntity = response.getEntity(); | ||
| 49 | + System.out.println(EntityUtils.toString(resEntity)); | ||
| 50 | + System.out.println(resEntity.getContent()); | ||
| 51 | + EntityUtils.consume(resEntity); | ||
| 52 | + | ||
| 53 | + } catch (ParseException e) { | ||
| 54 | + e.printStackTrace(); | ||
| 55 | + } catch (IOException e) { | ||
| 56 | + e.printStackTrace(); | ||
| 57 | + } finally { | ||
| 58 | + try { | ||
| 59 | + httpclient.getConnectionManager().shutdown(); | ||
| 60 | + } catch (Exception ignore) { | ||
| 61 | + ignore.printStackTrace(); | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public static void redirect() { | ||
| 67 | + NameValuePair[] param = { new NameValuePair("relation_id", "283645"), new NameValuePair("video_type", "3"), | ||
| 68 | + new NameValuePair("user_access_key", user_access_key), | ||
| 69 | + new NameValuePair("app_access_key", app_access_key) }; | ||
| 70 | + String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/redirect", param); | ||
| 71 | + System.out.println(c); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public static void delete() { | ||
| 75 | + NameValuePair[] param = { new NameValuePair("video_type", "2"), | ||
| 76 | + new NameValuePair("app_access_key", "7338ebf9cab441c0843e437a18d85549"), | ||
| 77 | + new NameValuePair("user_access_key", "cf34f28db21b46678237bfa849e239ea"), | ||
| 78 | + new NameValuePair("video_uuid", "a8794762b3e92c7d6589a6157cf1ef27,7e26dee78a584f8c5ab1d93a9c878f1d") }; | ||
| 79 | + String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/delete", param); | ||
| 80 | + System.out.println(c); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + private static String md5 = "ffa699fb66750acab30b71b8ceb0172d1"; | ||
| 84 | + | ||
| 85 | + public static void supload() { | ||
| 86 | + NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | ||
| 87 | + new NameValuePair("user_access_key", user_access_key), new NameValuePair("video_type", "3"), | ||
| 88 | + new NameValuePair("upload_type", "0"), new NameValuePair("direct", "1"), new NameValuePair("md5", md5), | ||
| 89 | + new NameValuePair("title", "tit三道恩le1"), new NameValuePair("relation_id", "615207"), | ||
| 90 | + new NameValuePair("custom_args", "custom_args1"), new NameValuePair("name", "VID_20151224_105421.mp4"), | ||
| 91 | + new NameValuePair("server_access_key", "3830ce241dad4b9f844d131c890231ae") }; | ||
| 92 | + String c = HttpReq.postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/supload", param); | ||
| 93 | + System.out.println(c); | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public static void uploadNotify() { | ||
| 97 | + NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | ||
| 98 | + new NameValuePair("user_access_key", user_access_key), new NameValuePair("upload_type", "1"), | ||
| 99 | + new NameValuePair("video_type", "2"), new NameValuePair("state", "200"), | ||
| 100 | + new NameValuePair("video_uuid", md5) }; | ||
| 101 | + String c = HttpReq | ||
| 102 | + .postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/uploadNotify", param); | ||
| 103 | + System.out.println(c); | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public static void all() { | ||
| 107 | + NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | ||
| 108 | + new NameValuePair("relation_id", "498122"), | ||
| 109 | + | ||
| 110 | + new NameValuePair("user_access_key", user_access_key), new NameValuePair("upload_type", "1"), | ||
| 111 | + new NameValuePair("video_type", "2"), new NameValuePair("page_no", "1"), | ||
| 112 | + new NameValuePair("video_uuid", md5) }; | ||
| 113 | + String c = HttpReq.postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/all", param); | ||
| 114 | + System.out.println(c); | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public static void main(String[] args) { | ||
| 118 | + // new HttpPostArgumentTest2().delete(); | ||
| 119 | + //HttpPostArgumentTest2.all(); | ||
| 120 | + HttpPostArgumentTest2.redirect(); | ||
| 121 | + // HttpReq.postRequestWidthResult("http://120.132.76.51:9696/cnlive_encoding_job/task", | ||
| 122 | + // "json", "jsonjsonjsonjson");r | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | +} |
src/main/java/com/cnlive/mz/live/action/LiveAction.java
| @@ -9,11 +9,15 @@ | @@ -9,11 +9,15 @@ | ||
| 9 | 9 | ||
| 10 | package com.cnlive.mz.live.action; | 10 | package com.cnlive.mz.live.action; |
| 11 | 11 | ||
| 12 | +import java.io.IOException; | ||
| 12 | import java.io.UnsupportedEncodingException; | 13 | import java.io.UnsupportedEncodingException; |
| 13 | import java.util.HashMap; | 14 | import java.util.HashMap; |
| 14 | import java.util.List; | 15 | import java.util.List; |
| 15 | import java.util.Map; | 16 | import java.util.Map; |
| 16 | 17 | ||
| 18 | +import javax.servlet.http.HttpServletRequest; | ||
| 19 | +import javax.servlet.http.HttpServletResponse; | ||
| 20 | + | ||
| 17 | import org.apache.commons.httpclient.NameValuePair; | 21 | import org.apache.commons.httpclient.NameValuePair; |
| 18 | import org.apache.commons.lang.StringUtils; | 22 | import org.apache.commons.lang.StringUtils; |
| 19 | import org.apache.log4j.Logger; | 23 | import org.apache.log4j.Logger; |
| @@ -33,8 +37,10 @@ import org.smart4j.framework.util.CastUtil; | @@ -33,8 +37,10 @@ import org.smart4j.framework.util.CastUtil; | ||
| 33 | import com.cnlive.mz.commons.Constants; | 37 | import com.cnlive.mz.commons.Constants; |
| 34 | import com.cnlive.mz.commons.net.HttpReq; | 38 | import com.cnlive.mz.commons.net.HttpReq; |
| 35 | import com.cnlive.mz.live.common.LiveUtils; | 39 | import com.cnlive.mz.live.common.LiveUtils; |
| 40 | +import com.cnlive.mz.live.entity.TChannel; | ||
| 36 | import com.cnlive.mz.live.entity.TLive; | 41 | import com.cnlive.mz.live.entity.TLive; |
| 37 | import com.cnlive.mz.live.entity.TRoom; | 42 | import com.cnlive.mz.live.entity.TRoom; |
| 43 | +import com.cnlive.mz.live.rest.BaseUtil; | ||
| 38 | import com.cnlive.mz.live.service.TCheckService; | 44 | import com.cnlive.mz.live.service.TCheckService; |
| 39 | import com.cnlive.mz.live.service.TLiveService; | 45 | import com.cnlive.mz.live.service.TLiveService; |
| 40 | import com.cnlive.mz.live.service.TRoomService; | 46 | import com.cnlive.mz.live.service.TRoomService; |
| @@ -202,6 +208,8 @@ public class LiveAction { | @@ -202,6 +208,8 @@ public class LiveAction { | ||
| 202 | rb.setErrorCode("0"); | 208 | rb.setErrorCode("0"); |
| 203 | rb.setErrorMessage("创建活动成功"); | 209 | rb.setErrorMessage("创建活动成功"); |
| 204 | log.info("创建活动成功"); | 210 | log.info("创建活动成功"); |
| 211 | + //通知cms直播 | ||
| 212 | + boolean success = tLiveService.startLive(tLive); | ||
| 205 | return rb; | 213 | return rb; |
| 206 | } else { | 214 | } else { |
| 207 | Map<String, Object> map = new HashMap<String, Object>(); | 215 | Map<String, Object> map = new HashMap<String, Object>(); |
| @@ -265,6 +273,7 @@ public class LiveAction { | @@ -265,6 +273,7 @@ public class LiveAction { | ||
| 265 | ResultBean rb = new ResultBean(); | 273 | ResultBean rb = new ResultBean(); |
| 266 | String appId = params.getString("appId"); | 274 | String appId = params.getString("appId"); |
| 267 | String activityid = params.getString("activityId"); | 275 | String activityid = params.getString("activityId"); |
| 276 | + TLive tLive = tLiveService.selectByParams(appId, activityid); | ||
| 268 | if (StringUtils.isEmpty(appId) || StringUtils.isEmpty(activityid)) { | 277 | if (StringUtils.isEmpty(appId) || StringUtils.isEmpty(activityid)) { |
| 269 | Map<String, Object> map = new HashMap<String, Object>(); | 278 | Map<String, Object> map = new HashMap<String, Object>(); |
| 270 | map.put("location", ""); | 279 | map.put("location", ""); |
| @@ -273,11 +282,18 @@ public class LiveAction { | @@ -273,11 +282,18 @@ public class LiveAction { | ||
| 273 | rb.setErrorMessage("停止直播失败,参数不正确"); | 282 | rb.setErrorMessage("停止直播失败,参数不正确"); |
| 274 | return rb; | 283 | return rb; |
| 275 | } else { | 284 | } else { |
| 276 | - TLive tLive = tLiveService.selectByParams(appId, activityid); | 285 | + |
| 277 | String live_url = tLive.getLive_url(); | 286 | String live_url = tLive.getLive_url(); |
| 278 | int index = live_url.lastIndexOf("/"); | 287 | int index = live_url.lastIndexOf("/"); |
| 279 | String streamName = live_url.substring(index + 1); | 288 | String streamName = live_url.substring(index + 1); |
| 280 | System.out.println("streamName===" + streamName); | 289 | System.out.println("streamName===" + streamName); |
| 290 | + // 直播断流。 | ||
| 291 | + tCheckService.close(streamName, tLive.getId(), tLive.getUuid()); | ||
| 292 | + //通知cms停止直播 | ||
| 293 | + tLiveService.releaseChatRoom(tLive); | ||
| 294 | + } | ||
| 295 | + // 直播通知 | ||
| 296 | + // tLiveService.notify(video_uuid, -1); | ||
| 281 | Map<String, Object> map = new HashMap<String, Object>(); | 297 | Map<String, Object> map = new HashMap<String, Object>(); |
| 282 | map.put("location", tLive.getLive_url()); | 298 | map.put("location", tLive.getLive_url()); |
| 283 | rb.setData(map); | 299 | rb.setData(map); |
| @@ -286,7 +302,6 @@ public class LiveAction { | @@ -286,7 +302,6 @@ public class LiveAction { | ||
| 286 | return rb; | 302 | return rb; |
| 287 | } | 303 | } |
| 288 | 304 | ||
| 289 | - } | ||
| 290 | 305 | ||
| 291 | /** | 306 | /** |
| 292 | * 1.6 获取直播活动列表接口.md | 307 | * 1.6 获取直播活动列表接口.md |
| @@ -372,7 +387,156 @@ public class LiveAction { | @@ -372,7 +387,156 @@ public class LiveAction { | ||
| 372 | return rb; | 387 | return rb; |
| 373 | } | 388 | } |
| 374 | } | 389 | } |
| 375 | - | 390 | + |
| 391 | + /** | ||
| 392 | + * 1.8 获取APP直播URL接口.md | ||
| 393 | + * | ||
| 394 | + * @param params | ||
| 395 | + * @return | ||
| 396 | + */ | ||
| 397 | + @Request.Get("/live/epg/play/app") | ||
| 398 | + public ResultBean appURL(Params params) throws IOException { | ||
| 399 | + HttpServletResponse response = DataContext.getResponse(); | ||
| 400 | + ResultBean rb = new ResultBean(); | ||
| 401 | + String appId = params.getString("appId"); | ||
| 402 | + String activityid = params.getString("activityId"); | ||
| 403 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 404 | + if (StringUtils.isEmpty(appId) || StringUtils.isEmpty(activityid)) { | ||
| 405 | + map.put("location", ""); | ||
| 406 | + rb.setData(map); | ||
| 407 | + rb.setErrorCode("500"); | ||
| 408 | + rb.setErrorMessage("启动app活动失败"); | ||
| 409 | + return rb; | ||
| 410 | + } else { | ||
| 411 | + TLive tLive = tLiveService.selectByParams(appId, activityid); | ||
| 412 | + TChannel tchannel = tLiveService.selectChannel(tLive.getRelation_id()); | ||
| 413 | + if(tchannel!=null){ | ||
| 414 | + // 请求到app....... | ||
| 415 | + redirect(response, "http://ips.cnlive.com/IPS/liveplayByAPP.action?appId="+appId+"&channelID="+tLive.getRelation_id()); | ||
| 416 | + map.put("location", ""); | ||
| 417 | + rb.setData(map); | ||
| 418 | + rb.setErrorCode("0"); | ||
| 419 | + rb.setErrorMessage("302重定向到app"); | ||
| 420 | + return rb; | ||
| 421 | + }else{ | ||
| 422 | + map.put("location", tLive.getLive_url()); | ||
| 423 | + rb.setData(map); | ||
| 424 | + rb.setErrorCode("0"); | ||
| 425 | + rb.setErrorMessage("启动app活动成功"); | ||
| 426 | + return rb; | ||
| 427 | + } | ||
| 428 | + } | ||
| 429 | + | ||
| 430 | + } | ||
| 431 | + | ||
| 432 | + /** | ||
| 433 | + * 1.9 获取H5直播URL接口.md | ||
| 434 | + * | ||
| 435 | + * @param params | ||
| 436 | + * @return | ||
| 437 | + */ | ||
| 438 | + @Request.Get("/live/epg/play/h5") | ||
| 439 | + public ResultBean h5URL(Params params) { | ||
| 440 | + HttpServletResponse response = DataContext.getResponse(); | ||
| 441 | + ResultBean rb = new ResultBean(); | ||
| 442 | + String appId = params.getString("appId"); | ||
| 443 | + String activityid = params.getString("activityId"); | ||
| 444 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 445 | + if (StringUtils.isEmpty(appId) || StringUtils.isEmpty(activityid)) { | ||
| 446 | + map.put("location", ""); | ||
| 447 | + rb.setData(map); | ||
| 448 | + rb.setErrorCode("500"); | ||
| 449 | + rb.setErrorMessage("启动h5活动失败"); | ||
| 450 | + return rb; | ||
| 451 | + } else { | ||
| 452 | + TLive tLive = tLiveService.selectByParams(appId, activityid); | ||
| 453 | + TChannel tchannel = tLiveService.selectChannel(tLive.getRelation_id()); | ||
| 454 | + if(tchannel!=null){ | ||
| 455 | + // 重定向到h5....... | ||
| 456 | + redirect(response, "http://ips.cnlive.com/IPS/liveplayByH5?appId="+appId+"&channelID="+tLive.getRelation_id()); | ||
| 457 | + map.put("location", ""); | ||
| 458 | + rb.setData(map); | ||
| 459 | + rb.setErrorCode("0"); | ||
| 460 | + rb.setErrorMessage("302重定向到h5"); | ||
| 461 | + return rb; | ||
| 462 | + }else{ | ||
| 463 | + map.put("location", tLive.getLive_url()); | ||
| 464 | + rb.setData(map); | ||
| 465 | + rb.setErrorCode("0"); | ||
| 466 | + rb.setErrorMessage("启动h5活动成功"); | ||
| 467 | + return rb; | ||
| 468 | + } | ||
| 469 | + } | ||
| 470 | + | ||
| 471 | + } | ||
| 472 | + | ||
| 473 | + /** | ||
| 474 | + * 2.0 获取SWF直播URL接口.md | ||
| 475 | + * | ||
| 476 | + * @param params | ||
| 477 | + * @return | ||
| 478 | + */ | ||
| 479 | + @Request.Get("/live/epg/play/swf") | ||
| 480 | + public ResultBean swfURL(Params params) { | ||
| 481 | + HttpServletResponse response = DataContext.getResponse(); | ||
| 482 | + ResultBean rb = new ResultBean(); | ||
| 483 | + String appId = params.getString("appId"); | ||
| 484 | + String activityid = params.getString("activityId"); | ||
| 485 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 486 | + if (StringUtils.isEmpty(appId) || StringUtils.isEmpty(activityid)) { | ||
| 487 | + map.put("location", ""); | ||
| 488 | + rb.setData(map); | ||
| 489 | + rb.setErrorCode("500"); | ||
| 490 | + rb.setErrorMessage("启动swf活动失败"); | ||
| 491 | + return rb; | ||
| 492 | + } else { | ||
| 493 | + TLive tLive = tLiveService.selectByParams(appId, activityid); | ||
| 494 | + TChannel tchannel = tLiveService.selectChannel(tLive.getRelation_id()); | ||
| 495 | + rb.setData(map); | ||
| 496 | + rb.setErrorCode("0"); | ||
| 497 | + if(tchannel!=null){ | ||
| 498 | + // 302重定向到swf....... | ||
| 499 | + redirect(response, "http://ips.cnlive.com/IPS/liveplayBySWF.action?appId="+appId+"&channelID="+tLive.getRelation_id()); | ||
| 500 | + map.put("location", ""); | ||
| 501 | + rb.setErrorMessage("302重定向到swf"); | ||
| 502 | + return rb; | ||
| 503 | + }else{ | ||
| 504 | + | ||
| 505 | + map.put("location", tLive.getLive_url()); | ||
| 506 | + rb.setErrorMessage("启动swf活动成功"); | ||
| 507 | + return rb; | ||
| 508 | + } | ||
| 509 | + } | ||
| 510 | + | ||
| 511 | + } | ||
| 512 | + /** | ||
| 513 | + * 2.1 获取推流直播播放地址.md | ||
| 514 | + * | ||
| 515 | + * @param params | ||
| 516 | + * @return | ||
| 517 | + */ | ||
| 518 | + @Request.Get("/live/epg/play") | ||
| 519 | + public ResultBean startLiveActivity(Params params) { | ||
| 520 | + ResultBean rb = new ResultBean(); | ||
| 521 | + String appId = params.getString("appId"); | ||
| 522 | + String activityid = params.getString("activityId"); | ||
| 523 | + if (StringUtils.isEmpty(appId) || StringUtils.isEmpty(activityid)) { | ||
| 524 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 525 | + map.put("location", ""); | ||
| 526 | + rb.setData(map); | ||
| 527 | + rb.setErrorCode("500"); | ||
| 528 | + rb.setErrorMessage("启动活动失败"); | ||
| 529 | + return rb; | ||
| 530 | + } else { | ||
| 531 | + TLive tLive = tLiveService.selectByParams(appId, activityid); | ||
| 532 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 533 | + map.put("location", tLive.getLive_url()); | ||
| 534 | + rb.setData(map); | ||
| 535 | + rb.setErrorCode("0"); | ||
| 536 | + rb.setErrorMessage("启动活动成功"); | ||
| 537 | + return rb; | ||
| 538 | + } | ||
| 539 | + } | ||
| 376 | @Request.Post("/live/epg/error500") | 540 | @Request.Post("/live/epg/error500") |
| 377 | public ResultBean error(Params params) { | 541 | public ResultBean error(Params params) { |
| 378 | ResultBean rb = new ResultBean(); | 542 | ResultBean rb = new ResultBean(); |
| @@ -383,24 +547,26 @@ public class LiveAction { | @@ -383,24 +547,26 @@ public class LiveAction { | ||
| 383 | rb.setErrorMessage("失败"); | 547 | rb.setErrorMessage("失败"); |
| 384 | return rb; | 548 | return rb; |
| 385 | } | 549 | } |
| 550 | + | ||
| 551 | + public static void redirect(HttpServletResponse response, String redirectUrl) { | ||
| 552 | + try { | ||
| 553 | + response.setContentType("application/mpegurl"); | ||
| 554 | + response.setStatus(302); | ||
| 555 | + response.setHeader("Location", redirectUrl); | ||
| 556 | + response.setHeader("Connection", "close"); | ||
| 557 | + } catch (Exception e) { | ||
| 558 | + throw new RuntimeException(e); | ||
| 559 | + } | ||
| 560 | + } | ||
| 561 | + @Request.Get("/live/epg/302") | ||
| 562 | + public void red302() { | ||
| 563 | + HttpServletResponse response =DataContext.getResponse(); | ||
| 564 | + redirect(response, "http://ips.cnlive.com/IPS/liveplayBySWF.action?activityId=12345"); | ||
| 565 | + } | ||
| 386 | 566 | ||
| 387 | public static void main(String[] args) { | 567 | public static void main(String[] args) { |
| 388 | - /* | ||
| 389 | - * Map<String, Object> mapFiles = new HashMap<String, Object>(); | ||
| 390 | - * mapFiles.put("app_id", null); mapFiles.put("start_time", ""); | ||
| 391 | - * mapFiles.put("end_time",""); // TODO 活动id mapFiles.put("category", | ||
| 392 | - * ""); boolean flag = DataSet.insert(TLive.class, mapFiles); | ||
| 393 | - * System.out.println(flag); | ||
| 394 | - */ | ||
| 395 | - // String appId = params.getString("appId"); | ||
| 396 | - // String activityid = params.getString("activityid"); | ||
| 397 | - // String activityname = params.getString("activityname"); | ||
| 398 | - // int activitystatus = params.getInt("activitystatus"); | ||
| 399 | - // int isHorizontalScreen = params.getInt("isHorizontalScreen"); | ||
| 400 | - // String channelID = params.getString("channelID"); | ||
| 401 | - // NameValuePair nv1 = new NameValuePair("appId", "123"); | ||
| 402 | - // NameValuePair nv2 = new NameValuePair("activityid", "234"); | ||
| 403 | - NameValuePair[] nvp = new NameValuePair[6]; | 568 | + |
| 569 | + /*NameValuePair[] nvp = new NameValuePair[6]; | ||
| 404 | NameValuePair nv1 = new NameValuePair(); | 570 | NameValuePair nv1 = new NameValuePair(); |
| 405 | nv1.setName("appId"); | 571 | nv1.setName("appId"); |
| 406 | nv1.setValue("123"); | 572 | nv1.setValue("123"); |
| @@ -427,6 +593,10 @@ public class LiveAction { | @@ -427,6 +593,10 @@ public class LiveAction { | ||
| 427 | nvp[5] = nv6; | 593 | nvp[5] = nv6; |
| 428 | String ss = HttpReq.postRequestWidthResult("http://bc.cnlive.com/live/epg/createActivity", nvp); | 594 | String ss = HttpReq.postRequestWidthResult("http://bc.cnlive.com/live/epg/createActivity", nvp); |
| 429 | System.out.println(ss); | 595 | System.out.println(ss); |
| 596 | +<<<<<<< HEAD | ||
| 597 | + String aa = HttpReq | ||
| 598 | + .getRequestWidthResult("http://bc.cnlive.com/live/epg/startActivity?appId=123&activityId=234"); | ||
| 599 | + System.out.println(aa);*/ | ||
| 430 | String aa = HttpReq.getRequestWidthResult("http://bc.cnlive.com/live/epg/startActivity?appId=123&activityId=234"); | 600 | String aa = HttpReq.getRequestWidthResult("http://bc.cnlive.com/live/epg/startActivity?appId=123&activityId=234"); |
| 431 | System.out.println(aa); | 601 | System.out.println(aa); |
| 432 | } | 602 | } |
src/main/java/com/cnlive/mz/live/action/UserAction.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.Result; | ||
| 8 | -import org.smart4j.framework.mvc.bean.View; | ||
| 9 | - | ||
| 10 | -import com.cnlive.mz.live.entity.TLive; | ||
| 11 | -import com.cnlive.mz.live.entity.TUser; | ||
| 12 | -import com.cnlive.mz.live.service.TUserService; | ||
| 13 | - | ||
| 14 | -@Action | ||
| 15 | -public class UserAction { | ||
| 16 | - | ||
| 17 | - @Inject | ||
| 18 | - private TUserService tUserService; | ||
| 19 | - | ||
| 20 | - /** | ||
| 21 | - * 获取用户列表页 | ||
| 22 | - * | ||
| 23 | - * @param pageNumber | ||
| 24 | - * @return | ||
| 25 | - */ | ||
| 26 | - @Request.Get("/user/list/{pageNumber}") | ||
| 27 | - public View list(int pageNumber) { | ||
| 28 | - Pager<TUser> userPage = tUserService.getTUserPage(pageNumber); | ||
| 29 | - return new View("user/user_list.jsp").data("userPage", userPage); | ||
| 30 | - } | ||
| 31 | - | ||
| 32 | - @Request.Get("/user/live/{userId}/{pageNumber}") | ||
| 33 | - public View livelist(int userId, int pageNumber) { | ||
| 34 | - Pager<TLive> userPage = tUserService.getTLivePage(userId, pageNumber); | ||
| 35 | - return new View("user/user_live_list.jsp").data("userPage", userPage); | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | - @Request.Get("/user/report/{userId}/{type}") | ||
| 39 | - public Result report(int userId,String type) { | ||
| 40 | - return new Result(tUserService.addReport(userId,type)); | ||
| 41 | - } | ||
| 42 | -} | 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.Result; | ||
| 8 | +import org.smart4j.framework.mvc.bean.View; | ||
| 9 | + | ||
| 10 | +import com.cnlive.mz.live.entity.TLive; | ||
| 11 | +import com.cnlive.mz.live.entity.TUser; | ||
| 12 | +import com.cnlive.mz.live.service.TUserService; | ||
| 13 | + | ||
| 14 | +@Action | ||
| 15 | +public class UserAction { | ||
| 16 | + | ||
| 17 | + @Inject | ||
| 18 | + private TUserService tUserService; | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 获取用户列表页 | ||
| 22 | + * | ||
| 23 | + * @param pageNumber | ||
| 24 | + * @return | ||
| 25 | + */ | ||
| 26 | + @Request.Get("/user/list/{pageNumber}") | ||
| 27 | + public View list(int pageNumber) { | ||
| 28 | + Pager<TUser> userPage = tUserService.getTUserPage(pageNumber); | ||
| 29 | + return new View("user/user_list.jsp").data("userPage", userPage); | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + @Request.Get("/user/live/{userId}/{pageNumber}") | ||
| 33 | + public View livelist(int userId, int pageNumber) { | ||
| 34 | + Pager<TLive> userPage = tUserService.getTLivePage(userId, pageNumber); | ||
| 35 | + return new View("user/user_live_list.jsp").data("userPage", userPage); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Request.Get("/user/report/{userId}/{type}") | ||
| 39 | + public Result report(int userId,String type) { | ||
| 40 | + return new Result(tUserService.addReport(userId,type)); | ||
| 41 | + } | ||
| 42 | +} |
src/main/java/com/cnlive/mz/live/action/WordAction.java
| 1 | -package com.cnlive.mz.live.action; | ||
| 2 | - | ||
| 3 | -import java.util.List; | ||
| 4 | -import java.util.Map; | ||
| 5 | -import java.util.Map.Entry; | ||
| 6 | - | ||
| 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.live.entity.TRoom; | ||
| 15 | -import com.cnlive.mz.live.service.SensitiveWordService; | ||
| 16 | - | ||
| 17 | -@Action | ||
| 18 | -public class WordAction { | ||
| 19 | - | ||
| 20 | - @Inject | ||
| 21 | - private SensitiveWordService sensitiveWord; | ||
| 22 | - | ||
| 23 | - @Request.Post("/word/add") | ||
| 24 | - public Result add(Params params){ | ||
| 25 | - Map map = params.getFieldMap(); | ||
| 26 | - String str = (String) map.get("words"); | ||
| 27 | - str=str.replace(",", ",3."); | ||
| 28 | - str=str+",3."; | ||
| 29 | - return new Result(sensitiveWord.add(str)); | ||
| 30 | - } | ||
| 31 | - | ||
| 32 | - @Request.Get("/word/list") | ||
| 33 | - public View list(){ | ||
| 34 | - View view = new View("word/word_management.jsp"); | ||
| 35 | - List<String> str = sensitiveWord.list(); | ||
| 36 | - view.data("str", str); | ||
| 37 | - return view; | ||
| 38 | - } | ||
| 39 | -} | 1 | +package com.cnlive.mz.live.action; |
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | +import java.util.Map; | ||
| 5 | +import java.util.Map.Entry; | ||
| 6 | + | ||
| 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.live.entity.TRoom; | ||
| 15 | +import com.cnlive.mz.live.service.SensitiveWordService; | ||
| 16 | + | ||
| 17 | +@Action | ||
| 18 | +public class WordAction { | ||
| 19 | + | ||
| 20 | + @Inject | ||
| 21 | + private SensitiveWordService sensitiveWord; | ||
| 22 | + | ||
| 23 | + @Request.Post("/word/add") | ||
| 24 | + public Result add(Params params){ | ||
| 25 | + Map map = params.getFieldMap(); | ||
| 26 | + String str = (String) map.get("words"); | ||
| 27 | + str=str.replace(",", ",3."); | ||
| 28 | + str=str+",3."; | ||
| 29 | + return new Result(sensitiveWord.add(str)); | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + @Request.Get("/word/list") | ||
| 33 | + public View list(){ | ||
| 34 | + View view = new View("word/word_management.jsp"); | ||
| 35 | + List<String> str = sensitiveWord.list(); | ||
| 36 | + view.data("str", str); | ||
| 37 | + return view; | ||
| 38 | + } | ||
| 39 | +} |
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.ServletException; | ||
| 9 | -import javax.servlet.ServletRequest; | ||
| 10 | -import javax.servlet.ServletResponse; | ||
| 11 | -import javax.servlet.annotation.WebFilter; | ||
| 12 | -import javax.servlet.http.HttpServletRequest; | ||
| 13 | -import javax.servlet.http.HttpServletResponse; | ||
| 14 | -import javax.servlet.http.HttpSession; | ||
| 15 | - | ||
| 16 | -import org.smart4j.framework.core.ConfigHelper; | ||
| 17 | - | ||
| 18 | -import com.cnlive.mz.live.common.LiveUtils; | ||
| 19 | - | ||
| 20 | -/* | ||
| 21 | - * | ||
| 22 | - | ||
| 23 | - 属性 是否必须 说明 | ||
| 24 | - asyncSupported 否 该Filter是否支持异步操作模式 | ||
| 25 | - dispatcherType 否 指定Filter对那种dispatcher模式进行过滤 该属性支持 Async,Error Forward,include,request | ||
| 26 | - displayName 否 File 显示的名称 | ||
| 27 | - filterName 是 Filter的名称 | ||
| 28 | - initParams 否 Filter的配置参数 | ||
| 29 | - servletNames 否 可以指定多个,表示对这几个特定的的serlet 进行过滤 | ||
| 30 | - urlPatterns/value 否 指定 Filter拦截的 URL | ||
| 31 | - | ||
| 32 | - | ||
| 33 | - | ||
| 34 | - | ||
| 35 | - @WebFilter(filterName="log",urlPatterns={"/*"})*/ | ||
| 36 | -@WebFilter(filterName = "AuthFilter", urlPatterns = { "/activity/*", "/channel/*", "/signal/*", "/index/*", | ||
| 37 | - "/switch/*", "/doswitch/*", "/wowza/*" }) | ||
| 38 | -public class AuthFilter implements Filter { | ||
| 39 | - | ||
| 40 | - private FilterConfig config; | ||
| 41 | - | ||
| 42 | - @Override | ||
| 43 | - public void destroy() { | ||
| 44 | - this.config = null; | ||
| 45 | - } | ||
| 46 | - | ||
| 47 | - @Override | ||
| 48 | - public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain chain) throws IOException, | ||
| 49 | - ServletException { | ||
| 50 | - HttpServletRequest request = (HttpServletRequest) arg0; | ||
| 51 | - HttpServletResponse response = (HttpServletResponse) arg1; | ||
| 52 | - String requestUrl = request.getRequestURI(); | ||
| 53 | - HttpSession session = request.getSession(); | ||
| 54 | - String webUrl = ConfigHelper.getString("website.url"); | ||
| 55 | - String a=(String) session.getAttribute(LiveUtils.SESSION_KEY_NAME) ; | ||
| 56 | - if (a== null) { | ||
| 57 | - boolean authEnable = ConfigHelper.getBoolean("auth.enable"); | ||
| 58 | - String loginUrl = ConfigHelper.getString("auth.login.url"); | ||
| 59 | - if (authEnable) { | ||
| 60 | - //去登录认证 | ||
| 61 | - String url=loginUrl + webUrl+"/login/success"; | ||
| 62 | - response.sendRedirect(url); | ||
| 63 | - return; | ||
| 64 | - } else { | ||
| 65 | - String userName = "liujicheng"; | ||
| 66 | - request.getSession().setAttribute(LiveUtils.SESSION_KEY_NAME, userName); | ||
| 67 | - request.getSession().setAttribute(LiveUtils.SESSION_KEY_ID, 1); | ||
| 68 | - } | ||
| 69 | - } else { | ||
| 70 | - chain.doFilter(arg0, arg1); | ||
| 71 | - } | ||
| 72 | - // 验证用户是否是退出,进行sessioin销毁 | ||
| 73 | - if (requestUrl.contains("logout")) { | ||
| 74 | - String logoutUrl = ConfigHelper.getString("auth.logout.url"); | ||
| 75 | - session.removeAttribute(LiveUtils.SESSION_KEY_NAME); | ||
| 76 | - session.removeAttribute(LiveUtils.SESSION_KEY_ID); | ||
| 77 | - session.invalidate(); | ||
| 78 | - response.sendRedirect(logoutUrl); | ||
| 79 | - } | ||
| 80 | - } | ||
| 81 | - | ||
| 82 | - @Override | ||
| 83 | - public void init(FilterConfig config) throws ServletException { | ||
| 84 | - this.config = config; | ||
| 85 | - } | ||
| 86 | - | ||
| 87 | -} | 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.ServletException; | ||
| 9 | +import javax.servlet.ServletRequest; | ||
| 10 | +import javax.servlet.ServletResponse; | ||
| 11 | +import javax.servlet.annotation.WebFilter; | ||
| 12 | +import javax.servlet.http.HttpServletRequest; | ||
| 13 | +import javax.servlet.http.HttpServletResponse; | ||
| 14 | +import javax.servlet.http.HttpSession; | ||
| 15 | + | ||
| 16 | +import org.smart4j.framework.core.ConfigHelper; | ||
| 17 | + | ||
| 18 | +import com.cnlive.mz.live.common.LiveUtils; | ||
| 19 | + | ||
| 20 | +/* | ||
| 21 | + * | ||
| 22 | + | ||
| 23 | + 属性 是否必须 说明 | ||
| 24 | + asyncSupported 否 该Filter是否支持异步操作模式 | ||
| 25 | + dispatcherType 否 指定Filter对那种dispatcher模式进行过滤 该属性支持 Async,Error Forward,include,request | ||
| 26 | + displayName 否 File 显示的名称 | ||
| 27 | + filterName 是 Filter的名称 | ||
| 28 | + initParams 否 Filter的配置参数 | ||
| 29 | + servletNames 否 可以指定多个,表示对这几个特定的的serlet 进行过滤 | ||
| 30 | + urlPatterns/value 否 指定 Filter拦截的 URL | ||
| 31 | + | ||
| 32 | + | ||
| 33 | + | ||
| 34 | + | ||
| 35 | + @WebFilter(filterName="log",urlPatterns={"/*"})*/ | ||
| 36 | +@WebFilter(filterName = "AuthFilter", urlPatterns = { "/activity/*", "/channel/*", "/signal/*", "/index/*", | ||
| 37 | + "/switch/*", "/doswitch/*", "/wowza/*" }) | ||
| 38 | +public class AuthFilter implements Filter { | ||
| 39 | + | ||
| 40 | + private FilterConfig config; | ||
| 41 | + | ||
| 42 | + @Override | ||
| 43 | + public void destroy() { | ||
| 44 | + this.config = null; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + @Override | ||
| 48 | + public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain chain) throws IOException, | ||
| 49 | + ServletException { | ||
| 50 | + HttpServletRequest request = (HttpServletRequest) arg0; | ||
| 51 | + HttpServletResponse response = (HttpServletResponse) arg1; | ||
| 52 | + String requestUrl = request.getRequestURI(); | ||
| 53 | + HttpSession session = request.getSession(); | ||
| 54 | + String webUrl = ConfigHelper.getString("website.url"); | ||
| 55 | + String a=(String) session.getAttribute(LiveUtils.SESSION_KEY_NAME) ; | ||
| 56 | + if (a== null) { | ||
| 57 | + boolean authEnable = ConfigHelper.getBoolean("auth.enable"); | ||
| 58 | + String loginUrl = ConfigHelper.getString("auth.login.url"); | ||
| 59 | + if (authEnable) { | ||
| 60 | + //去登录认证 | ||
| 61 | + String url=loginUrl + webUrl+"/login/success"; | ||
| 62 | + response.sendRedirect(url); | ||
| 63 | + return; | ||
| 64 | + } else { | ||
| 65 | + String userName = "liujicheng"; | ||
| 66 | + request.getSession().setAttribute(LiveUtils.SESSION_KEY_NAME, userName); | ||
| 67 | + request.getSession().setAttribute(LiveUtils.SESSION_KEY_ID, 1); | ||
| 68 | + } | ||
| 69 | + } else { | ||
| 70 | + chain.doFilter(arg0, arg1); | ||
| 71 | + } | ||
| 72 | + // 验证用户是否是退出,进行sessioin销毁 | ||
| 73 | + if (requestUrl.contains("logout")) { | ||
| 74 | + String logoutUrl = ConfigHelper.getString("auth.logout.url"); | ||
| 75 | + session.removeAttribute(LiveUtils.SESSION_KEY_NAME); | ||
| 76 | + session.removeAttribute(LiveUtils.SESSION_KEY_ID); | ||
| 77 | + session.invalidate(); | ||
| 78 | + response.sendRedirect(logoutUrl); | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + @Override | ||
| 83 | + public void init(FilterConfig config) throws ServletException { | ||
| 84 | + this.config = config; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | +} |
src/main/java/com/cnlive/mz/live/rest/BaseUtil.java
| 1 | -package com.cnlive.mz.live.rest; | ||
| 2 | - | ||
| 3 | -import java.io.BufferedReader; | ||
| 4 | -import java.io.IOException; | ||
| 5 | -import java.io.InputStreamReader; | ||
| 6 | -import java.io.PrintWriter; | ||
| 7 | -import java.io.UnsupportedEncodingException; | ||
| 8 | -import java.net.URL; | ||
| 9 | -import java.net.URLConnection; | ||
| 10 | -import java.security.MessageDigest; | ||
| 11 | -import java.text.DateFormat; | ||
| 12 | -import java.text.ParseException; | ||
| 13 | -import java.text.SimpleDateFormat; | ||
| 14 | -import java.util.Calendar; | ||
| 15 | -import java.util.Date; | ||
| 16 | -import java.util.Locale; | ||
| 17 | -import java.util.UUID; | ||
| 18 | - | ||
| 19 | -import javax.crypto.Mac; | ||
| 20 | -import javax.crypto.spec.SecretKeySpec; | ||
| 21 | - | ||
| 22 | -import org.apache.commons.codec.binary.Base64; | ||
| 23 | - | ||
| 24 | -import com.cnlive.mz.commons.net.HttpReq; | ||
| 25 | - | ||
| 26 | -import sun.misc.BASE64Encoder; | ||
| 27 | - | ||
| 28 | -public class BaseUtil { | ||
| 29 | - | ||
| 30 | - private static final String ENCODING = "UTF-8"; | ||
| 31 | - | ||
| 32 | - // AccessKey、SecretKey | ||
| 33 | - private static final String SECRET_KEY = "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; | ||
| 34 | - private static final String ACCESS_KEY = "fWUN8KDtJZJGo0ArQ4qo"; | ||
| 35 | - | ||
| 36 | - /* | ||
| 37 | - * 计算MD5+BASE64 | ||
| 38 | - */ | ||
| 39 | - public static String MD5Base64(String s) { | ||
| 40 | - if (s == null) | ||
| 41 | - return null; | ||
| 42 | - String encodeStr = ""; | ||
| 43 | - byte[] utfBytes = s.getBytes(); | ||
| 44 | - MessageDigest mdTemp; | ||
| 45 | - try { | ||
| 46 | - mdTemp = MessageDigest.getInstance("MD5"); | ||
| 47 | - mdTemp.update(utfBytes); | ||
| 48 | - byte[] md5Bytes = mdTemp.digest(); | ||
| 49 | - BASE64Encoder b64Encoder = new BASE64Encoder(); | ||
| 50 | - encodeStr = b64Encoder.encode(md5Bytes); | ||
| 51 | - } catch (Exception e) { | ||
| 52 | - throw new Error("Failed to generate MD5 : " + e.getMessage()); | ||
| 53 | - } | ||
| 54 | - return encodeStr; | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - /* | ||
| 58 | - * 哈希计算 HMAC-SHA1 base64 | ||
| 59 | - */ | ||
| 60 | - public static String HMACSha1(String data, String key) { | ||
| 61 | - String result; | ||
| 62 | - try { | ||
| 63 | - SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(), "HmacSHA1"); | ||
| 64 | - Mac mac = Mac.getInstance("HmacSHA1"); | ||
| 65 | - mac.init(signingKey); | ||
| 66 | - byte[] rawHmac = mac.doFinal(data.getBytes()); | ||
| 67 | - // result = new String(Base64.encodeBase64(rawHmac, false), ENCODING); | ||
| 68 | - // result = (new BASE64Encoder()).encode(rawHmac); | ||
| 69 | - result = new String(Base64.encodeBase64(rawHmac), ENCODING); | ||
| 70 | - } catch (Exception e) { | ||
| 71 | - throw new Error("Failed to generate HMAC : " + e.getMessage()); | ||
| 72 | - } | ||
| 73 | - return result; | ||
| 74 | - } | ||
| 75 | - | ||
| 76 | - /** | ||
| 77 | - * 获取当前前一天的时间戳 | ||
| 78 | - * | ||
| 79 | - * @return | ||
| 80 | - */ | ||
| 81 | - public static String getTimestamp() { | ||
| 82 | - DateFormat df = new SimpleDateFormat("yyyyMMdd"); | ||
| 83 | - Date date = null; | ||
| 84 | - try { | ||
| 85 | - Calendar calendar = Calendar.getInstance(); | ||
| 86 | - calendar.add(Calendar.DATE, +1); | ||
| 87 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); | ||
| 88 | - String motoday = sdf.format(calendar.getTime()); | ||
| 89 | - date = df.parse(motoday); | ||
| 90 | - } catch (ParseException e) { | ||
| 91 | - e.printStackTrace(); | ||
| 92 | - } | ||
| 93 | - Calendar cal = Calendar.getInstance(); | ||
| 94 | - cal.setTime(date); | ||
| 95 | - long timestamp = cal.getTimeInMillis(); | ||
| 96 | - System.out.println("------timestamp-----" + timestamp); | ||
| 97 | - return String.valueOf(timestamp); | ||
| 98 | - | ||
| 99 | - } | ||
| 100 | - | ||
| 101 | - /** | ||
| 102 | - * 签名算法:signature 字符串格式,由三部分组成:GET+”\n”+Expire+”\n”+Resource 2016 0602171212 | ||
| 103 | - * | ||
| 104 | - * @return | ||
| 105 | - * @throws UnsupportedEncodingException | ||
| 106 | - */ | ||
| 107 | - public static String signature(String streamName) throws UnsupportedEncodingException { | ||
| 108 | - | ||
| 109 | - String method = "GET"; | ||
| 110 | - String expire = BaseUtil.getTimestamp(); | ||
| 111 | - String app = "live"; | ||
| 112 | - String methodadd = "add"; | ||
| 113 | - String name = streamName; | ||
| 114 | - app = java.net.URLEncoder.encode(app, "utf-8"); | ||
| 115 | - methodadd = java.net.URLEncoder.encode(methodadd, "utf-8"); | ||
| 116 | - name = java.net.URLEncoder.encode(name, "utf-8"); | ||
| 117 | - System.out.println(expire + "---expire----"); | ||
| 118 | - String Resource = "app=" + app + "&method=" + methodadd + "&name=" + name; | ||
| 119 | - // Resource = java.net.URLEncoder.encode(Resource, "utf-8"); | ||
| 120 | - String stringToSign = method + "\n" + expire + "\n" + Resource; | ||
| 121 | - System.out.println("--stringToSign--" + stringToSign); | ||
| 122 | - // 2.计算 HMAC-SHA1 | ||
| 123 | - String signature = HMACSha1(stringToSign, SECRET_KEY); | ||
| 124 | - System.out.println("---signature---" + signature); | ||
| 125 | - signature = java.net.URLEncoder.encode(signature, "utf-8"); | ||
| 126 | - return signature; | ||
| 127 | - } | ||
| 128 | - | ||
| 129 | - public static String signature(String methodName, String streamName) throws UnsupportedEncodingException { | ||
| 130 | - | ||
| 131 | - String method = "GET"; | ||
| 132 | - String expire = BaseUtil.getTimestamp(); | ||
| 133 | - String app = "live"; | ||
| 134 | - app = java.net.URLEncoder.encode(app, "utf-8"); | ||
| 135 | - methodName = java.net.URLEncoder.encode(methodName, "utf-8"); | ||
| 136 | - streamName = java.net.URLEncoder.encode(streamName, "utf-8"); | ||
| 137 | - System.out.println(expire + "---expire----"); | ||
| 138 | - String Resource = "app=" + app + "&method=" + methodName + "&name=" + streamName; | ||
| 139 | - // Resource = java.net.URLEncoder.encode(Resource, "utf-8"); | ||
| 140 | - String stringToSign = method + "\n" + expire + "\n" + Resource; | ||
| 141 | - System.out.println("--stringToSign--" + stringToSign); | ||
| 142 | - // 2.计算 HMAC-SHA1 | ||
| 143 | - String signature = HMACSha1(stringToSign, SECRET_KEY); | ||
| 144 | - System.out.println("---signature---" + signature); | ||
| 145 | - signature = java.net.URLEncoder.encode(signature, "utf-8"); | ||
| 146 | - return signature; | ||
| 147 | - } | ||
| 148 | - | ||
| 149 | - public static String UUid() { | ||
| 150 | - | ||
| 151 | - String uuid = UUID.randomUUID().toString(); | ||
| 152 | - uuid = uuid.replaceAll("-", ""); | ||
| 153 | - return uuid; | ||
| 154 | - } | ||
| 155 | - | ||
| 156 | - public static String getAccessKey() { | ||
| 157 | - return ACCESS_KEY; | ||
| 158 | - } | ||
| 159 | - | ||
| 160 | - public static int random_7(int number) { | ||
| 161 | - int x = (int) (Math.random() * 10); | ||
| 162 | - for (int i = 0; i < number; i++) { | ||
| 163 | - String num = Math.random() * 10 + ""; | ||
| 164 | - } | ||
| 165 | - return x; | ||
| 166 | - } | ||
| 167 | - | ||
| 168 | - /* | ||
| 169 | - * 等同于javaScript中的 new Date().toUTCString(); | ||
| 170 | - */ | ||
| 171 | - public static String toGMTString(Date date) { | ||
| 172 | - SimpleDateFormat df = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss z", Locale.UK); | ||
| 173 | - df.setTimeZone(new java.util.SimpleTimeZone(0, "GMT")); | ||
| 174 | - return df.format(date); | ||
| 175 | - } | ||
| 176 | - | ||
| 177 | - /* | ||
| 178 | - * 发送POST请求 | ||
| 179 | - */ | ||
| 180 | - public static String sendPost(String url, String body, String ak_id, String ak_secret) { | ||
| 181 | - PrintWriter out = null; | ||
| 182 | - BufferedReader in = null; | ||
| 183 | - String result = ""; | ||
| 184 | - try { | ||
| 185 | - URL realUrl = new URL(url); | ||
| 186 | - | ||
| 187 | - /* | ||
| 188 | - * http header 参数 | ||
| 189 | - */ | ||
| 190 | - String method = "POST"; | ||
| 191 | - String accept = "json"; | ||
| 192 | - String content_type = "application/json"; | ||
| 193 | - String path = realUrl.getFile(); | ||
| 194 | - String date = toGMTString(new Date()); | ||
| 195 | - | ||
| 196 | - // 1.对body做MD5+BASE64加密 | ||
| 197 | - String bodyMd5 = MD5Base64(body); | ||
| 198 | - String stringToSign = method + "\n" + accept + "\n" + bodyMd5 + "\n" + content_type + "\n" + date + "\n" | ||
| 199 | - + path; | ||
| 200 | - // 2.计算 HMAC-SHA1 | ||
| 201 | - String signature = HMACSha1(stringToSign, ak_secret); | ||
| 202 | - // 3.得到 authorization header | ||
| 203 | - String authHeader = "Dataplus " + ak_id + ":" + signature; | ||
| 204 | - | ||
| 205 | - // 打开和URL之间的连接 | ||
| 206 | - URLConnection conn = realUrl.openConnection(); | ||
| 207 | - // 设置通用的请求属性 | ||
| 208 | - conn.setRequestProperty("accept", accept); | ||
| 209 | - conn.setRequestProperty("content-type", content_type); | ||
| 210 | - conn.setRequestProperty("date", date); | ||
| 211 | - conn.setRequestProperty("Authorization", authHeader); | ||
| 212 | - // 发送POST请求必须设置如下两行 | ||
| 213 | - conn.setDoOutput(true); | ||
| 214 | - conn.setDoInput(true); | ||
| 215 | - // 获取URLConnection对象对应的输出流 | ||
| 216 | - out = new PrintWriter(conn.getOutputStream()); | ||
| 217 | - // 发送请求参数 | ||
| 218 | - out.print(body); | ||
| 219 | - // flush输出流的缓冲 | ||
| 220 | - out.flush(); | ||
| 221 | - // 定义BufferedReader输入流来读取URL的响应 | ||
| 222 | - in = new BufferedReader(new InputStreamReader(conn.getInputStream())); | ||
| 223 | - String line; | ||
| 224 | - while ((line = in.readLine()) != null) { | ||
| 225 | - result += line; | ||
| 226 | - } | ||
| 227 | - } catch (Exception e) { | ||
| 228 | - System.out.println("发送 POST 请求出现异常!" + e); | ||
| 229 | - e.printStackTrace(); | ||
| 230 | - } | ||
| 231 | - // 使用finally块来关闭输出流、输入流 | ||
| 232 | - finally { | ||
| 233 | - try { | ||
| 234 | - if (out != null) { | ||
| 235 | - out.close(); | ||
| 236 | - } | ||
| 237 | - if (in != null) { | ||
| 238 | - in.close(); | ||
| 239 | - } | ||
| 240 | - } catch (IOException ex) { | ||
| 241 | - ex.printStackTrace(); | ||
| 242 | - } | ||
| 243 | - } | ||
| 244 | - return result; | ||
| 245 | - } | ||
| 246 | - | ||
| 247 | - /* | ||
| 248 | - * GET请求 | ||
| 249 | - */ | ||
| 250 | - | ||
| 251 | - public static String sendGet(String url, String ak_id, String ak_secret) { | ||
| 252 | - String result = ""; | ||
| 253 | - BufferedReader in = null; | ||
| 254 | - try { | ||
| 255 | - URL realUrl = new URL(url); | ||
| 256 | - /* | ||
| 257 | - * http header 参数 | ||
| 258 | - */ | ||
| 259 | - // String method = "GET"; | ||
| 260 | - // String Expire = "1436976000"; | ||
| 261 | - // String Resource = | ||
| 262 | - // "nonce=4e1f2519c626cbfbab1520c255830c26&public=0&vdoid=12345"; | ||
| 263 | - // String content_type = "application/json"; | ||
| 264 | - // String path = realUrl.getFile(); | ||
| 265 | - // String date = toGMTString(new Date()); | ||
| 266 | - // // 1.对body做MD5+BASE64加密 | ||
| 267 | - // // String bodyMd5 = MD5Base64(body); | ||
| 268 | - // String stringToSign = method + "\n" + Expire + "\n" + Resource; | ||
| 269 | - // // 2.计算 HMAC-SHA1 | ||
| 270 | - // String signature = HMACSha1(stringToSign, ak_secret); | ||
| 271 | - // // 3.得到 authorization header | ||
| 272 | - // String authHeader = "Dataplus " + ak_id + ":" + signature; | ||
| 273 | - // 打开和URL之间的连接 | ||
| 274 | - URLConnection connection = realUrl.openConnection(); | ||
| 275 | - // 设置通用的请求属性 | ||
| 276 | - // connection.setRequestProperty("accept", "json"); | ||
| 277 | - // connection.setRequestProperty("content-type", content_type); | ||
| 278 | - // connection.setRequestProperty("date", date); | ||
| 279 | - // connection.setRequestProperty("Authorization", authHeader); | ||
| 280 | - // 建立实际的连接 | ||
| 281 | - connection.connect(); | ||
| 282 | - // 定义 BufferedReader输入流来读取URL的响应 | ||
| 283 | - in = new BufferedReader(new InputStreamReader(connection.getInputStream())); | ||
| 284 | - String line; | ||
| 285 | - while ((line = in.readLine()) != null) { | ||
| 286 | - result += line; | ||
| 287 | - } | ||
| 288 | - } catch (Exception e) { | ||
| 289 | - System.out.println("发送GET请求出现异常!" + e); | ||
| 290 | - e.printStackTrace(); | ||
| 291 | - } | ||
| 292 | - // 使用finally块来关闭输入流 | ||
| 293 | - finally { | ||
| 294 | - try { | ||
| 295 | - if (in != null) { | ||
| 296 | - in.close(); | ||
| 297 | - } | ||
| 298 | - } catch (Exception e) { | ||
| 299 | - e.printStackTrace(); | ||
| 300 | - } | ||
| 301 | - } | ||
| 302 | - return result; | ||
| 303 | - } | ||
| 304 | - | ||
| 305 | - public static void main(String[] args) throws Exception { | ||
| 306 | - // 发送POST请求示例 | ||
| 307 | - /* | ||
| 308 | - * String ak_id = "fWUN8KDtJZJGo0ArQ4qo"; // 用户ak String ak_secret = | ||
| 309 | - * "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; // 用户ak_secret String url | ||
| 310 | - * = "https://kmr-cn-beijing.ksyun.com"; String body = | ||
| 311 | - * "{\"param1\": \"GET\n1436976000\nnonce=4e1f2519c626cbfbab1520c255830c26&public=0&vdoid=12345\", \"param2\":\"fWUN8KDtJZJGo0ArQ4qo\"}" | ||
| 312 | - * ; System.out.println("response body:" + sendPost(url, body, AK_ID, | ||
| 313 | - * AK_SECRET)); | ||
| 314 | - */ | ||
| 315 | - | ||
| 316 | - Date date = new Date(); | ||
| 317 | - System.out.println(toGMTString(date)); | ||
| 318 | - String hh = HMACSha1("GET\n1436976124\nnonce=4e1f2519c626cbfbab1520c255830c26&public=1&vdoid=1", | ||
| 319 | - "fWUN8KDtJZJGo0ArQ4qo"); | ||
| 320 | - String hhhh = MD5Base64(hh); | ||
| 321 | - System.out.println(hh); | ||
| 322 | - System.out.println(".............."); | ||
| 323 | - | ||
| 324 | - // String str = signature(); | ||
| 325 | - // System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= | ||
| 326 | - | ||
| 327 | - // 发送GET请求 | ||
| 328 | - String url1 = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=iDPKaesXXW3A26CScNyjpNkzxZs%3D&accesskey=I3TC8a4xboPUMe5xlp22&expire=1483200000&app=live&method=add&stream=310166_863"; | ||
| 329 | - System.out.println("response body:" + sendGet(url1, ACCESS_KEY, SECRET_KEY)); | ||
| 330 | - | ||
| 331 | - // long d = getTimestamp(); | ||
| 332 | - // System.out.println(d); | ||
| 333 | - | ||
| 334 | - // String str = signature(); | ||
| 335 | - // System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= | ||
| 336 | - /* | ||
| 337 | - * // 发送GET请求 String ak_id1 = "fWUN8KDtJZJGo0ArQ4qo"; //用户ak String | ||
| 338 | - * ak_secret1 = "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; // | ||
| 339 | - * 用户ak_secret String url1 = | ||
| 340 | - * "http://cnlive.uplive.ks-cdn.com?signature=L2muBoImPzyvwyzfBtGXEu+wRNE=&accesskey=fWUN8KDtJZJGo0ArQ4qo&expire=1436976000&method=add&app=live&name=498122_57"; | ||
| 341 | - * System.out.println("response body:" +sendGet(url1, ak_id1, | ||
| 342 | - * ak_secret1)); | ||
| 343 | - */ | ||
| 344 | - // long d = getTimestamp(); | ||
| 345 | - // System.out.println(d); | ||
| 346 | - | ||
| 347 | - } | ||
| 348 | -} | 1 | +package com.cnlive.mz.live.rest; |
| 2 | + | ||
| 3 | +import java.io.BufferedReader; | ||
| 4 | +import java.io.IOException; | ||
| 5 | +import java.io.InputStreamReader; | ||
| 6 | +import java.io.PrintWriter; | ||
| 7 | +import java.io.UnsupportedEncodingException; | ||
| 8 | +import java.net.URL; | ||
| 9 | +import java.net.URLConnection; | ||
| 10 | +import java.security.MessageDigest; | ||
| 11 | +import java.text.DateFormat; | ||
| 12 | +import java.text.ParseException; | ||
| 13 | +import java.text.SimpleDateFormat; | ||
| 14 | +import java.util.Calendar; | ||
| 15 | +import java.util.Date; | ||
| 16 | +import java.util.Locale; | ||
| 17 | +import java.util.UUID; | ||
| 18 | + | ||
| 19 | +import javax.crypto.Mac; | ||
| 20 | +import javax.crypto.spec.SecretKeySpec; | ||
| 21 | + | ||
| 22 | +import org.apache.commons.codec.binary.Base64; | ||
| 23 | + | ||
| 24 | +import com.cnlive.mz.commons.net.HttpReq; | ||
| 25 | + | ||
| 26 | +import sun.misc.BASE64Encoder; | ||
| 27 | + | ||
| 28 | +public class BaseUtil { | ||
| 29 | + | ||
| 30 | + private static final String ENCODING = "UTF-8"; | ||
| 31 | + | ||
| 32 | + // AccessKey、SecretKey | ||
| 33 | + private static final String SECRET_KEY = "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; | ||
| 34 | + private static final String ACCESS_KEY = "fWUN8KDtJZJGo0ArQ4qo"; | ||
| 35 | + | ||
| 36 | + /* | ||
| 37 | + * 计算MD5+BASE64 | ||
| 38 | + */ | ||
| 39 | + public static String MD5Base64(String s) { | ||
| 40 | + if (s == null) | ||
| 41 | + return null; | ||
| 42 | + String encodeStr = ""; | ||
| 43 | + byte[] utfBytes = s.getBytes(); | ||
| 44 | + MessageDigest mdTemp; | ||
| 45 | + try { | ||
| 46 | + mdTemp = MessageDigest.getInstance("MD5"); | ||
| 47 | + mdTemp.update(utfBytes); | ||
| 48 | + byte[] md5Bytes = mdTemp.digest(); | ||
| 49 | + BASE64Encoder b64Encoder = new BASE64Encoder(); | ||
| 50 | + encodeStr = b64Encoder.encode(md5Bytes); | ||
| 51 | + } catch (Exception e) { | ||
| 52 | + throw new Error("Failed to generate MD5 : " + e.getMessage()); | ||
| 53 | + } | ||
| 54 | + return encodeStr; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + /* | ||
| 58 | + * 哈希计算 HMAC-SHA1 base64 | ||
| 59 | + */ | ||
| 60 | + public static String HMACSha1(String data, String key) { | ||
| 61 | + String result; | ||
| 62 | + try { | ||
| 63 | + SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(), "HmacSHA1"); | ||
| 64 | + Mac mac = Mac.getInstance("HmacSHA1"); | ||
| 65 | + mac.init(signingKey); | ||
| 66 | + byte[] rawHmac = mac.doFinal(data.getBytes()); | ||
| 67 | + // result = new String(Base64.encodeBase64(rawHmac, false), ENCODING); | ||
| 68 | + // result = (new BASE64Encoder()).encode(rawHmac); | ||
| 69 | + result = new String(Base64.encodeBase64(rawHmac), ENCODING); | ||
| 70 | + } catch (Exception e) { | ||
| 71 | + throw new Error("Failed to generate HMAC : " + e.getMessage()); | ||
| 72 | + } | ||
| 73 | + return result; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + /** | ||
| 77 | + * 获取当前前一天的时间戳 | ||
| 78 | + * | ||
| 79 | + * @return | ||
| 80 | + */ | ||
| 81 | + public static String getTimestamp() { | ||
| 82 | + DateFormat df = new SimpleDateFormat("yyyyMMdd"); | ||
| 83 | + Date date = null; | ||
| 84 | + try { | ||
| 85 | + Calendar calendar = Calendar.getInstance(); | ||
| 86 | + calendar.add(Calendar.DATE, +1); | ||
| 87 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); | ||
| 88 | + String motoday = sdf.format(calendar.getTime()); | ||
| 89 | + date = df.parse(motoday); | ||
| 90 | + } catch (ParseException e) { | ||
| 91 | + e.printStackTrace(); | ||
| 92 | + } | ||
| 93 | + Calendar cal = Calendar.getInstance(); | ||
| 94 | + cal.setTime(date); | ||
| 95 | + long timestamp = cal.getTimeInMillis(); | ||
| 96 | + System.out.println("------timestamp-----" + timestamp); | ||
| 97 | + return String.valueOf(timestamp); | ||
| 98 | + | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + /** | ||
| 102 | + * 签名算法:signature 字符串格式,由三部分组成:GET+”\n”+Expire+”\n”+Resource 2016 0602171212 | ||
| 103 | + * | ||
| 104 | + * @return | ||
| 105 | + * @throws UnsupportedEncodingException | ||
| 106 | + */ | ||
| 107 | + public static String signature(String streamName) throws UnsupportedEncodingException { | ||
| 108 | + | ||
| 109 | + String method = "GET"; | ||
| 110 | + String expire = BaseUtil.getTimestamp(); | ||
| 111 | + String app = "live"; | ||
| 112 | + String methodadd = "add"; | ||
| 113 | + String name = streamName; | ||
| 114 | + app = java.net.URLEncoder.encode(app, "utf-8"); | ||
| 115 | + methodadd = java.net.URLEncoder.encode(methodadd, "utf-8"); | ||
| 116 | + name = java.net.URLEncoder.encode(name, "utf-8"); | ||
| 117 | + System.out.println(expire + "---expire----"); | ||
| 118 | + String Resource = "app=" + app + "&method=" + methodadd + "&name=" + name; | ||
| 119 | + // Resource = java.net.URLEncoder.encode(Resource, "utf-8"); | ||
| 120 | + String stringToSign = method + "\n" + expire + "\n" + Resource; | ||
| 121 | + System.out.println("--stringToSign--" + stringToSign); | ||
| 122 | + // 2.计算 HMAC-SHA1 | ||
| 123 | + String signature = HMACSha1(stringToSign, SECRET_KEY); | ||
| 124 | + System.out.println("---signature---" + signature); | ||
| 125 | + signature = java.net.URLEncoder.encode(signature, "utf-8"); | ||
| 126 | + return signature; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + public static String signature(String methodName, String streamName) throws UnsupportedEncodingException { | ||
| 130 | + | ||
| 131 | + String method = "GET"; | ||
| 132 | + String expire = BaseUtil.getTimestamp(); | ||
| 133 | + String app = "live"; | ||
| 134 | + app = java.net.URLEncoder.encode(app, "utf-8"); | ||
| 135 | + methodName = java.net.URLEncoder.encode(methodName, "utf-8"); | ||
| 136 | + streamName = java.net.URLEncoder.encode(streamName, "utf-8"); | ||
| 137 | + System.out.println(expire + "---expire----"); | ||
| 138 | + String Resource = "app=" + app + "&method=" + methodName + "&name=" + streamName; | ||
| 139 | + // Resource = java.net.URLEncoder.encode(Resource, "utf-8"); | ||
| 140 | + String stringToSign = method + "\n" + expire + "\n" + Resource; | ||
| 141 | + System.out.println("--stringToSign--" + stringToSign); | ||
| 142 | + // 2.计算 HMAC-SHA1 | ||
| 143 | + String signature = HMACSha1(stringToSign, SECRET_KEY); | ||
| 144 | + System.out.println("---signature---" + signature); | ||
| 145 | + signature = java.net.URLEncoder.encode(signature, "utf-8"); | ||
| 146 | + return signature; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + public static String UUid() { | ||
| 150 | + | ||
| 151 | + String uuid = UUID.randomUUID().toString(); | ||
| 152 | + uuid = uuid.replaceAll("-", ""); | ||
| 153 | + return uuid; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + public static String getAccessKey() { | ||
| 157 | + return ACCESS_KEY; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + public static int random_7(int number) { | ||
| 161 | + int x = (int) (Math.random() * 10); | ||
| 162 | + for (int i = 0; i < number; i++) { | ||
| 163 | + String num = Math.random() * 10 + ""; | ||
| 164 | + } | ||
| 165 | + return x; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + /* | ||
| 169 | + * 等同于javaScript中的 new Date().toUTCString(); | ||
| 170 | + */ | ||
| 171 | + public static String toGMTString(Date date) { | ||
| 172 | + SimpleDateFormat df = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss z", Locale.UK); | ||
| 173 | + df.setTimeZone(new java.util.SimpleTimeZone(0, "GMT")); | ||
| 174 | + return df.format(date); | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + /* | ||
| 178 | + * 发送POST请求 | ||
| 179 | + */ | ||
| 180 | + public static String sendPost(String url, String body, String ak_id, String ak_secret) { | ||
| 181 | + PrintWriter out = null; | ||
| 182 | + BufferedReader in = null; | ||
| 183 | + String result = ""; | ||
| 184 | + try { | ||
| 185 | + URL realUrl = new URL(url); | ||
| 186 | + | ||
| 187 | + /* | ||
| 188 | + * http header 参数 | ||
| 189 | + */ | ||
| 190 | + String method = "POST"; | ||
| 191 | + String accept = "json"; | ||
| 192 | + String content_type = "application/json"; | ||
| 193 | + String path = realUrl.getFile(); | ||
| 194 | + String date = toGMTString(new Date()); | ||
| 195 | + | ||
| 196 | + // 1.对body做MD5+BASE64加密 | ||
| 197 | + String bodyMd5 = MD5Base64(body); | ||
| 198 | + String stringToSign = method + "\n" + accept + "\n" + bodyMd5 + "\n" + content_type + "\n" + date + "\n" | ||
| 199 | + + path; | ||
| 200 | + // 2.计算 HMAC-SHA1 | ||
| 201 | + String signature = HMACSha1(stringToSign, ak_secret); | ||
| 202 | + // 3.得到 authorization header | ||
| 203 | + String authHeader = "Dataplus " + ak_id + ":" + signature; | ||
| 204 | + | ||
| 205 | + // 打开和URL之间的连接 | ||
| 206 | + URLConnection conn = realUrl.openConnection(); | ||
| 207 | + // 设置通用的请求属性 | ||
| 208 | + conn.setRequestProperty("accept", accept); | ||
| 209 | + conn.setRequestProperty("content-type", content_type); | ||
| 210 | + conn.setRequestProperty("date", date); | ||
| 211 | + conn.setRequestProperty("Authorization", authHeader); | ||
| 212 | + // 发送POST请求必须设置如下两行 | ||
| 213 | + conn.setDoOutput(true); | ||
| 214 | + conn.setDoInput(true); | ||
| 215 | + // 获取URLConnection对象对应的输出流 | ||
| 216 | + out = new PrintWriter(conn.getOutputStream()); | ||
| 217 | + // 发送请求参数 | ||
| 218 | + out.print(body); | ||
| 219 | + // flush输出流的缓冲 | ||
| 220 | + out.flush(); | ||
| 221 | + // 定义BufferedReader输入流来读取URL的响应 | ||
| 222 | + in = new BufferedReader(new InputStreamReader(conn.getInputStream())); | ||
| 223 | + String line; | ||
| 224 | + while ((line = in.readLine()) != null) { | ||
| 225 | + result += line; | ||
| 226 | + } | ||
| 227 | + } catch (Exception e) { | ||
| 228 | + System.out.println("发送 POST 请求出现异常!" + e); | ||
| 229 | + e.printStackTrace(); | ||
| 230 | + } | ||
| 231 | + // 使用finally块来关闭输出流、输入流 | ||
| 232 | + finally { | ||
| 233 | + try { | ||
| 234 | + if (out != null) { | ||
| 235 | + out.close(); | ||
| 236 | + } | ||
| 237 | + if (in != null) { | ||
| 238 | + in.close(); | ||
| 239 | + } | ||
| 240 | + } catch (IOException ex) { | ||
| 241 | + ex.printStackTrace(); | ||
| 242 | + } | ||
| 243 | + } | ||
| 244 | + return result; | ||
| 245 | + } | ||
| 246 | + | ||
| 247 | + /* | ||
| 248 | + * GET请求 | ||
| 249 | + */ | ||
| 250 | + | ||
| 251 | + public static String sendGet(String url, String ak_id, String ak_secret) { | ||
| 252 | + String result = ""; | ||
| 253 | + BufferedReader in = null; | ||
| 254 | + try { | ||
| 255 | + URL realUrl = new URL(url); | ||
| 256 | + /* | ||
| 257 | + * http header 参数 | ||
| 258 | + */ | ||
| 259 | + // String method = "GET"; | ||
| 260 | + // String Expire = "1436976000"; | ||
| 261 | + // String Resource = | ||
| 262 | + // "nonce=4e1f2519c626cbfbab1520c255830c26&public=0&vdoid=12345"; | ||
| 263 | + // String content_type = "application/json"; | ||
| 264 | + // String path = realUrl.getFile(); | ||
| 265 | + // String date = toGMTString(new Date()); | ||
| 266 | + // // 1.对body做MD5+BASE64加密 | ||
| 267 | + // // String bodyMd5 = MD5Base64(body); | ||
| 268 | + // String stringToSign = method + "\n" + Expire + "\n" + Resource; | ||
| 269 | + // // 2.计算 HMAC-SHA1 | ||
| 270 | + // String signature = HMACSha1(stringToSign, ak_secret); | ||
| 271 | + // // 3.得到 authorization header | ||
| 272 | + // String authHeader = "Dataplus " + ak_id + ":" + signature; | ||
| 273 | + // 打开和URL之间的连接 | ||
| 274 | + URLConnection connection = realUrl.openConnection(); | ||
| 275 | + // 设置通用的请求属性 | ||
| 276 | + // connection.setRequestProperty("accept", "json"); | ||
| 277 | + // connection.setRequestProperty("content-type", content_type); | ||
| 278 | + // connection.setRequestProperty("date", date); | ||
| 279 | + // connection.setRequestProperty("Authorization", authHeader); | ||
| 280 | + // 建立实际的连接 | ||
| 281 | + connection.connect(); | ||
| 282 | + // 定义 BufferedReader输入流来读取URL的响应 | ||
| 283 | + in = new BufferedReader(new InputStreamReader(connection.getInputStream())); | ||
| 284 | + String line; | ||
| 285 | + while ((line = in.readLine()) != null) { | ||
| 286 | + result += line; | ||
| 287 | + } | ||
| 288 | + } catch (Exception e) { | ||
| 289 | + System.out.println("发送GET请求出现异常!" + e); | ||
| 290 | + e.printStackTrace(); | ||
| 291 | + } | ||
| 292 | + // 使用finally块来关闭输入流 | ||
| 293 | + finally { | ||
| 294 | + try { | ||
| 295 | + if (in != null) { | ||
| 296 | + in.close(); | ||
| 297 | + } | ||
| 298 | + } catch (Exception e) { | ||
| 299 | + e.printStackTrace(); | ||
| 300 | + } | ||
| 301 | + } | ||
| 302 | + return result; | ||
| 303 | + } | ||
| 304 | + | ||
| 305 | + public static void main(String[] args) throws Exception { | ||
| 306 | + // 发送POST请求示例 | ||
| 307 | + /* | ||
| 308 | + * String ak_id = "fWUN8KDtJZJGo0ArQ4qo"; // 用户ak String ak_secret = | ||
| 309 | + * "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; // 用户ak_secret String url | ||
| 310 | + * = "https://kmr-cn-beijing.ksyun.com"; String body = | ||
| 311 | + * "{\"param1\": \"GET\n1436976000\nnonce=4e1f2519c626cbfbab1520c255830c26&public=0&vdoid=12345\", \"param2\":\"fWUN8KDtJZJGo0ArQ4qo\"}" | ||
| 312 | + * ; System.out.println("response body:" + sendPost(url, body, AK_ID, | ||
| 313 | + * AK_SECRET)); | ||
| 314 | + */ | ||
| 315 | + | ||
| 316 | + Date date = new Date(); | ||
| 317 | + System.out.println(toGMTString(date)); | ||
| 318 | + String hh = HMACSha1("GET\n1436976124\nnonce=4e1f2519c626cbfbab1520c255830c26&public=1&vdoid=1", | ||
| 319 | + "fWUN8KDtJZJGo0ArQ4qo"); | ||
| 320 | + String hhhh = MD5Base64(hh); | ||
| 321 | + System.out.println(hh); | ||
| 322 | + System.out.println(".............."); | ||
| 323 | + | ||
| 324 | + // String str = signature(); | ||
| 325 | + // System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= | ||
| 326 | + | ||
| 327 | + // 发送GET请求 | ||
| 328 | + String url1 = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=iDPKaesXXW3A26CScNyjpNkzxZs%3D&accesskey=I3TC8a4xboPUMe5xlp22&expire=1483200000&app=live&method=add&stream=310166_863"; | ||
| 329 | + System.out.println("response body:" + sendGet(url1, ACCESS_KEY, SECRET_KEY)); | ||
| 330 | + | ||
| 331 | + // long d = getTimestamp(); | ||
| 332 | + // System.out.println(d); | ||
| 333 | + | ||
| 334 | + // String str = signature(); | ||
| 335 | + // System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= | ||
| 336 | + /* | ||
| 337 | + * // 发送GET请求 String ak_id1 = "fWUN8KDtJZJGo0ArQ4qo"; //用户ak String | ||
| 338 | + * ak_secret1 = "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; // | ||
| 339 | + * 用户ak_secret String url1 = | ||
| 340 | + * "http://cnlive.uplive.ks-cdn.com?signature=L2muBoImPzyvwyzfBtGXEu+wRNE=&accesskey=fWUN8KDtJZJGo0ArQ4qo&expire=1436976000&method=add&app=live&name=498122_57"; | ||
| 341 | + * System.out.println("response body:" +sendGet(url1, ak_id1, | ||
| 342 | + * ak_secret1)); | ||
| 343 | + */ | ||
| 344 | + // long d = getTimestamp(); | ||
| 345 | + // System.out.println(d); | ||
| 346 | + | ||
| 347 | + } | ||
| 348 | +} |
src/main/java/com/cnlive/socket/SocketServer.java
| @@ -130,7 +130,7 @@ public class SocketServer { | @@ -130,7 +130,7 @@ public class SocketServer { | ||
| 130 | oos.flush(); | 130 | oos.flush(); |
| 131 | } */ | 131 | } */ |
| 132 | } catch (Exception e) { | 132 | } catch (Exception e) { |
| 133 | - System.out.println(System.currentTimeMillis()-lastReceiveTime); | 133 | + System.out.println(System.currentTimeMillis()-lastReceiveTime); |
| 134 | e.printStackTrace(); | 134 | e.printStackTrace(); |
| 135 | overThis(); | 135 | overThis(); |
| 136 | } | 136 | } |
src/main/resources/log4j.properties
| 1 | -log4j.rootLogger=INFO,console,file,action,content,video,httpreq | ||
| 2 | -#Console | ||
| 3 | -log4j.appender.console.Target=System.out | ||
| 4 | -log4j.appender.console=org.apache.log4j.ConsoleAppender | ||
| 5 | -log4j.appender.console.layout=org.apache.log4j.PatternLayout | ||
| 6 | -log4j.appender.console.layout.ConversionPattern=%m%n | ||
| 7 | - | ||
| 8 | - | ||
| 9 | -log4j.appender.file=org.apache.log4j.DailyRollingFileAppender | ||
| 10 | -log4j.appender.file.File=${catalina.home}/logs/cnlive_live_web/log | ||
| 11 | -log4j.appender.file.DatePattern='_'yyyyMMdd | ||
| 12 | -log4j.appender.file.encoding=UTF-8 | ||
| 13 | -log4j.appender.file.layout=org.apache.log4j.PatternLayout | ||
| 14 | -log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} %p %c (%L) - %m%n | ||
| 15 | - | ||
| 16 | -#log4j.logger.org.apache=ERROR | ||
| 17 | -log4j.logger.org.smart4j=DEBUG | ||
| 18 | - | ||
| 19 | - | ||
| 20 | -#action | ||
| 21 | - | ||
| 22 | -log4j.appender.action=org.apache.log4j.DailyRollingFileAppender | ||
| 23 | -log4j.appender.action.File=${catalina.home}/logs/action.log | ||
| 24 | -log4j.appender.action.layout=org.apache.log4j.PatternLayout | ||
| 25 | -log4j.appender.action.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | ||
| 26 | -log4j.appender.action.DatePattern='.'yyyy-MM-dd | ||
| 27 | -log4j.appender.action.Encoding=UTF-8 | ||
| 28 | - | ||
| 29 | -#content | ||
| 30 | -log4j.appender.content=org.apache.log4j.DailyRollingFileAppender | ||
| 31 | -log4j.appender.content.File=${catalina.home}/logs/content.log | ||
| 32 | -log4j.appender.content.layout=org.apache.log4j.PatternLayout | ||
| 33 | -log4j.appender.content.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | ||
| 34 | -log4j.appender.content.DatePattern='.'yyyy-MM-dd | ||
| 35 | -log4j.appender.content.Encoding=UTF-8 | ||
| 36 | - | ||
| 37 | - | ||
| 38 | - | ||
| 39 | -#video | ||
| 40 | -log4j.appender.video=org.apache.log4j.DailyRollingFileAppender | ||
| 41 | -log4j.appender.video.File=${catalina.home}/logs/video.log | ||
| 42 | -log4j.appender.video.layout=org.apache.log4j.PatternLayout | ||
| 43 | -log4j.appender.video.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | ||
| 44 | -log4j.appender.video.DatePattern='.'yyyy-MM-dd | ||
| 45 | -log4j.appender.video.Encoding=UTF-8 | ||
| 46 | - | ||
| 47 | - | ||
| 48 | - | ||
| 49 | -#httpreq | ||
| 50 | -log4j.appender.httpreq=org.apache.log4j.DailyRollingFileAppender | ||
| 51 | -log4j.appender.httpreq.File=${catalina.home}/logs/httpreq.log | ||
| 52 | -log4j.appender.httpreq.layout=org.apache.log4j.PatternLayout | ||
| 53 | -log4j.appender.httpreq.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | ||
| 54 | -log4j.appender.httpreq.DatePattern='.'yyyy-MM-dd | ||
| 55 | -log4j.appender.httpreq.Encoding=UTF-8 | ||
| 56 | - | ||
| 57 | - | ||
| 58 | -#log4j.logger.com.ksyun.ks3=DEBUG,stdout | ||
| 59 | -#log4j.logger.org.apache.http=DEBUG,stdout | ||
| 60 | -#log4j.logger.org.apache.http.wire=ERROR,stdout | ||
| 61 | - | ||
| 62 | -#log4j.addivity.org.apache=true | ||
| 63 | -#log4j.appender.stdout=org.apache.log4j.ConsoleAppender | ||
| 64 | -#log4j.appender.stdout.Target=System.out | ||
| 65 | -#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | 1 | +log4j.rootLogger=INFO,console,file,action,content,video,httpreq |
| 2 | +#Console | ||
| 3 | +log4j.appender.console.Target=System.out | ||
| 4 | +log4j.appender.console=org.apache.log4j.ConsoleAppender | ||
| 5 | +log4j.appender.console.layout=org.apache.log4j.PatternLayout | ||
| 6 | +log4j.appender.console.layout.ConversionPattern=%m%n | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +log4j.appender.file=org.apache.log4j.DailyRollingFileAppender | ||
| 10 | +log4j.appender.file.File=${catalina.home}/logs/cnlive_live_web/log | ||
| 11 | +log4j.appender.file.DatePattern='_'yyyyMMdd | ||
| 12 | +log4j.appender.file.encoding=UTF-8 | ||
| 13 | +log4j.appender.file.layout=org.apache.log4j.PatternLayout | ||
| 14 | +log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} %p %c (%L) - %m%n | ||
| 15 | + | ||
| 16 | +#log4j.logger.org.apache=ERROR | ||
| 17 | +log4j.logger.org.smart4j=DEBUG | ||
| 18 | + | ||
| 19 | + | ||
| 20 | +#action | ||
| 21 | + | ||
| 22 | +log4j.appender.action=org.apache.log4j.DailyRollingFileAppender | ||
| 23 | +log4j.appender.action.File=${catalina.home}/logs/action.log | ||
| 24 | +log4j.appender.action.layout=org.apache.log4j.PatternLayout | ||
| 25 | +log4j.appender.action.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | ||
| 26 | +log4j.appender.action.DatePattern='.'yyyy-MM-dd | ||
| 27 | +log4j.appender.action.Encoding=UTF-8 | ||
| 28 | + | ||
| 29 | +#content | ||
| 30 | +log4j.appender.content=org.apache.log4j.DailyRollingFileAppender | ||
| 31 | +log4j.appender.content.File=${catalina.home}/logs/content.log | ||
| 32 | +log4j.appender.content.layout=org.apache.log4j.PatternLayout | ||
| 33 | +log4j.appender.content.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | ||
| 34 | +log4j.appender.content.DatePattern='.'yyyy-MM-dd | ||
| 35 | +log4j.appender.content.Encoding=UTF-8 | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + | ||
| 39 | +#video | ||
| 40 | +log4j.appender.video=org.apache.log4j.DailyRollingFileAppender | ||
| 41 | +log4j.appender.video.File=${catalina.home}/logs/video.log | ||
| 42 | +log4j.appender.video.layout=org.apache.log4j.PatternLayout | ||
| 43 | +log4j.appender.video.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | ||
| 44 | +log4j.appender.video.DatePattern='.'yyyy-MM-dd | ||
| 45 | +log4j.appender.video.Encoding=UTF-8 | ||
| 46 | + | ||
| 47 | + | ||
| 48 | + | ||
| 49 | +#httpreq | ||
| 50 | +log4j.appender.httpreq=org.apache.log4j.DailyRollingFileAppender | ||
| 51 | +log4j.appender.httpreq.File=${catalina.home}/logs/httpreq.log | ||
| 52 | +log4j.appender.httpreq.layout=org.apache.log4j.PatternLayout | ||
| 53 | +log4j.appender.httpreq.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | ||
| 54 | +log4j.appender.httpreq.DatePattern='.'yyyy-MM-dd | ||
| 55 | +log4j.appender.httpreq.Encoding=UTF-8 | ||
| 56 | + | ||
| 57 | + | ||
| 58 | +#log4j.logger.com.ksyun.ks3=DEBUG,stdout | ||
| 59 | +#log4j.logger.org.apache.http=DEBUG,stdout | ||
| 60 | +#log4j.logger.org.apache.http.wire=ERROR,stdout | ||
| 61 | + | ||
| 62 | +#log4j.addivity.org.apache=true | ||
| 63 | +#log4j.appender.stdout=org.apache.log4j.ConsoleAppender | ||
| 64 | +#log4j.appender.stdout.Target=System.out | ||
| 65 | +#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | ||
| 66 | #log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%t]%C{1}.%M(%L) - %m%n | 66 | #log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%t]%C{1}.%M(%L) - %m%n |
| 67 | \ No newline at end of file | 67 | \ No newline at end of file |
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 | - | ||
| 7 | - | ||
| 8 | -smart.framework.jdbc.type=mysql | ||
| 9 | -smart.framework.jdbc.driver=com.mysql.jdbc.Driver | ||
| 10 | -#smart.framework.jdbc.url=jdbc:mysql://124.193.218.90:3306/cnlive_live?autoReconnect=true&failOverReadOnly=false | ||
| 11 | -#smart.framework.jdbc.username=cnlive_oa | ||
| 12 | -#smart.framework.jdbc.password=H8rf#_3@ccx9( | ||
| 13 | - | ||
| 14 | -smart.framework.jdbc.url=jdbc:mysql://123.59.27.186:23306/cnlive_live?autoReconnect=true&failOverReadOnly=false | ||
| 15 | -smart.framework.jdbc.username=ugc | ||
| 16 | -smart.framework.jdbc.password=liujicheng@cnlive.COM | ||
| 17 | - | ||
| 18 | - | ||
| 19 | -#smart.framework.jdbc.url=jdbc:mysql://localhost:3306/cnlive_live?autoReconnect=true&failOverReadOnly=false | ||
| 20 | -#smart.framework.jdbc.username=root | ||
| 21 | -#smart.framework.jdbc.password=root | ||
| 22 | - | ||
| 23 | -# | ||
| 24 | -smart.plugin.i18n.reloadable=true | ||
| 25 | -smart.plugin.rest.log=true | ||
| 26 | -smart.plugin.rest.jsonp=true | ||
| 27 | -smart.plugin.rest.jsonp.function=callback | ||
| 28 | - | ||
| 29 | -#smart.plugin.security.realms=custom | ||
| 30 | -#smart.plugin.security.custom.class=org.smart4j.sample.CustomSmartSecurity | ||
| 31 | -#smart.plugin.security.cacheable=true | ||
| 32 | - | ||
| 33 | -sample.upload_path=/www/upload/ | ||
| 34 | - | ||
| 35 | -mail.template_path=D:/apache-tomcat-7.0.61/webapps/cnlive_live_web/pages/mail.html | ||
| 36 | -website.url=http://localhost:8080/cnlive_live_web/ | ||
| 37 | -auth.enable=true | ||
| 38 | -auth.login.url=http://sso.staff.cnlive.com/CnliveSSO/login?from=mam-live&callbackUrl= | ||
| 39 | -auth.logout.url=http://sso.staff.cnlive.com/CnliveSSO/logOut?from=mam-live&callbackUrl= | ||
| 40 | -auth.userinfo.url=http://sso.staff.cnlive.com/CnliveSSO/getUserInfo?username= | ||
| 41 | - | 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 | + | ||
| 7 | + | ||
| 8 | +smart.framework.jdbc.type=mysql | ||
| 9 | +smart.framework.jdbc.driver=com.mysql.jdbc.Driver | ||
| 10 | +#smart.framework.jdbc.url=jdbc:mysql://124.193.218.90:3306/cnlive_live?autoReconnect=true&failOverReadOnly=false | ||
| 11 | +#smart.framework.jdbc.username=cnlive_oa | ||
| 12 | +#smart.framework.jdbc.password=H8rf#_3@ccx9( | ||
| 13 | + | ||
| 14 | +smart.framework.jdbc.url=jdbc:mysql://123.59.27.186:23306/cnlive_live?autoReconnect=true&failOverReadOnly=false | ||
| 15 | +smart.framework.jdbc.username=ugc | ||
| 16 | +smart.framework.jdbc.password=liujicheng@cnlive.COM | ||
| 17 | + | ||
| 18 | + | ||
| 19 | +#smart.framework.jdbc.url=jdbc:mysql://localhost:3306/cnlive_live?autoReconnect=true&failOverReadOnly=false | ||
| 20 | +#smart.framework.jdbc.username=root | ||
| 21 | +#smart.framework.jdbc.password=root | ||
| 22 | + | ||
| 23 | +# | ||
| 24 | +smart.plugin.i18n.reloadable=true | ||
| 25 | +smart.plugin.rest.log=true | ||
| 26 | +smart.plugin.rest.jsonp=true | ||
| 27 | +smart.plugin.rest.jsonp.function=callback | ||
| 28 | + | ||
| 29 | +#smart.plugin.security.realms=custom | ||
| 30 | +#smart.plugin.security.custom.class=org.smart4j.sample.CustomSmartSecurity | ||
| 31 | +#smart.plugin.security.cacheable=true | ||
| 32 | + | ||
| 33 | +sample.upload_path=/www/upload/ | ||
| 34 | + | ||
| 35 | +mail.template_path=D:/apache-tomcat-7.0.61/webapps/cnlive_live_web/pages/mail.html | ||
| 36 | +website.url=http://localhost:8080/cnlive_live_web/ | ||
| 37 | +auth.enable=true | ||
| 38 | +auth.login.url=http://sso.staff.cnlive.com/CnliveSSO/login?from=mam-live&callbackUrl= | ||
| 39 | +auth.logout.url=http://sso.staff.cnlive.com/CnliveSSO/logOut?from=mam-live&callbackUrl= | ||
| 40 | +auth.userinfo.url=http://sso.staff.cnlive.com/CnliveSSO/getUserInfo?username= | ||
| 41 | + | ||
| 42 | 42 | ||
| 43 | \ No newline at end of file | 43 | \ No newline at end of file |
src/main/webapp/WEB-INF/web.xml
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> | ||
| 3 | - <servlet> | ||
| 4 | - <servlet-name>init_job</servlet-name> | ||
| 5 | - <servlet-class>com.cnlive.mz.live.servlet.InitServlet</servlet-class> | ||
| 6 | - <init-param> | ||
| 7 | - <param-name>shutdown-on-unload</param-name> | ||
| 8 | - <param-value>true</param-value> | ||
| 9 | - </init-param> | ||
| 10 | - <load-on-startup>2</load-on-startup> | ||
| 11 | - </servlet> | ||
| 12 | - <error-page> | ||
| 13 | - <error-code>500</error-code> | ||
| 14 | - <location>/live/epg/error500</location> | ||
| 15 | - </error-page> | 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> | ||
| 3 | + <servlet> | ||
| 4 | + <servlet-name>init_job</servlet-name> | ||
| 5 | + <servlet-class>com.cnlive.mz.live.servlet.InitServlet</servlet-class> | ||
| 6 | + <init-param> | ||
| 7 | + <param-name>shutdown-on-unload</param-name> | ||
| 8 | + <param-value>true</param-value> | ||
| 9 | + </init-param> | ||
| 10 | + <load-on-startup>2</load-on-startup> | ||
| 11 | + </servlet> | ||
| 12 | + <error-page> | ||
| 13 | + <error-code>500</error-code> | ||
| 14 | + <location>/live/epg/error500</location> | ||
| 15 | + </error-page> | ||
| 16 | </web-app> | 16 | </web-app> |
| 17 | \ No newline at end of file | 17 | \ No newline at end of file |
src/main/webapp/pages/check/check_management.jsp
| 1 | -<%@ page language="java" pageEncoding="UTF-8" | ||
| 2 | - deferredSyntaxAllowedAsLiteral="true"%> | ||
| 3 | -<%@ include file="/pages/common/taglib.jsp"%> | ||
| 4 | -<!DOCTYPE html> | ||
| 5 | -<html> | ||
| 6 | -<head> | ||
| 7 | -<meta charset="UTF-8"> | ||
| 8 | -<title>监审管理 | <f:message key="common.title" /></title> | ||
| 9 | -<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | - name='viewport'> | ||
| 11 | -<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | -<style type="text/css"> | ||
| 13 | -body { | ||
| 14 | - font-family: Verdana, Arial, Helvetica, sans-serif; | ||
| 15 | - font-size: 12px; | ||
| 16 | - line-height: 20px; | ||
| 17 | - color: #000000; | ||
| 18 | -} | ||
| 19 | - | ||
| 20 | -#main_box { | ||
| 21 | - /*正文区大容器*/ | ||
| 22 | - width: 770px; | ||
| 23 | - margin-right: auto; | ||
| 24 | - margin-left: auto; | ||
| 25 | -} | ||
| 26 | - | ||
| 27 | -.row { | ||
| 28 | - /*定义每行*/ | ||
| 29 | - width: 100%; | ||
| 30 | - clear: both; | ||
| 31 | -} | ||
| 32 | - | ||
| 33 | -.left3 { | ||
| 34 | - /*用在五列布局上*/ | ||
| 35 | - border: 1px solid #00ff00; | ||
| 36 | - width: 25%; | ||
| 37 | - height: 150px; | ||
| 38 | - float: left; | ||
| 39 | -} | ||
| 40 | - | ||
| 41 | -.divleft { | ||
| 42 | - width: 24%; | ||
| 43 | - height: 600px; | ||
| 44 | - float: left; | ||
| 45 | -} | ||
| 46 | - | ||
| 47 | -.divright { | ||
| 48 | - width: 74%; | ||
| 49 | - height: 600px; | ||
| 50 | - float: right; | ||
| 51 | -} | ||
| 52 | - | ||
| 53 | -.leftTop { | ||
| 54 | - width: 100%; | ||
| 55 | - height: 340px; | ||
| 56 | - float: right; | ||
| 57 | -} | ||
| 58 | - | ||
| 59 | -.leftBootom { | ||
| 60 | - width: 100%; | ||
| 61 | - height: 250px; | ||
| 62 | - float: right; | ||
| 63 | -} | ||
| 64 | -</style> | ||
| 65 | -</head> | ||
| 66 | -<body class="skin-blue fixed "> | ||
| 67 | - <div class="wrapper"> | ||
| 68 | - <%@ include file="/pages/common/top.jsp"%> | ||
| 69 | - <%@ include file="/pages/common/left.jsp"%> | ||
| 70 | - <div class="content-wrapper"> | ||
| 71 | - <!-- Content Header (Page header) --> | ||
| 72 | - <section class="content-header"> | ||
| 73 | - <h1> | ||
| 74 | - 监审管理<small><a href="../../live/preload"><i | ||
| 75 | - class="fa fa-plus"></i>直播监审</a> </small> <small class="label label-warning" | ||
| 76 | - style="display: none" id="info_tab_span"><i | ||
| 77 | - class="fa fa-bell-o"></i></small> | ||
| 78 | - </h1> | ||
| 79 | - | ||
| 80 | - <ol class="breadcrumb"> | ||
| 81 | - <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 82 | - <li class="active">监审管理</li> | ||
| 83 | - </ol> | ||
| 84 | - </section> | ||
| 85 | - <!-- Main content --> | ||
| 86 | - <section class="content"> | ||
| 87 | - <div class="row"> | ||
| 88 | - <div class="col-xs-12"> | ||
| 89 | - <div class="box box-warning"> | ||
| 90 | - <div class="box-header with-border"> | ||
| 91 | - <h3 class="box-title"></h3> | ||
| 92 | - <div class="box-tools"> | ||
| 93 | - <div class="input-group"> | ||
| 94 | - <div class="box-footer clearfix"> | ||
| 95 | - <center> | ||
| 96 | - <tag:pager3 id="product_pager" pager="${tLive}" /> | ||
| 97 | - </center> | ||
| 98 | - </div> | ||
| 99 | - </div> | ||
| 100 | - </div> | ||
| 101 | - </div> | ||
| 102 | - <!-- /.box-header --> | ||
| 103 | - <div class="box-body"> | ||
| 104 | - | ||
| 105 | - <div class="divleft"> | ||
| 106 | - <div class="leftTop" id="leftTopPlay"></div> | ||
| 107 | - <div class="leftBootom"> | ||
| 108 | - | ||
| 109 | - <table class="table table-bordered"> | ||
| 110 | - | ||
| 111 | - <h4>直播活动详情:</h4> | ||
| 112 | - | ||
| 113 | - <tr> | ||
| 114 | - <th width="30%">活动名称</th> | ||
| 115 | - <th id="live_name"></th> | ||
| 116 | - | ||
| 117 | - </tr> | ||
| 118 | - <tr> | ||
| 119 | - <th width="30%">开始时间</th> | ||
| 120 | - <th id="start_time"></th> | ||
| 121 | - </tr> | ||
| 122 | - <tr> | ||
| 123 | - <th width="30%">结束时间</th> | ||
| 124 | - <th id="end_time"></th> | ||
| 125 | - </tr> | ||
| 126 | - <tr> | ||
| 127 | - <th width="30%">活动简述</th> | ||
| 128 | - <th id="live_desper"></th> | ||
| 129 | - </tr> | ||
| 130 | - <tr> | ||
| 131 | - <th width="30%">live_url</th> | ||
| 132 | - <th id="live_url"></th> | ||
| 133 | - </tr> | ||
| 134 | - <tr> | ||
| 135 | - <th width="30%">活动简述</th> | ||
| 136 | - <th id=""></th> | ||
| 137 | - </tr> | ||
| 138 | - | ||
| 139 | - </table> | ||
| 140 | - </div> | ||
| 141 | - </div> | ||
| 142 | - <div class="divright"> | ||
| 143 | - <!--五列开始--> | ||
| 144 | - <div class="row"> | ||
| 145 | - <c:forEach var="item" items="${tLive.recordList}" | ||
| 146 | - varStatus="stat"> | ||
| 147 | - <!-- <div style="border: 1px solid #00ff00; width: 33%; height: 200px; background: #888; float: left;"> --> | ||
| 148 | - <div class="warp" | ||
| 149 | - style="border: 1px solid #00ff00; width: 33%; height: 203px; float: left;" | ||
| 150 | - id="divShow_${item.id}" | ||
| 151 | - onclick="getParam('${item.id}','${item.title}','${item.live_url}','${item.start_time}','${item.end_time}')"> | ||
| 152 | - <!-- <div class="warp" style="height: 24px; background: #;"> --> | ||
| 153 | - <button type="button" class="close" data-dismiss="modal" | ||
| 154 | - id="colseLive" onclick="coseLive(event,'${item.id}','${item.t_user_id}')"> | ||
| 155 | - <span aria-hidden="true">×</span><span | ||
| 156 | - class="sr-only">Close</span> | ||
| 157 | - </button> | ||
| 158 | - <h5 class="modal-title" id="myModalLabel">正在直播:${item.title}</h5> | ||
| 159 | - <!-- </div> --> | ||
| 160 | - <div id="a1_${item.id}" class="a1_class" | ||
| 161 | - style="height: 150px"> | ||
| 162 | - <input type="hidden" value='${item.id}' name="liveid" | ||
| 163 | - id="liveid"> | ||
| 164 | - <input type="hidden"value='${item.title}' name="title" id="title"> | ||
| 165 | - <input type="hidden" value='${item.live_url}' name="live_url" | ||
| 166 | - id="live_url_${item.id}"> | ||
| 167 | - <input type="hidden"value='${item.start_time}' name="start_time" | ||
| 168 | - id="start_time"> | ||
| 169 | - <input type="hidden"value='${item.end_time}' name="end_time" id="end_time"> | ||
| 170 | - <input type="hidden"value='${item.t_user_id}' name="t_user_id" id="t_user_${item.id}"> | ||
| 171 | - <%-- <h4 class="blue smaller"> | ||
| 172 | - <i class="icon-picture orange"></i>视频源 : ${item.title} | ||
| 173 | - </h4> --%> | ||
| 174 | - </div> | ||
| 175 | - <div class="" style="height: 30px;"> | ||
| 176 | - <input type="button" value="置顶" id="makeTop" | ||
| 177 | - onclick="makeTop(event,'${item.id}',this)"> <input | ||
| 178 | - type="button" value="关闭活动" id="closeLive" | ||
| 179 | - onclick="coseLive(event,'${item.id}','${item.t_user_id}')"> | ||
| 180 | - </div> | ||
| 181 | - </div> | ||
| 182 | - <!-- </div> --> | ||
| 183 | - </c:forEach> | ||
| 184 | - </div> | ||
| 185 | - </div> | ||
| 186 | - </div> | ||
| 187 | - | ||
| 188 | - </div> | ||
| 189 | - <!-- /.box-body --> | ||
| 190 | - </div> | ||
| 191 | - </div> | ||
| 192 | - </section> | ||
| 193 | - </div> | ||
| 194 | - </div> | ||
| 195 | - <%@ include file="/pages/common/bottom.jsp"%> | ||
| 196 | - <%@ include file="/pages/common/js.jsp"%> | ||
| 197 | - <script type="text/javascript" src="../../pages/check/js/ckplayer.js" charset="utf-8"></script> | ||
| 198 | - <script type="text/javascript" src="../../pages/check/js/offlights.js" charset="utf-8"></script> | ||
| 199 | - <script type="text/javascript"> | ||
| 200 | - var flashvars = { | ||
| 201 | - p : 1, | ||
| 202 | - e : 1, | ||
| 203 | - hl : '', | ||
| 204 | - ht : '20', | ||
| 205 | - }; | ||
| 206 | - var video = [ '' ]; | ||
| 207 | - var support = [ 'all' ]; | ||
| 208 | - CKobject.embedHTML5('leftTopPlay', 'ckplayer_leftTopPlay', 250, 290, | ||
| 209 | - video, flashvars, support); | ||
| 210 | - | ||
| 211 | - $(".a1_class #liveid").each(function() { | ||
| 212 | - var id = $(this).val(); | ||
| 213 | - var live_url = $('#live_url_' + id).val(); | ||
| 214 | - var t_user_id = $('#t_user_'+id).val(); | ||
| 215 | - | ||
| 216 | - var flashvars = { | ||
| 217 | - p : 1, | ||
| 218 | - e : 1, | ||
| 219 | - hl : live_url, | ||
| 220 | - ht : '20' | ||
| 221 | - }; | ||
| 222 | - var video = [live_url ]; | ||
| 223 | - var support = [ 'all' ]; | ||
| 224 | - CKobject.embedHTML5('a1_' + id, 'ckplayer_' + id,250, 153, video, flashvars, support); | ||
| 225 | - | ||
| 226 | - //m3u8 文件播放 | ||
| 227 | - /* var flashvars={ | ||
| 228 | - f:'http://localhost:8080/cnlive_live_web/static/assets/ckplayer/m3u8.swf', | ||
| 229 | - a:live_url, | ||
| 230 | - s:4, | ||
| 231 | - c:0, | ||
| 232 | - p:1 | ||
| 233 | - }; | ||
| 234 | - var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'}; | ||
| 235 | - var video=[live_url]; | ||
| 236 | - CKobject.embed('http://localhost:8080/cnlive_live_web/static/assets/ckplayer/ckplayer.swf', 'a1_' + id, 'ckplayer_' + id, 250, 153,false,flashvars,video,params); */ | ||
| 237 | - // rtmp 直播流播放。 | ||
| 238 | - /* var flashvars = { | ||
| 239 | - // f:'rtmp://localhost/live/livestreame', | ||
| 240 | - f :'http://cnlive.uplive.ks-cdn.com/live/'+t_user_id+'_'+id, | ||
| 241 | - c : 0 | ||
| 242 | - }; | ||
| 243 | - var video = [ 'http://cnlive.hlslive.ks-cdn.com/live/'+t_user_id+'_'+id+'/index.m3u8']; | ||
| 244 | - CKobject.embed('../../static/assets/ckplayer/ckplayer.swf','a1_' + id, 'ckplayer_' + id, 250, | ||
| 245 | - 153, false, flashvars, video); */ | ||
| 246 | - | ||
| 247 | - }); | ||
| 248 | - | ||
| 249 | - function getParam(id, name, live_url, start_time, end_time) { | ||
| 250 | - | ||
| 251 | - $("#live_name").html(name); | ||
| 252 | - $("#start_time").html(start_time); | ||
| 253 | - $("#end_time").html(end_time); | ||
| 254 | - $("#live_url").html(live_url); | ||
| 255 | - var flashvars = { | ||
| 256 | - p : 1, | ||
| 257 | - e : 1, | ||
| 258 | - hl : 'http://movie.ks.js.cn/flv/other/1_0.mp4', | ||
| 259 | - }; | ||
| 260 | - var video = [ live_url ]; | ||
| 261 | - var support = [ 'all' ]; | ||
| 262 | - CKobject.embedHTML5('leftTopPlay', 'ckplayer_leftTopPlay', 250, | ||
| 263 | - 290, video, flashvars, support); | ||
| 264 | - } | ||
| 265 | - function coseLive(e, id,user_id) { | ||
| 266 | - e.cancelBubble = true; | ||
| 267 | - $.ajax({ | ||
| 268 | - url : '../../check/close/' + id, | ||
| 269 | - type : 'post', | ||
| 270 | - datatype : "json", | ||
| 271 | - async : true, | ||
| 272 | - data:{"user_id":user_id}, | ||
| 273 | - error : function() { | ||
| 274 | - alert('关闭时发生错误!'); | ||
| 275 | - }, | ||
| 276 | - success : function(data) { | ||
| 277 | - location.href = '../../check/list/1'; | ||
| 278 | - alert("关闭成功"); | ||
| 279 | - } | ||
| 280 | - }); | ||
| 281 | - } | ||
| 282 | - /** | ||
| 283 | - 置顶 。。。 | ||
| 284 | - */ | ||
| 285 | - | ||
| 286 | - function makeTop(event, id, obj) { | ||
| 287 | - event.cancelBubble = true; | ||
| 288 | - $(obj.parentElement.parentElement).insertBefore($('.warp').first()) | ||
| 289 | - alert(obj.parentElement.parentElement); | ||
| 290 | - }; | ||
| 291 | - </script> | ||
| 292 | -</body> | ||
| 293 | -</html> | 1 | +<%@ page language="java" pageEncoding="UTF-8" |
| 2 | + deferredSyntaxAllowedAsLiteral="true"%> | ||
| 3 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 4 | +<!DOCTYPE html> | ||
| 5 | +<html> | ||
| 6 | +<head> | ||
| 7 | +<meta charset="UTF-8"> | ||
| 8 | +<title>监审管理 | <f:message key="common.title" /></title> | ||
| 9 | +<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +<style type="text/css"> | ||
| 13 | +body { | ||
| 14 | + font-family: Verdana, Arial, Helvetica, sans-serif; | ||
| 15 | + font-size: 12px; | ||
| 16 | + line-height: 20px; | ||
| 17 | + color: #000000; | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +#main_box { | ||
| 21 | + /*正文区大容器*/ | ||
| 22 | + width: 770px; | ||
| 23 | + margin-right: auto; | ||
| 24 | + margin-left: auto; | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +.row { | ||
| 28 | + /*定义每行*/ | ||
| 29 | + width: 100%; | ||
| 30 | + clear: both; | ||
| 31 | +} | ||
| 32 | + | ||
| 33 | +.left3 { | ||
| 34 | + /*用在五列布局上*/ | ||
| 35 | + border: 1px solid #00ff00; | ||
| 36 | + width: 25%; | ||
| 37 | + height: 150px; | ||
| 38 | + float: left; | ||
| 39 | +} | ||
| 40 | + | ||
| 41 | +.divleft { | ||
| 42 | + width: 24%; | ||
| 43 | + height: 600px; | ||
| 44 | + float: left; | ||
| 45 | +} | ||
| 46 | + | ||
| 47 | +.divright { | ||
| 48 | + width: 74%; | ||
| 49 | + height: 600px; | ||
| 50 | + float: right; | ||
| 51 | +} | ||
| 52 | + | ||
| 53 | +.leftTop { | ||
| 54 | + width: 100%; | ||
| 55 | + height: 340px; | ||
| 56 | + float: right; | ||
| 57 | +} | ||
| 58 | + | ||
| 59 | +.leftBootom { | ||
| 60 | + width: 100%; | ||
| 61 | + height: 250px; | ||
| 62 | + float: right; | ||
| 63 | +} | ||
| 64 | +</style> | ||
| 65 | +</head> | ||
| 66 | +<body class="skin-blue fixed "> | ||
| 67 | + <div class="wrapper"> | ||
| 68 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 69 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 70 | + <div class="content-wrapper"> | ||
| 71 | + <!-- Content Header (Page header) --> | ||
| 72 | + <section class="content-header"> | ||
| 73 | + <h1> | ||
| 74 | + 监审管理<small><a href="../../live/preload"><i | ||
| 75 | + class="fa fa-plus"></i>直播监审</a> </small> <small class="label label-warning" | ||
| 76 | + style="display: none" id="info_tab_span"><i | ||
| 77 | + class="fa fa-bell-o"></i></small> | ||
| 78 | + </h1> | ||
| 79 | + | ||
| 80 | + <ol class="breadcrumb"> | ||
| 81 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 82 | + <li class="active">监审管理</li> | ||
| 83 | + </ol> | ||
| 84 | + </section> | ||
| 85 | + <!-- Main content --> | ||
| 86 | + <section class="content"> | ||
| 87 | + <div class="row"> | ||
| 88 | + <div class="col-xs-12"> | ||
| 89 | + <div class="box box-warning"> | ||
| 90 | + <div class="box-header with-border"> | ||
| 91 | + <h3 class="box-title"></h3> | ||
| 92 | + <div class="box-tools"> | ||
| 93 | + <div class="input-group"> | ||
| 94 | + <div class="box-footer clearfix"> | ||
| 95 | + <center> | ||
| 96 | + <tag:pager3 id="product_pager" pager="${tLive}" /> | ||
| 97 | + </center> | ||
| 98 | + </div> | ||
| 99 | + </div> | ||
| 100 | + </div> | ||
| 101 | + </div> | ||
| 102 | + <!-- /.box-header --> | ||
| 103 | + <div class="box-body"> | ||
| 104 | + | ||
| 105 | + <div class="divleft"> | ||
| 106 | + <div class="leftTop" id="leftTopPlay"></div> | ||
| 107 | + <div class="leftBootom"> | ||
| 108 | + | ||
| 109 | + <table class="table table-bordered"> | ||
| 110 | + | ||
| 111 | + <h4>直播活动详情:</h4> | ||
| 112 | + | ||
| 113 | + <tr> | ||
| 114 | + <th width="30%">活动名称</th> | ||
| 115 | + <th id="live_name"></th> | ||
| 116 | + | ||
| 117 | + </tr> | ||
| 118 | + <tr> | ||
| 119 | + <th width="30%">开始时间</th> | ||
| 120 | + <th id="start_time"></th> | ||
| 121 | + </tr> | ||
| 122 | + <tr> | ||
| 123 | + <th width="30%">结束时间</th> | ||
| 124 | + <th id="end_time"></th> | ||
| 125 | + </tr> | ||
| 126 | + <tr> | ||
| 127 | + <th width="30%">活动简述</th> | ||
| 128 | + <th id="live_desper"></th> | ||
| 129 | + </tr> | ||
| 130 | + <tr> | ||
| 131 | + <th width="30%">live_url</th> | ||
| 132 | + <th id="live_url"></th> | ||
| 133 | + </tr> | ||
| 134 | + <tr> | ||
| 135 | + <th width="30%">活动简述</th> | ||
| 136 | + <th id=""></th> | ||
| 137 | + </tr> | ||
| 138 | + | ||
| 139 | + </table> | ||
| 140 | + </div> | ||
| 141 | + </div> | ||
| 142 | + <div class="divright"> | ||
| 143 | + <!--五列开始--> | ||
| 144 | + <div class="row"> | ||
| 145 | + <c:forEach var="item" items="${tLive.recordList}" | ||
| 146 | + varStatus="stat"> | ||
| 147 | + <!-- <div style="border: 1px solid #00ff00; width: 33%; height: 200px; background: #888; float: left;"> --> | ||
| 148 | + <div class="warp" | ||
| 149 | + style="border: 1px solid #00ff00; width: 33%; height: 203px; float: left;" | ||
| 150 | + id="divShow_${item.id}" | ||
| 151 | + onclick="getParam('${item.id}','${item.title}','${item.live_url}','${item.start_time}','${item.end_time}')"> | ||
| 152 | + <!-- <div class="warp" style="height: 24px; background: #;"> --> | ||
| 153 | + <button type="button" class="close" data-dismiss="modal" | ||
| 154 | + id="colseLive" onclick="coseLive(event,'${item.id}','${item.t_user_id}')"> | ||
| 155 | + <span aria-hidden="true">×</span><span | ||
| 156 | + class="sr-only">Close</span> | ||
| 157 | + </button> | ||
| 158 | + <h5 class="modal-title" id="myModalLabel">正在直播:${item.title}</h5> | ||
| 159 | + <!-- </div> --> | ||
| 160 | + <div id="a1_${item.id}" class="a1_class" | ||
| 161 | + style="height: 150px"> | ||
| 162 | + <input type="hidden" value='${item.id}' name="liveid" | ||
| 163 | + id="liveid"> | ||
| 164 | + <input type="hidden"value='${item.title}' name="title" id="title"> | ||
| 165 | + <input type="hidden" value='${item.live_url}' name="live_url" | ||
| 166 | + id="live_url_${item.id}"> | ||
| 167 | + <input type="hidden"value='${item.start_time}' name="start_time" | ||
| 168 | + id="start_time"> | ||
| 169 | + <input type="hidden"value='${item.end_time}' name="end_time" id="end_time"> | ||
| 170 | + <input type="hidden"value='${item.t_user_id}' name="t_user_id" id="t_user_${item.id}"> | ||
| 171 | + <%-- <h4 class="blue smaller"> | ||
| 172 | + <i class="icon-picture orange"></i>视频源 : ${item.title} | ||
| 173 | + </h4> --%> | ||
| 174 | + </div> | ||
| 175 | + <div class="" style="height: 30px;"> | ||
| 176 | + <input type="button" value="置顶" id="makeTop" | ||
| 177 | + onclick="makeTop(event,'${item.id}',this)"> <input | ||
| 178 | + type="button" value="关闭活动" id="closeLive" | ||
| 179 | + onclick="coseLive(event,'${item.id}','${item.t_user_id}')"> | ||
| 180 | + </div> | ||
| 181 | + </div> | ||
| 182 | + <!-- </div> --> | ||
| 183 | + </c:forEach> | ||
| 184 | + </div> | ||
| 185 | + </div> | ||
| 186 | + </div> | ||
| 187 | + | ||
| 188 | + </div> | ||
| 189 | + <!-- /.box-body --> | ||
| 190 | + </div> | ||
| 191 | + </div> | ||
| 192 | + </section> | ||
| 193 | + </div> | ||
| 194 | + </div> | ||
| 195 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 196 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 197 | + <script type="text/javascript" src="../../pages/check/js/ckplayer.js" charset="utf-8"></script> | ||
| 198 | + <script type="text/javascript" src="../../pages/check/js/offlights.js" charset="utf-8"></script> | ||
| 199 | + <script type="text/javascript"> | ||
| 200 | + var flashvars = { | ||
| 201 | + p : 1, | ||
| 202 | + e : 1, | ||
| 203 | + hl : '', | ||
| 204 | + ht : '20', | ||
| 205 | + }; | ||
| 206 | + var video = [ '' ]; | ||
| 207 | + var support = [ 'all' ]; | ||
| 208 | + CKobject.embedHTML5('leftTopPlay', 'ckplayer_leftTopPlay', 250, 290, | ||
| 209 | + video, flashvars, support); | ||
| 210 | + | ||
| 211 | + $(".a1_class #liveid").each(function() { | ||
| 212 | + var id = $(this).val(); | ||
| 213 | + var live_url = $('#live_url_' + id).val(); | ||
| 214 | + var t_user_id = $('#t_user_'+id).val(); | ||
| 215 | + | ||
| 216 | + var flashvars = { | ||
| 217 | + p : 1, | ||
| 218 | + e : 1, | ||
| 219 | + hl : live_url, | ||
| 220 | + ht : '20' | ||
| 221 | + }; | ||
| 222 | + var video = [live_url ]; | ||
| 223 | + var support = [ 'all' ]; | ||
| 224 | + CKobject.embedHTML5('a1_' + id, 'ckplayer_' + id,250, 153, video, flashvars, support); | ||
| 225 | + | ||
| 226 | + //m3u8 文件播放 | ||
| 227 | + /* var flashvars={ | ||
| 228 | + f:'http://localhost:8080/cnlive_live_web/static/assets/ckplayer/m3u8.swf', | ||
| 229 | + a:live_url, | ||
| 230 | + s:4, | ||
| 231 | + c:0, | ||
| 232 | + p:1 | ||
| 233 | + }; | ||
| 234 | + var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'}; | ||
| 235 | + var video=[live_url]; | ||
| 236 | + CKobject.embed('http://localhost:8080/cnlive_live_web/static/assets/ckplayer/ckplayer.swf', 'a1_' + id, 'ckplayer_' + id, 250, 153,false,flashvars,video,params); */ | ||
| 237 | + // rtmp 直播流播放。 | ||
| 238 | + /* var flashvars = { | ||
| 239 | + // f:'rtmp://localhost/live/livestreame', | ||
| 240 | + f :'http://cnlive.uplive.ks-cdn.com/live/'+t_user_id+'_'+id, | ||
| 241 | + c : 0 | ||
| 242 | + }; | ||
| 243 | + var video = [ 'http://cnlive.hlslive.ks-cdn.com/live/'+t_user_id+'_'+id+'/index.m3u8']; | ||
| 244 | + CKobject.embed('../../static/assets/ckplayer/ckplayer.swf','a1_' + id, 'ckplayer_' + id, 250, | ||
| 245 | + 153, false, flashvars, video); */ | ||
| 246 | + | ||
| 247 | + }); | ||
| 248 | + | ||
| 249 | + function getParam(id, name, live_url, start_time, end_time) { | ||
| 250 | + | ||
| 251 | + $("#live_name").html(name); | ||
| 252 | + $("#start_time").html(start_time); | ||
| 253 | + $("#end_time").html(end_time); | ||
| 254 | + $("#live_url").html(live_url); | ||
| 255 | + var flashvars = { | ||
| 256 | + p : 1, | ||
| 257 | + e : 1, | ||
| 258 | + hl : 'http://movie.ks.js.cn/flv/other/1_0.mp4', | ||
| 259 | + }; | ||
| 260 | + var video = [ live_url ]; | ||
| 261 | + var support = [ 'all' ]; | ||
| 262 | + CKobject.embedHTML5('leftTopPlay', 'ckplayer_leftTopPlay', 250, | ||
| 263 | + 290, video, flashvars, support); | ||
| 264 | + } | ||
| 265 | + function coseLive(e, id,user_id) { | ||
| 266 | + e.cancelBubble = true; | ||
| 267 | + $.ajax({ | ||
| 268 | + url : '../../check/close/' + id, | ||
| 269 | + type : 'post', | ||
| 270 | + datatype : "json", | ||
| 271 | + async : true, | ||
| 272 | + data:{"user_id":user_id}, | ||
| 273 | + error : function() { | ||
| 274 | + alert('关闭时发生错误!'); | ||
| 275 | + }, | ||
| 276 | + success : function(data) { | ||
| 277 | + location.href = '../../check/list/1'; | ||
| 278 | + alert("关闭成功"); | ||
| 279 | + } | ||
| 280 | + }); | ||
| 281 | + } | ||
| 282 | + /** | ||
| 283 | + 置顶 。。。 | ||
| 284 | + */ | ||
| 285 | + | ||
| 286 | + function makeTop(event, id, obj) { | ||
| 287 | + event.cancelBubble = true; | ||
| 288 | + $(obj.parentElement.parentElement).insertBefore($('.warp').first()) | ||
| 289 | + alert(obj.parentElement.parentElement); | ||
| 290 | + }; | ||
| 291 | + </script> | ||
| 292 | +</body> | ||
| 293 | +</html> |
src/main/webapp/pages/check/monitor.jsp
| 1 | -<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | -<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | -<!DOCTYPE html> | ||
| 4 | -<html> | ||
| 5 | -<head> | ||
| 6 | -<style type="text/css"> | ||
| 7 | -.text-overflow { | ||
| 8 | - display: block; /*内联对象需加*/ | ||
| 9 | - width: 31em; | ||
| 10 | - word-break: keep-all; /* 不换行 */ | ||
| 11 | - white-space: nowrap; /* 不换行 */ | ||
| 12 | - overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */ | ||
| 13 | - text-overflow: ellipsis; | ||
| 14 | - /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/ | ||
| 15 | -} | ||
| 16 | -</style> | ||
| 17 | -<meta charset="UTF-8"> | ||
| 18 | -<title>监审管理 |<f:message key="common.title" /></title> | ||
| 19 | -<meta | ||
| 20 | - content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 21 | - name='viewport'> | ||
| 22 | -<%@ include file="/pages/common/css.jsp"%> | ||
| 23 | -<script src="${BASE}/static/assets/cnlive/js/check.js"></script> | ||
| 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 sidebar-collapse sidebar-mini"> | ||
| 30 | - <div class="wrapper"> | ||
| 31 | - <%@ include file="/pages/common/top.jsp"%> | ||
| 32 | - <%@ include file="/pages/common/left.jsp"%> | ||
| 33 | - <!-- Content Wrapper. Contains page content --> | ||
| 34 | - <div class="content-wrapper"> | ||
| 35 | - <!-- Content Header (Page header) --> | ||
| 36 | - <section class="content-header"> | ||
| 37 | - <h1> | ||
| 38 | - 监审管理 <small>monitor panel</small> | ||
| 39 | - </h1> | ||
| 40 | - <ol class="breadcrumb"> | ||
| 41 | - <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 42 | - <li class="active">监审管理</li> | ||
| 43 | - </ol> | ||
| 44 | - </section> | ||
| 45 | - <section class="content"> | ||
| 46 | - <div class="row"> | ||
| 47 | - <div class="col-md-4"> | ||
| 48 | - <div class="box box-solid"> | ||
| 49 | - <div class="box-header with-border"> | ||
| 50 | - <h3 class="box-title">监控平台</h3> | ||
| 51 | - </div> | ||
| 52 | - <div class="box-body no-padding"> | ||
| 53 | - <div class="col-md-12" id="divShow_${item.id}"> | ||
| 54 | - <div class="box box-success box-solid"> | ||
| 55 | - <div class="box-header with-border"> | ||
| 56 | - <div class="text-overflow"> | ||
| 57 | - <h3 class="box-title" id="hidId">${item.title}</h3> | ||
| 58 | - </div> | ||
| 59 | - <div class="box-tools pull-right"> | ||
| 60 | - <button class="btn btn-sm" id="play_button_${item.id}" | ||
| 61 | - onclick="play(${item.id});">重新载入</button> | ||
| 62 | - </div> | ||
| 63 | - </div> | ||
| 64 | - <div id="playId" class="box-body"> | ||
| 65 | - <%-- <input type="hidden" name="play_url_${item.id}" | ||
| 66 | - id="play_url_${item.id}" value="${item.live_url}" /> <span | ||
| 67 | - class="mailbox-attachment-icon has-img" | ||
| 68 | - id="player_span_${item.id}"> <img | ||
| 69 | - src="../../static/assets/dist/img/photo2.png" | ||
| 70 | - alt="Attachment"> | ||
| 71 | - </span> --%> | ||
| 72 | - </div> | ||
| 73 | - </div> | ||
| 74 | - </div> | ||
| 75 | - </div> | ||
| 76 | - </div> | ||
| 77 | - <div class="box-header with-border"> | ||
| 78 | - <h3 class="box-title">直播信息:</h3> | ||
| 79 | - </div> | ||
| 80 | - <div class="box-body no-padding"> | ||
| 81 | - <ul class="nav nav-pills nav-stacked"> | ||
| 82 | - <li id="userId"><a><i class="fa fa-file-text-o"></i>用户ID:</a></li> | ||
| 83 | - <li id="title"><a><i class="fa fa-file-text-o"></i>TITLE: | ||
| 84 | - </a></li> | ||
| 85 | - <li id="startTime"><a><i class="fa fa-file-text-o"></i>开播时间: | ||
| 86 | - </a></li> | ||
| 87 | - </ul> | ||
| 88 | - </div> | ||
| 89 | - </div> | ||
| 90 | - <div class="col-md-8"> | ||
| 91 | - <div class="box box-primary"> | ||
| 92 | - <div class="box-header with-border"> | ||
| 93 | - <h3 class="box-title">监控</h3> | ||
| 94 | - <tag:pager id="product_pager" pager="${tLive}" /> | ||
| 95 | - </div> | ||
| 96 | - <div class="box-body no-padding"> | ||
| 97 | - <div class="row"> | ||
| 98 | - <c:forEach var="item" items="${tLive.recordList}" | ||
| 99 | - varStatus="stat"> | ||
| 100 | - <div class="col-md-3" id="divShow_${item.id}"> | ||
| 101 | - <div | ||
| 102 | - class="box ${item.check_sort eq null ? 'box-warning':'box-success'} box-solid"> | ||
| 103 | - <div class="box-header with-border"> | ||
| 104 | - <div class="text-overflow"> | ||
| 105 | - <h3 class="box-title">${item.title}</h3> | ||
| 106 | - </div> | ||
| 107 | - <div class="box-tools pull-right"> | ||
| 108 | - <button class="btn btn-sm btn-danger" | ||
| 109 | - onclick="changePlay('${item.id}','${item.live_url}','${item.t_user_id}','${item.title}','${item.start_time}');">左</button> | ||
| 110 | - <button class="btn btn-sm btn-danger" | ||
| 111 | - onclick="to_pass(${item.id});">过</button> | ||
| 112 | - <button class="btn btn-sm btn-danger" | ||
| 113 | - onclick="to_top(${item.id});">顶</button> | ||
| 114 | - <button class="btn btn-sm btn-danger" | ||
| 115 | - onclick="play_close('${item.id}','${item.live_url}','${item.uuid}');">断</button> | ||
| 116 | - </div> | ||
| 117 | - </div> | ||
| 118 | - <div class="box-body"> | ||
| 119 | - <input type="hidden" name="play_url_${item.id}" | ||
| 120 | - id="play_url_${item.id}" value="${item.live_url}" /> <span | ||
| 121 | - class="mailbox-attachment-icon has-img" | ||
| 122 | - id="player_span_${item.id}"> <img | ||
| 123 | - src="../../static/assets/dist/img/photo2.png" | ||
| 124 | - alt="Attachment"> | ||
| 125 | - </span> | ||
| 126 | - </div> | ||
| 127 | - </div> | ||
| 128 | - </div> | ||
| 129 | - </c:forEach> | ||
| 130 | - </div> | ||
| 131 | - </div> | ||
| 132 | - </div> | ||
| 133 | - </div> | ||
| 134 | - </div> | ||
| 135 | - <%@ include file="/pages/common/js.jsp"%> | ||
| 136 | - <script src="${BASE}/static/assets/cnlive/js/player_m3u8.js"></script> | ||
| 137 | - </section> | ||
| 138 | - </div> | ||
| 139 | - </div> | ||
| 140 | -</body> | ||
| 141 | -<script type="text/javascript"> | ||
| 142 | -jwplayer("playId").setup({ | ||
| 143 | - file: "", | ||
| 144 | - height: 260, | ||
| 145 | - image: "/assets/myVideo.jpg", | ||
| 146 | - autostart:true, | ||
| 147 | - rtmp: { | ||
| 148 | - bufferlength: 0.1 | ||
| 149 | - }, | ||
| 150 | - width: 370 | ||
| 151 | -}); | ||
| 152 | -</script> | 1 | +<%@ page language="java" pageEncoding="UTF-8"%> |
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<style type="text/css"> | ||
| 7 | +.text-overflow { | ||
| 8 | + display: block; /*内联对象需加*/ | ||
| 9 | + width: 31em; | ||
| 10 | + word-break: keep-all; /* 不换行 */ | ||
| 11 | + white-space: nowrap; /* 不换行 */ | ||
| 12 | + overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */ | ||
| 13 | + text-overflow: ellipsis; | ||
| 14 | + /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/ | ||
| 15 | +} | ||
| 16 | +</style> | ||
| 17 | +<meta charset="UTF-8"> | ||
| 18 | +<title>监审管理 |<f:message key="common.title" /></title> | ||
| 19 | +<meta | ||
| 20 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 21 | + name='viewport'> | ||
| 22 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 23 | +<script src="${BASE}/static/assets/cnlive/js/check.js"></script> | ||
| 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 sidebar-collapse sidebar-mini"> | ||
| 30 | + <div class="wrapper"> | ||
| 31 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 32 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 33 | + <!-- Content Wrapper. Contains page content --> | ||
| 34 | + <div class="content-wrapper"> | ||
| 35 | + <!-- Content Header (Page header) --> | ||
| 36 | + <section class="content-header"> | ||
| 37 | + <h1> | ||
| 38 | + 监审管理 <small>monitor panel</small> | ||
| 39 | + </h1> | ||
| 40 | + <ol class="breadcrumb"> | ||
| 41 | + <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 42 | + <li class="active">监审管理</li> | ||
| 43 | + </ol> | ||
| 44 | + </section> | ||
| 45 | + <section class="content"> | ||
| 46 | + <div class="row"> | ||
| 47 | + <div class="col-md-4"> | ||
| 48 | + <div class="box box-solid"> | ||
| 49 | + <div class="box-header with-border"> | ||
| 50 | + <h3 class="box-title">监控平台</h3> | ||
| 51 | + </div> | ||
| 52 | + <div class="box-body no-padding"> | ||
| 53 | + <div class="col-md-12" id="divShow_${item.id}"> | ||
| 54 | + <div class="box box-success box-solid"> | ||
| 55 | + <div class="box-header with-border"> | ||
| 56 | + <div class="text-overflow"> | ||
| 57 | + <h3 class="box-title" id="hidId">${item.title}</h3> | ||
| 58 | + </div> | ||
| 59 | + <div class="box-tools pull-right"> | ||
| 60 | + <button class="btn btn-sm" id="play_button_${item.id}" | ||
| 61 | + onclick="play(${item.id});">重新载入</button> | ||
| 62 | + </div> | ||
| 63 | + </div> | ||
| 64 | + <div id="playId" class="box-body"> | ||
| 65 | + <%-- <input type="hidden" name="play_url_${item.id}" | ||
| 66 | + id="play_url_${item.id}" value="${item.live_url}" /> <span | ||
| 67 | + class="mailbox-attachment-icon has-img" | ||
| 68 | + id="player_span_${item.id}"> <img | ||
| 69 | + src="../../static/assets/dist/img/photo2.png" | ||
| 70 | + alt="Attachment"> | ||
| 71 | + </span> --%> | ||
| 72 | + </div> | ||
| 73 | + </div> | ||
| 74 | + </div> | ||
| 75 | + </div> | ||
| 76 | + </div> | ||
| 77 | + <div class="box-header with-border"> | ||
| 78 | + <h3 class="box-title">直播信息:</h3> | ||
| 79 | + </div> | ||
| 80 | + <div class="box-body no-padding"> | ||
| 81 | + <ul class="nav nav-pills nav-stacked"> | ||
| 82 | + <li id="userId"><a><i class="fa fa-file-text-o"></i>用户ID:</a></li> | ||
| 83 | + <li id="title"><a><i class="fa fa-file-text-o"></i>TITLE: | ||
| 84 | + </a></li> | ||
| 85 | + <li id="startTime"><a><i class="fa fa-file-text-o"></i>开播时间: | ||
| 86 | + </a></li> | ||
| 87 | + </ul> | ||
| 88 | + </div> | ||
| 89 | + </div> | ||
| 90 | + <div class="col-md-8"> | ||
| 91 | + <div class="box box-primary"> | ||
| 92 | + <div class="box-header with-border"> | ||
| 93 | + <h3 class="box-title">监控</h3> | ||
| 94 | + <tag:pager id="product_pager" pager="${tLive}" /> | ||
| 95 | + </div> | ||
| 96 | + <div class="box-body no-padding"> | ||
| 97 | + <div class="row"> | ||
| 98 | + <c:forEach var="item" items="${tLive.recordList}" | ||
| 99 | + varStatus="stat"> | ||
| 100 | + <div class="col-md-3" id="divShow_${item.id}"> | ||
| 101 | + <div | ||
| 102 | + class="box ${item.check_sort eq null ? 'box-warning':'box-success'} box-solid"> | ||
| 103 | + <div class="box-header with-border"> | ||
| 104 | + <div class="text-overflow"> | ||
| 105 | + <h3 class="box-title">${item.title}</h3> | ||
| 106 | + </div> | ||
| 107 | + <div class="box-tools pull-right"> | ||
| 108 | + <button class="btn btn-sm btn-danger" | ||
| 109 | + onclick="changePlay('${item.id}','${item.live_url}','${item.t_user_id}','${item.title}','${item.start_time}');">左</button> | ||
| 110 | + <button class="btn btn-sm btn-danger" | ||
| 111 | + onclick="to_pass(${item.id});">过</button> | ||
| 112 | + <button class="btn btn-sm btn-danger" | ||
| 113 | + onclick="to_top(${item.id});">顶</button> | ||
| 114 | + <button class="btn btn-sm btn-danger" | ||
| 115 | + onclick="play_close('${item.id}','${item.live_url}','${item.uuid}');">断</button> | ||
| 116 | + </div> | ||
| 117 | + </div> | ||
| 118 | + <div class="box-body"> | ||
| 119 | + <input type="hidden" name="play_url_${item.id}" | ||
| 120 | + id="play_url_${item.id}" value="${item.live_url}" /> <span | ||
| 121 | + class="mailbox-attachment-icon has-img" | ||
| 122 | + id="player_span_${item.id}"> <img | ||
| 123 | + src="../../static/assets/dist/img/photo2.png" | ||
| 124 | + alt="Attachment"> | ||
| 125 | + </span> | ||
| 126 | + </div> | ||
| 127 | + </div> | ||
| 128 | + </div> | ||
| 129 | + </c:forEach> | ||
| 130 | + </div> | ||
| 131 | + </div> | ||
| 132 | + </div> | ||
| 133 | + </div> | ||
| 134 | + </div> | ||
| 135 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 136 | + <script src="${BASE}/static/assets/cnlive/js/player_m3u8.js"></script> | ||
| 137 | + </section> | ||
| 138 | + </div> | ||
| 139 | + </div> | ||
| 140 | +</body> | ||
| 141 | +<script type="text/javascript"> | ||
| 142 | +jwplayer("playId").setup({ | ||
| 143 | + file: "", | ||
| 144 | + height: 260, | ||
| 145 | + image: "/assets/myVideo.jpg", | ||
| 146 | + autostart:true, | ||
| 147 | + rtmp: { | ||
| 148 | + bufferlength: 0.1 | ||
| 149 | + }, | ||
| 150 | + width: 370 | ||
| 151 | +}); | ||
| 152 | +</script> | ||
| 153 | </html> | 153 | </html> |
| 154 | \ No newline at end of file | 154 | \ No newline at end of file |
src/main/webapp/pages/common/js.jsp
| 1 | -<%@ page language="java" pageEncoding="utf-8"%> | ||
| 2 | - | ||
| 3 | -<script src="${BASE}/static/assets/plugins/jQuery/jQuery-2.1.4.min.js"></script> | ||
| 4 | -<!-- Bootstrap 3.3.2 JS --> | ||
| 5 | -<script src="${BASE}/static/assets/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> | ||
| 6 | -<!-- Slimscroll --> | ||
| 7 | -<script src="${BASE}/static/assets/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script> | ||
| 8 | -<!-- FastClick --> | ||
| 9 | -<script src='${BASE}/static/assets/plugins/fastclick/fastclick.min.js'></script> | ||
| 10 | -<!-- AdminLTE App --> | ||
| 11 | -<script src="${BASE}/static/assets/dist/js/app.min.js" type="text/javascript"></script> | ||
| 12 | -<!-- AdminLTE for demo purposes --> | ||
| 13 | -<script src="${BASE}/static/assets/dist/js/demo.js" type="text/javascript"></script> | ||
| 14 | -<script src="${BASE}/static/assets/plugins/iCheck/1.0.2/icheck.js?v=1.0.2"></script> | ||
| 15 | -<!-- InputMask --> | ||
| 16 | -<script src="${BASE}/static/assets/plugins/input-mask/jquery.inputmask.js" type="text/javascript"></script> | ||
| 17 | -<script src="${BASE}/static/assets/plugins/input-mask/jquery.inputmask.date.extensions.js" type="text/javascript"></script> | ||
| 18 | -<script src="${BASE}/static/assets/plugins/input-mask/jquery.inputmask.extensions.js" type="text/javascript"></script> | ||
| 19 | -<!-- date-range-picker --> | ||
| 20 | -<script src="${BASE}/static/assets/third-party/moment.min.js" type="text/javascript"></script> | ||
| 21 | -<script src="${BASE}/static/assets/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script> | ||
| 22 | -<!-- bootstrap time picker --> | ||
| 23 | -<script src="${BASE}/static/assets/plugins/timepicker/bootstrap-timepicker.min.js" type="text/javascript"></script> | ||
| 24 | -<!-- iCheck 1.0.1 --> | ||
| 25 | -<script src="${BASE}/static/assets/plugins/iCheck/icheck.min.js" type="text/javascript"></script> | ||
| 26 | -<script src="${BASE}/static/assets/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script> | ||
| 27 | - | ||
| 28 | -<link rel="stylesheet" href="${BASE}/static/assets/plugins/fileinput/fileinput.css" /> | ||
| 29 | -<link rel="stylesheet" href="${BASE}/static/assets/plugins/fileinput/fileinput.min.css" /> | ||
| 30 | -<script src="${BASE}/static/assets/plugins/fileinput/fileinput.js"></script> | ||
| 31 | -<script src="${BASE}/static/assets/plugins/fileinput/fileinput.min.js"></script> | ||
| 32 | -<script src="${BASE}/static/assets/plugins/fileinput/fileinput_locale_zh.js"></script> | ||
| 33 | - | ||
| 34 | -<!-------直播系统所需 js 文件--> | ||
| 35 | -<script src="${BASE}/static/assets/cnlive/js/all_live.js" type="text/javascript"></script> | ||
| 36 | -<script src="${BASE}/static/assets/cnlive/js/live.js" type="text/javascript"></script> | ||
| 37 | -<script src="${BASE}/static/assets/cnlive/js/room.js" type="text/javascript"></script> | ||
| 38 | -<script src="${BASE}/static/assets/cnlive/js/channel.js" type="text/javascript"></script> | ||
| 39 | -<script src="${BASE}/static/assets/cnlive/js/signal.js" type="text/javascript"></script> | ||
| 40 | -<script src="${BASE}/static/assets/cnlive/js/wowza.js" type="text/javascript"></script> | ||
| 41 | -<script src="${BASE}/static/assets/cnlive/js/activity.js" type="text/javascript"></script> | ||
| 42 | -<script src="${BASE}/static/assets/cnlive/js/ajax_rest.js" type="text/javascript"></script> | ||
| 43 | -<!-- cnlive validate --> | ||
| 44 | -<script src="${BASE}/static/assets/plugins/validate/jquery.form.js"></script> | ||
| 45 | -<script src="${BASE}/static/assets/plugins/validate/jquery.metadata.js"></script> | ||
| 46 | -<script src="${BASE}/static/assets/plugins/validate/jquery.validate.js"></script> | ||
| 47 | - | ||
| 48 | -<script src="${BASE}/static/assets/plugins/easytree/easyTree.js"></script> | ||
| 49 | -<script src="${BASE}/static/assets/cnlive/js/common.js"></script> | ||
| 50 | -<script src="${BASE}/static/assets/cnlive/js/global.js"></script> | ||
| 51 | -<script type="text/javascript"> | ||
| 52 | - BASE = '${BASE}'; | 1 | +<%@ page language="java" pageEncoding="utf-8"%> |
| 2 | + | ||
| 3 | +<script src="${BASE}/static/assets/plugins/jQuery/jQuery-2.1.4.min.js"></script> | ||
| 4 | +<!-- Bootstrap 3.3.2 JS --> | ||
| 5 | +<script src="${BASE}/static/assets/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> | ||
| 6 | +<!-- Slimscroll --> | ||
| 7 | +<script src="${BASE}/static/assets/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script> | ||
| 8 | +<!-- FastClick --> | ||
| 9 | +<script src='${BASE}/static/assets/plugins/fastclick/fastclick.min.js'></script> | ||
| 10 | +<!-- AdminLTE App --> | ||
| 11 | +<script src="${BASE}/static/assets/dist/js/app.min.js" type="text/javascript"></script> | ||
| 12 | +<!-- AdminLTE for demo purposes --> | ||
| 13 | +<script src="${BASE}/static/assets/dist/js/demo.js" type="text/javascript"></script> | ||
| 14 | +<script src="${BASE}/static/assets/plugins/iCheck/1.0.2/icheck.js?v=1.0.2"></script> | ||
| 15 | +<!-- InputMask --> | ||
| 16 | +<script src="${BASE}/static/assets/plugins/input-mask/jquery.inputmask.js" type="text/javascript"></script> | ||
| 17 | +<script src="${BASE}/static/assets/plugins/input-mask/jquery.inputmask.date.extensions.js" type="text/javascript"></script> | ||
| 18 | +<script src="${BASE}/static/assets/plugins/input-mask/jquery.inputmask.extensions.js" type="text/javascript"></script> | ||
| 19 | +<!-- date-range-picker --> | ||
| 20 | +<script src="${BASE}/static/assets/third-party/moment.min.js" type="text/javascript"></script> | ||
| 21 | +<script src="${BASE}/static/assets/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script> | ||
| 22 | +<!-- bootstrap time picker --> | ||
| 23 | +<script src="${BASE}/static/assets/plugins/timepicker/bootstrap-timepicker.min.js" type="text/javascript"></script> | ||
| 24 | +<!-- iCheck 1.0.1 --> | ||
| 25 | +<script src="${BASE}/static/assets/plugins/iCheck/icheck.min.js" type="text/javascript"></script> | ||
| 26 | +<script src="${BASE}/static/assets/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script> | ||
| 27 | + | ||
| 28 | +<link rel="stylesheet" href="${BASE}/static/assets/plugins/fileinput/fileinput.css" /> | ||
| 29 | +<link rel="stylesheet" href="${BASE}/static/assets/plugins/fileinput/fileinput.min.css" /> | ||
| 30 | +<script src="${BASE}/static/assets/plugins/fileinput/fileinput.js"></script> | ||
| 31 | +<script src="${BASE}/static/assets/plugins/fileinput/fileinput.min.js"></script> | ||
| 32 | +<script src="${BASE}/static/assets/plugins/fileinput/fileinput_locale_zh.js"></script> | ||
| 33 | + | ||
| 34 | +<!-------直播系统所需 js 文件--> | ||
| 35 | +<script src="${BASE}/static/assets/cnlive/js/all_live.js" type="text/javascript"></script> | ||
| 36 | +<script src="${BASE}/static/assets/cnlive/js/live.js" type="text/javascript"></script> | ||
| 37 | +<script src="${BASE}/static/assets/cnlive/js/room.js" type="text/javascript"></script> | ||
| 38 | +<script src="${BASE}/static/assets/cnlive/js/channel.js" type="text/javascript"></script> | ||
| 39 | +<script src="${BASE}/static/assets/cnlive/js/signal.js" type="text/javascript"></script> | ||
| 40 | +<script src="${BASE}/static/assets/cnlive/js/wowza.js" type="text/javascript"></script> | ||
| 41 | +<script src="${BASE}/static/assets/cnlive/js/activity.js" type="text/javascript"></script> | ||
| 42 | +<script src="${BASE}/static/assets/cnlive/js/ajax_rest.js" type="text/javascript"></script> | ||
| 43 | +<!-- cnlive validate --> | ||
| 44 | +<script src="${BASE}/static/assets/plugins/validate/jquery.form.js"></script> | ||
| 45 | +<script src="${BASE}/static/assets/plugins/validate/jquery.metadata.js"></script> | ||
| 46 | +<script src="${BASE}/static/assets/plugins/validate/jquery.validate.js"></script> | ||
| 47 | + | ||
| 48 | +<script src="${BASE}/static/assets/plugins/easytree/easyTree.js"></script> | ||
| 49 | +<script src="${BASE}/static/assets/cnlive/js/common.js"></script> | ||
| 50 | +<script src="${BASE}/static/assets/cnlive/js/global.js"></script> | ||
| 51 | +<script type="text/javascript"> | ||
| 52 | + BASE = '${BASE}'; | ||
| 53 | </script> | 53 | </script> |
| 54 | \ No newline at end of file | 54 | \ No newline at end of file |
src/main/webapp/pages/common/left.jsp
| 1 | -<%@ page language="java" pageEncoding="utf-8"%> | ||
| 2 | -<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | -<aside class="main-sidebar"> | ||
| 4 | - <section class="sidebar"> | ||
| 5 | - <div class="user-panel"> | ||
| 6 | - <div class="pull-left image"> | ||
| 7 | - <img src="${BASE}/static/assets/dist/img/user2-160x160.jpg" | ||
| 8 | - class="img-circle" alt="User Image" /> | ||
| 9 | - </div> | ||
| 10 | - <div class="pull-left info"> | ||
| 11 | - <p> | ||
| 12 | - <a href="${BASE}/index">刘基城</a> | ||
| 13 | - </p> | ||
| 14 | - <i class="fa fa-circle text-success"></i> | ||
| 15 | - <c:if test="${sessionScope.roleId=='1'}">超级管理员</c:if> | ||
| 16 | - <c:if test="${sessionScope.roleId=='0'}">普通用户</c:if> | ||
| 17 | - <c:if test="${sessionScope.roleId=='2'}">总编室用户</c:if> | ||
| 18 | - </div> | ||
| 19 | - </div> | ||
| 20 | - <ul class="sidebar-menu"> | ||
| 21 | - <c:if test="${sessionScope.roleId=='1'}"> | ||
| 22 | - <li class="header">导航栏</li> | ||
| 23 | - <li> | ||
| 24 | - <a href="${BASE}/switch"><i class="fa fa-circle-o text-blue"></i>全局切换</a> | ||
| 25 | - </li> | ||
| 26 | - <li> | ||
| 27 | - <a href="${BASE}/channel/monitor/1"><i class="fa fa-circle-o text-yellow"></i>直播监控</a> | ||
| 28 | - </li> | ||
| 29 | - <li> | ||
| 30 | - <a href="${BASE}/activity/preload"><i class="fa fa-circle-o"></i>新增活动</a> | ||
| 31 | - </li> | ||
| 32 | - <li> | ||
| 33 | - <a href="${BASE}/activity/list/1"><i class="fa fa-circle-o text-red"></i>活动管理</a> | ||
| 34 | - </li> | ||
| 35 | - | ||
| 36 | - <li class="header">系统设置</li> | ||
| 37 | - <li> | ||
| 38 | - <a href="${BASE}/channel/list/1"><i class="fa fa-circle-o text-green"></i>频道管理</a> | ||
| 39 | - </li> | ||
| 40 | - <li> | ||
| 41 | - <a href="${BASE}/wowza/list/1"><i class="fa fa-circle-o text-blue"></i>播出服务管理</a> | ||
| 42 | - </li> | ||
| 43 | - <li> | ||
| 44 | - <a href="${BASE}/signal/list/1"><i class="fa fa-circle-o text-red"></i>信源管理</a> | ||
| 45 | - </li> | ||
| 46 | - </c:if> | ||
| 47 | - <c:if test="${sessionScope.roleId=='2'}"> | ||
| 48 | - <li class="header">UGC直播审查</li> | ||
| 49 | - <li> | ||
| 50 | - <a href="${BASE}/user/list/1"><i class="fa fa-circle-o text-yellow"></i>主播管理</a> | ||
| 51 | - </li> | ||
| 52 | - <li> | ||
| 53 | - <a href="${BASE}/check/list/1"><i class="fa fa-circle-o text-red"></i>直播审查</a> | ||
| 54 | - </li> | ||
| 55 | - <li> | ||
| 56 | - <a href="${BASE}/video/check/1"><i class="fa fa-circle-o text-green"></i>点播审查</a> | ||
| 57 | - </li> | ||
| 58 | - <li> | ||
| 59 | - <a href="${BASE}/live/alllive/1"><i class="fa fa-circle-o text-yellow"></i>直播管理</a> | ||
| 60 | - </li> | ||
| 61 | - <li> | ||
| 62 | - <a href="${BASE}/word/list"><i class="fa fa-circle-o text-yellow"></i>敏感词管理</a> | ||
| 63 | - </li> | ||
| 64 | - </c:if> | ||
| 65 | - </ul> | ||
| 66 | - </section> | ||
| 67 | - <!-- /.sidebar --> | 1 | +<%@ page language="java" pageEncoding="utf-8"%> |
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<aside class="main-sidebar"> | ||
| 4 | + <section class="sidebar"> | ||
| 5 | + <div class="user-panel"> | ||
| 6 | + <div class="pull-left image"> | ||
| 7 | + <img src="${BASE}/static/assets/dist/img/user2-160x160.jpg" | ||
| 8 | + class="img-circle" alt="User Image" /> | ||
| 9 | + </div> | ||
| 10 | + <div class="pull-left info"> | ||
| 11 | + <p> | ||
| 12 | + <a href="${BASE}/index">刘基城</a> | ||
| 13 | + </p> | ||
| 14 | + <i class="fa fa-circle text-success"></i> | ||
| 15 | + <c:if test="${sessionScope.roleId=='1'}">超级管理员</c:if> | ||
| 16 | + <c:if test="${sessionScope.roleId=='0'}">普通用户</c:if> | ||
| 17 | + <c:if test="${sessionScope.roleId=='2'}">总编室用户</c:if> | ||
| 18 | + </div> | ||
| 19 | + </div> | ||
| 20 | + <ul class="sidebar-menu"> | ||
| 21 | + <c:if test="${sessionScope.roleId=='1'}"> | ||
| 22 | + <li class="header">导航栏</li> | ||
| 23 | + <li> | ||
| 24 | + <a href="${BASE}/switch"><i class="fa fa-circle-o text-blue"></i>全局切换</a> | ||
| 25 | + </li> | ||
| 26 | + <li> | ||
| 27 | + <a href="${BASE}/channel/monitor/1"><i class="fa fa-circle-o text-yellow"></i>直播监控</a> | ||
| 28 | + </li> | ||
| 29 | + <li> | ||
| 30 | + <a href="${BASE}/activity/preload"><i class="fa fa-circle-o"></i>新增活动</a> | ||
| 31 | + </li> | ||
| 32 | + <li> | ||
| 33 | + <a href="${BASE}/activity/list/1"><i class="fa fa-circle-o text-red"></i>活动管理</a> | ||
| 34 | + </li> | ||
| 35 | + | ||
| 36 | + <li class="header">系统设置</li> | ||
| 37 | + <li> | ||
| 38 | + <a href="${BASE}/channel/list/1"><i class="fa fa-circle-o text-green"></i>频道管理</a> | ||
| 39 | + </li> | ||
| 40 | + <li> | ||
| 41 | + <a href="${BASE}/wowza/list/1"><i class="fa fa-circle-o text-blue"></i>播出服务管理</a> | ||
| 42 | + </li> | ||
| 43 | + <li> | ||
| 44 | + <a href="${BASE}/signal/list/1"><i class="fa fa-circle-o text-red"></i>信源管理</a> | ||
| 45 | + </li> | ||
| 46 | + </c:if> | ||
| 47 | + <c:if test="${sessionScope.roleId=='2'}"> | ||
| 48 | + <li class="header">UGC直播审查</li> | ||
| 49 | + <li> | ||
| 50 | + <a href="${BASE}/user/list/1"><i class="fa fa-circle-o text-yellow"></i>主播管理</a> | ||
| 51 | + </li> | ||
| 52 | + <li> | ||
| 53 | + <a href="${BASE}/check/list/1"><i class="fa fa-circle-o text-red"></i>直播审查</a> | ||
| 54 | + </li> | ||
| 55 | + <li> | ||
| 56 | + <a href="${BASE}/video/check/1"><i class="fa fa-circle-o text-green"></i>点播审查</a> | ||
| 57 | + </li> | ||
| 58 | + <li> | ||
| 59 | + <a href="${BASE}/live/alllive/1"><i class="fa fa-circle-o text-yellow"></i>直播管理</a> | ||
| 60 | + </li> | ||
| 61 | + <li> | ||
| 62 | + <a href="${BASE}/word/list"><i class="fa fa-circle-o text-yellow"></i>敏感词管理</a> | ||
| 63 | + </li> | ||
| 64 | + </c:if> | ||
| 65 | + </ul> | ||
| 66 | + </section> | ||
| 67 | + <!-- /.sidebar --> | ||
| 68 | </aside> | 68 | </aside> |
| 69 | \ No newline at end of file | 69 | \ No newline at end of file |
src/main/webapp/pages/live/all_live_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 role="form" action="../../live/search/1" method="get"> | ||
| 40 | - <div class="input-group"> | ||
| 41 | - <input type="text" name="search_user_id" id="search_user_id" | ||
| 42 | - class="form-control input-sm" style="width: 150px;" | ||
| 43 | - placeholder="用户id" /> <input type="text" | ||
| 44 | - name="search_title" id="search_title" | ||
| 45 | - class="form-control input-sm" style="width: 150px;" | ||
| 46 | - placeholder="活动名称" /> | ||
| 47 | - <button type="submit" class="btn btn-sm btn-default"> | ||
| 48 | - <i class="fa fa-search"></i>搜索 | ||
| 49 | - </button> | ||
| 50 | - </div> | ||
| 51 | - </form> | ||
| 52 | - </div> | ||
| 53 | - </div> | ||
| 54 | - </div> | ||
| 55 | - <!-- /.box-header --> | ||
| 56 | - <div class="box-body"> | ||
| 57 | - <table class="table table-bordered"> | ||
| 58 | - <tr> | ||
| 59 | - <th>活动ID</th> | ||
| 60 | - <th>stream_name</th> | ||
| 61 | - <th>活动名称</th> | ||
| 62 | - <th>开始时间</th> | ||
| 63 | - <th>结束时间</th> | ||
| 64 | - <th>状态</th> | ||
| 65 | - <th>下线</th> | ||
| 66 | - </tr> | ||
| 67 | - <c:forEach var="item" items="${tLive.recordList}" | ||
| 68 | - varStatus="stat"> | ||
| 69 | - <tr> | ||
| 70 | - <td>${item.id}</td> | ||
| 71 | - <td>${item.t_user_id}_${item.uuid}</td> | ||
| 72 | - <td>${item.title}</td> | ||
| 73 | - <td><fmt:formatDate value="${item.start_time}" | ||
| 74 | - pattern="yyyy-MM-dd HH:mm" /></td> | ||
| 75 | - <td>${item.end_time}</td> | ||
| 76 | - <td><c:if test="${item.t_status_id==0}"> | ||
| 77 | - <span class="badge bg-green">未开始</span> | ||
| 78 | - </c:if> <c:if test="${item.t_status_id==2}"> | ||
| 79 | - <span class="badge bg-green">正常结束</span> | ||
| 80 | - </c:if> <c:if test="${item.t_status_id==1}"> | ||
| 81 | - <span class="badge bg-yellow">直播中</span> | ||
| 82 | - </c:if> <c:if test="${item.t_status_id==-2}"> | ||
| 83 | - <span class="badge bg-red">异常结束</span> | ||
| 84 | - </c:if> | ||
| 85 | - | ||
| 86 | - <c:if test="${item.t_status_id==-3}"> | ||
| 87 | - <span class="badge bg-yellow">已经下线</span> | ||
| 88 | - </c:if> | ||
| 89 | - | ||
| 90 | - </td> | ||
| 91 | - | ||
| 92 | - <td> | ||
| 93 | - <%-- <button type="button" class="btn btn-xs btn-success" id="down" onclick="t_live_close('${item.id}','${item.uuid}');"> | ||
| 94 | - <i class="icon-upload"></i>下线 | ||
| 95 | - </button> --%> | ||
| 96 | - | ||
| 97 | - <button class="btn btn-danger btn-sm" | ||
| 98 | - onclick="t_live_close('${item.id}','${item.uuid}');"> | ||
| 99 | - <i class="fa fa-close"></i> | ||
| 100 | - </button> | ||
| 101 | - </td> | ||
| 102 | - </tr> | ||
| 103 | - </c:forEach> | ||
| 104 | - </table> | ||
| 105 | - </div> | ||
| 106 | - <!-- /.box-body --> | ||
| 107 | - <div class="box-footer clearfix"> | ||
| 108 | - <center> | ||
| 109 | - <tag:pager id="product_pager" pager="${tLive}" /> | ||
| 110 | - </center> | ||
| 111 | - </div> | ||
| 112 | - </div> | ||
| 113 | - </div> | ||
| 114 | - </div> | ||
| 115 | - </section> | ||
| 116 | - </div> | ||
| 117 | - <%@ include file="/pages/common/bottom.jsp"%> | ||
| 118 | - </div> | ||
| 119 | - <%@ include file="/pages/common/js.jsp"%> | ||
| 120 | -</body> | ||
| 121 | -</html> | 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 role="form" action="../../live/search/1" method="get"> | ||
| 40 | + <div class="input-group"> | ||
| 41 | + <input type="text" name="search_user_id" id="search_user_id" | ||
| 42 | + class="form-control input-sm" style="width: 150px;" | ||
| 43 | + placeholder="用户id" /> <input type="text" | ||
| 44 | + name="search_title" id="search_title" | ||
| 45 | + class="form-control input-sm" style="width: 150px;" | ||
| 46 | + placeholder="活动名称" /> | ||
| 47 | + <button type="submit" class="btn btn-sm btn-default"> | ||
| 48 | + <i class="fa fa-search"></i>搜索 | ||
| 49 | + </button> | ||
| 50 | + </div> | ||
| 51 | + </form> | ||
| 52 | + </div> | ||
| 53 | + </div> | ||
| 54 | + </div> | ||
| 55 | + <!-- /.box-header --> | ||
| 56 | + <div class="box-body"> | ||
| 57 | + <table class="table table-bordered"> | ||
| 58 | + <tr> | ||
| 59 | + <th>活动ID</th> | ||
| 60 | + <th>stream_name</th> | ||
| 61 | + <th>活动名称</th> | ||
| 62 | + <th>开始时间</th> | ||
| 63 | + <th>结束时间</th> | ||
| 64 | + <th>状态</th> | ||
| 65 | + <th>下线</th> | ||
| 66 | + </tr> | ||
| 67 | + <c:forEach var="item" items="${tLive.recordList}" | ||
| 68 | + varStatus="stat"> | ||
| 69 | + <tr> | ||
| 70 | + <td>${item.id}</td> | ||
| 71 | + <td>${item.t_user_id}_${item.uuid}</td> | ||
| 72 | + <td>${item.title}</td> | ||
| 73 | + <td><fmt:formatDate value="${item.start_time}" | ||
| 74 | + pattern="yyyy-MM-dd HH:mm" /></td> | ||
| 75 | + <td>${item.end_time}</td> | ||
| 76 | + <td><c:if test="${item.t_status_id==0}"> | ||
| 77 | + <span class="badge bg-green">未开始</span> | ||
| 78 | + </c:if> <c:if test="${item.t_status_id==2}"> | ||
| 79 | + <span class="badge bg-green">正常结束</span> | ||
| 80 | + </c:if> <c:if test="${item.t_status_id==1}"> | ||
| 81 | + <span class="badge bg-yellow">直播中</span> | ||
| 82 | + </c:if> <c:if test="${item.t_status_id==-2}"> | ||
| 83 | + <span class="badge bg-red">异常结束</span> | ||
| 84 | + </c:if> | ||
| 85 | + | ||
| 86 | + <c:if test="${item.t_status_id==-3}"> | ||
| 87 | + <span class="badge bg-yellow">已经下线</span> | ||
| 88 | + </c:if> | ||
| 89 | + | ||
| 90 | + </td> | ||
| 91 | + | ||
| 92 | + <td> | ||
| 93 | + <%-- <button type="button" class="btn btn-xs btn-success" id="down" onclick="t_live_close('${item.id}','${item.uuid}');"> | ||
| 94 | + <i class="icon-upload"></i>下线 | ||
| 95 | + </button> --%> | ||
| 96 | + | ||
| 97 | + <button class="btn btn-danger btn-sm" | ||
| 98 | + onclick="t_live_close('${item.id}','${item.uuid}');"> | ||
| 99 | + <i class="fa fa-close"></i> | ||
| 100 | + </button> | ||
| 101 | + </td> | ||
| 102 | + </tr> | ||
| 103 | + </c:forEach> | ||
| 104 | + </table> | ||
| 105 | + </div> | ||
| 106 | + <!-- /.box-body --> | ||
| 107 | + <div class="box-footer clearfix"> | ||
| 108 | + <center> | ||
| 109 | + <tag:pager id="product_pager" pager="${tLive}" /> | ||
| 110 | + </center> | ||
| 111 | + </div> | ||
| 112 | + </div> | ||
| 113 | + </div> | ||
| 114 | + </div> | ||
| 115 | + </section> | ||
| 116 | + </div> | ||
| 117 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 118 | + </div> | ||
| 119 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 120 | +</body> | ||
| 121 | +</html> |
src/main/webapp/pages/live/live_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 | - <script type="text/javascript" charset="utf-8" src="${BASE}/static/assets/ueditor/ueditor.config.js"></script> | ||
| 23 | - <script type="text/javascript" charset="utf-8" src="${BASE}/static/assets/ueditor/ueditor.all.min.js"> </script> | ||
| 24 | - <script type="text/javascript" charset="utf-8" src="${BASE}/static/assets/ueditor/lang/zh-cn/zh-cn.js"></script> | ||
| 25 | - | ||
| 26 | -</head> | ||
| 27 | -<body class="skin-blue fixed "> | ||
| 28 | - <div class="wrapper"> | ||
| 29 | - <%@ include file="/pages/common/top.jsp"%> | ||
| 30 | - <%@ include file="/pages/common/left.jsp"%> | ||
| 31 | - <div class="content-wrapper"> | ||
| 32 | - <section class="content-header"> | ||
| 33 | - <h1>${empty tActivity.id ? '新建活动':'编辑活动'} | ||
| 34 | - <small>${tActivity.name}</small> <small class="label label-warning" | ||
| 35 | - style="display: none" id="info_tab_span"><i | ||
| 36 | - class="fa fa-bell-o"></i>保存成功</small> | ||
| 37 | - </h1> | ||
| 38 | - <ol class="breadcrumb"> | ||
| 39 | - <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 40 | - <li class="active">新增活动</li> | ||
| 41 | - </ol> | ||
| 42 | - </section> | ||
| 43 | - <!-- Main content --> | ||
| 44 | - <section class="content"> | ||
| 45 | - | ||
| 46 | - <form id="create_form" enctype="multipart/form-data" method="post" > | ||
| 47 | - | ||
| 48 | - <div class="row"> | ||
| 49 | - <!-- right column --> | ||
| 50 | - <div class="col-md-12"> | ||
| 51 | - <!-- general form elements disabled --> | ||
| 52 | - <div class="box box-warning"> | ||
| 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" value="${tActivity.name }" name="name" | ||
| 59 | - id="name" class="form-control"> | ||
| 60 | - <input type="text" id="activity_id" name="activity_id" value="${tActivity.id}" hidden=""> | ||
| 61 | - </div> | ||
| 62 | - </div> | ||
| 63 | - <div class="form-group"> | ||
| 64 | - <label> 直播时间 </label> | ||
| 65 | - <div class="row"> | ||
| 66 | - <div class="col-lg-6"> | ||
| 67 | - <div class="input-group"> | ||
| 68 | - <span class="input-group-addon"> 开始时间 </span> <input | ||
| 69 | - type="text" class="form-control form_datetime" | ||
| 70 | - value="<fmt:formatDate value="${tActivity.start_time}" pattern="yyyy-MM-dd HH:mm"/>" | ||
| 71 | - name="start_time" id="start_time" | ||
| 72 | - data-inputmask="'alias': 'yyyy-MM-dd HH:mm'" data-mask="" /> | ||
| 73 | - </div> | ||
| 74 | - </div> | ||
| 75 | - <div class="col-lg-6"> | ||
| 76 | - <div class="input-group"> | ||
| 77 | - <span class="input-group-addon"> 结束时间</span> <input | ||
| 78 | - type="text" class="form-control form_datetime" | ||
| 79 | - value="<fmt:formatDate value="${tActivity.end_time}" pattern="yyyy-MM-dd HH:mm"/>" | ||
| 80 | - name="end_time" id="end_time" | ||
| 81 | - data-inputmask="'alias': 'yyyy-MM-dd HH:mm'" data-mask=""> | ||
| 82 | - </div> | ||
| 83 | - </div> | ||
| 84 | - </div> | ||
| 85 | - </div> | ||
| 86 | - <div class="form-group"> | ||
| 87 | - | ||
| 88 | - <label>封面海报 </label> | ||
| 89 | - <div class="input-group"> | ||
| 90 | - <span class="input-group-addon"><i | ||
| 91 | - class="fa fa-file-word-o"></i> </span> <input id="input-22" type="file" name="input-22" accept="image/*" class="file-loading"> | ||
| 92 | - | ||
| 93 | - </div> | ||
| 94 | - </div> | ||
| 95 | - <div class="form-group"> | ||
| 96 | - <label> 播出直播间 </label> | ||
| 97 | - <div class="box box-warning"> | ||
| 98 | - <div class="box-body"> | ||
| 99 | - <div class="form-group"> | ||
| 100 | - | ||
| 101 | - <select class="form-control" name="t_default_video_id" | ||
| 102 | - id="t_default_video_id"> | ||
| 103 | - | ||
| 104 | - <c:forEach var="item" items="${tRooms}" | ||
| 105 | - varStatus="stat"> | ||
| 106 | - <option id="t_room_id_${item.id}" ${item.id==tLive.t_room_id ? 'selected="selected"':''} value="${item.id}">${item.name}</option> | ||
| 107 | - </c:forEach> | ||
| 108 | - </select> | ||
| 109 | - </div> | ||
| 110 | - </div> | ||
| 111 | - </div> | ||
| 112 | - </div> | ||
| 113 | - | ||
| 114 | - <div class="form-group"> | ||
| 115 | - | ||
| 116 | - <label>活动简述 </label> | ||
| 117 | - | ||
| 118 | - <div class="input-group"> | ||
| 119 | - <span class="input-group-addon"><i | ||
| 120 | - class="fa fa-file-word-o"></i> </span> <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script> | ||
| 121 | - </div> | ||
| 122 | - </div> | ||
| 123 | - <div class="box-footer"> | ||
| 124 | - <button type="submit" id="t_activity_save_btn" | ||
| 125 | - name="t_activity_save_btn" class="btn btn-success"> | ||
| 126 | - <i class="fa fa-save "></i> 保存 | ||
| 127 | - </button> | ||
| 128 | - </div> | ||
| 129 | - </div> | ||
| 130 | - </div> | ||
| 131 | - </div> | ||
| 132 | - </div> | ||
| 133 | - </form> | ||
| 134 | - </div> | ||
| 135 | - </section> | ||
| 136 | - </div> | ||
| 137 | - </div> | ||
| 138 | - <%@ include file="/pages/common/bottom.jsp"%> | ||
| 139 | -</div> | ||
| 140 | - <!-- 信号选择结束 --> | ||
| 141 | - <%@ include file="/pages/common/js.jsp"%> | ||
| 142 | - | ||
| 143 | - <script type="text/javascript"> | ||
| 144 | - | ||
| 145 | - | ||
| 146 | - $(function () { | ||
| 147 | - //Money Euro | ||
| 148 | - $("[data-mask]").inputmask(); | ||
| 149 | - }); | ||
| 150 | - | ||
| 151 | - $(function () { | ||
| 152 | - $("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"}); | ||
| 153 | - //Datemask2 mm/dd/yyyy | ||
| 154 | - $("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"}); | ||
| 155 | - //Money Euro | ||
| 156 | - $("[data-mask]").inputmask(); | ||
| 157 | - | ||
| 158 | - //Date range picker | ||
| 159 | - $('#reservation').daterangepicker(); | ||
| 160 | - //Date range picker with time picker | ||
| 161 | - $('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A'}); | ||
| 162 | - //Date range as a button | ||
| 163 | - $('#daterange-btn').daterangepicker( | ||
| 164 | - { | ||
| 165 | - ranges: { | ||
| 166 | - 'Today': [moment(), moment()], | ||
| 167 | - 'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)], | ||
| 168 | - 'Last 7 Days': [moment().subtract('days', 6), moment()], | ||
| 169 | - 'Last 30 Days': [moment().subtract('days', 29), moment()], | ||
| 170 | - 'This Month': [moment().startOf('month'), moment().endOf('month')], | ||
| 171 | - 'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')] | ||
| 172 | - }, | ||
| 173 | - startDate: moment().subtract('days', 29), | ||
| 174 | - endDate: moment() | ||
| 175 | - }, | ||
| 176 | - function (start, end) { | ||
| 177 | - $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); | ||
| 178 | - } | ||
| 179 | - ); | ||
| 180 | - }); | ||
| 181 | - </script> | ||
| 182 | - | ||
| 183 | - | ||
| 184 | - <!-- Le javascript | ||
| 185 | - ================================================== --> | ||
| 186 | - <script | ||
| 187 | - src="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script> | ||
| 188 | - | ||
| 189 | - <script type="text/javascript"> | ||
| 190 | - $(".form_datetime").datetimepicker({ | ||
| 191 | - //format: "dd MM yyyy - hh:ii", | ||
| 192 | - format: "yyyy-mm-dd hh:ii", | ||
| 193 | - autoclose: true, | ||
| 194 | - todayBtn: true, | ||
| 195 | - pickerPosition: "bottom-right" | ||
| 196 | - }); | ||
| 197 | -</script> | ||
| 198 | - | ||
| 199 | -<script type="text/javascript"> | ||
| 200 | - | ||
| 201 | - //实例化编辑器 | ||
| 202 | - //建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例 | ||
| 203 | - var ue = UE.getEditor('editor',{ | ||
| 204 | - autoHeightEnabled: true, | ||
| 205 | - autoFloatEnabled: true | ||
| 206 | - }); | ||
| 207 | - | ||
| 208 | - | ||
| 209 | - function isFocus(e){ | ||
| 210 | - alert(UE.getEditor('editor').isFocus()); | ||
| 211 | - UE.dom.domUtils.preventDefault(e) | ||
| 212 | - } | ||
| 213 | - function setblur(e){ | ||
| 214 | - UE.getEditor('editor').blur(); | ||
| 215 | - UE.dom.domUtils.preventDefault(e) | ||
| 216 | - } | ||
| 217 | - function insertHtml() { | ||
| 218 | - var value = prompt('插入html代码', ''); | ||
| 219 | - UE.getEditor('editor').execCommand('insertHtml', value) | ||
| 220 | - } | ||
| 221 | - function createEditor() { | ||
| 222 | - enableBtn(); | ||
| 223 | - UE.getEditor('editor'); | ||
| 224 | - } | ||
| 225 | - function getAllHtml() { | ||
| 226 | - alert(UE.getEditor('editor').getAllHtml()) | ||
| 227 | - } | ||
| 228 | - function getContent() { | ||
| 229 | - var arr = []; | ||
| 230 | - arr.push("使用editor.getContent()方法可以获得编辑器的内容"); | ||
| 231 | - arr.push("内容为:"); | ||
| 232 | - arr.push(UE.getEditor('editor').getContent()); | ||
| 233 | - alert(arr.join("\n")); | ||
| 234 | - } | ||
| 235 | - function getPlainTxt() { | ||
| 236 | - var arr = []; | ||
| 237 | - arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容"); | ||
| 238 | - arr.push("内容为:"); | ||
| 239 | - arr.push(UE.getEditor('editor').getPlainTxt()); | ||
| 240 | - alert(arr.join('\n')) | ||
| 241 | - } | ||
| 242 | - function setContent(isAppendTo) { | ||
| 243 | - var arr = []; | ||
| 244 | - arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容"); | ||
| 245 | - UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo); | ||
| 246 | - alert(arr.join("\n")); | ||
| 247 | - } | ||
| 248 | - function setDisabled() { | ||
| 249 | - UE.getEditor('editor').setDisabled('fullscreen'); | ||
| 250 | - disableBtn("enable"); | ||
| 251 | - } | ||
| 252 | - | ||
| 253 | - function setEnabled() { | ||
| 254 | - UE.getEditor('editor').setEnabled(); | ||
| 255 | - enableBtn(); | ||
| 256 | - } | ||
| 257 | - | ||
| 258 | - function getText() { | ||
| 259 | - //当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容 | ||
| 260 | - var range = UE.getEditor('editor').selection.getRange(); | ||
| 261 | - range.select(); | ||
| 262 | - var txt = UE.getEditor('editor').selection.getText(); | ||
| 263 | - alert(txt) | ||
| 264 | - } | ||
| 265 | - | ||
| 266 | - function getContentTxt() { | ||
| 267 | - var arr = []; | ||
| 268 | - arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容"); | ||
| 269 | - arr.push("编辑器的纯文本内容为:"); | ||
| 270 | - arr.push(UE.getEditor('editor').getContentTxt()); | ||
| 271 | - alert(arr.join("\n")); | ||
| 272 | - } | ||
| 273 | - function hasContent() { | ||
| 274 | - var arr = []; | ||
| 275 | - arr.push("使用editor.hasContents()方法判断编辑器里是否有内容"); | ||
| 276 | - arr.push("判断结果为:"); | ||
| 277 | - arr.push(UE.getEditor('editor').hasContents()); | ||
| 278 | - alert(arr.join("\n")); | ||
| 279 | - } | ||
| 280 | - function setFocus() { | ||
| 281 | - UE.getEditor('editor').focus(); | ||
| 282 | - } | ||
| 283 | - function deleteEditor() { | ||
| 284 | - disableBtn(); | ||
| 285 | - UE.getEditor('editor').destroy(); | ||
| 286 | - } | ||
| 287 | - function disableBtn(str) { | ||
| 288 | - var div = document.getElementById('btns'); | ||
| 289 | - var btns = UE.dom.domUtils.getElementsByTagName(div, "button"); | ||
| 290 | - for (var i = 0, btn; btn = btns[i++];) { | ||
| 291 | - if (btn.id == str) { | ||
| 292 | - UE.dom.domUtils.removeAttributes(btn, ["disabled"]); | ||
| 293 | - } else { | ||
| 294 | - btn.setAttribute("disabled", "true"); | ||
| 295 | - } | ||
| 296 | - } | ||
| 297 | - } | ||
| 298 | - function enableBtn() { | ||
| 299 | - var div = document.getElementById('btns'); | ||
| 300 | - var btns = UE.dom.domUtils.getElementsByTagName(div, "button"); | ||
| 301 | - for (var i = 0, btn; btn = btns[i++];) { | ||
| 302 | - UE.dom.domUtils.removeAttributes(btn, ["disabled"]); | ||
| 303 | - } | ||
| 304 | - } | ||
| 305 | - | ||
| 306 | - function getLocalData () { | ||
| 307 | - alert(UE.getEditor('editor').execCommand( "getlocaldata" )); | ||
| 308 | - } | ||
| 309 | - | ||
| 310 | - function clearLocalData () { | ||
| 311 | - UE.getEditor('editor').execCommand( "clearlocaldata" ); | ||
| 312 | - alert("已清空草稿箱") | ||
| 313 | - } | ||
| 314 | - | ||
| 315 | - $(document).on('ready', function() { | ||
| 316 | - $("#input-22").fileinput({ | ||
| 317 | - previewFileType : "image", | ||
| 318 | - browseClass : "btn btn-success", | ||
| 319 | - browseLabel : "Pick Image", | ||
| 320 | - browseIcon : "<i class=\"glyphicon glyphicon-picture\"></i> ", | ||
| 321 | - removeClass : "btn btn-danger", | ||
| 322 | - removeLabel : "Delete", | ||
| 323 | - removeIcon : "<i class=\"glyphicon glyphicon-trash\"></i> ", | ||
| 324 | - uploadClass : "btn btn-info", | ||
| 325 | - uploadLabel : "Upload", | ||
| 326 | - uploadIcon : "<i class=\"glyphicon glyphicon-upload\"></i> " | ||
| 327 | - }); | ||
| 328 | - | ||
| 329 | - $(function() { | ||
| 330 | - $('#create_form').ajaxForm({ | ||
| 331 | - type : 'post', | ||
| 332 | - url : '../live/save', | ||
| 333 | - enctype : 'multipart/form-data', | ||
| 334 | - beforeSubmit : function() { | ||
| 335 | - return true; | ||
| 336 | - }, | ||
| 337 | - error : function(XMLHttpRequest, textStatus, errorThrown) { | ||
| 338 | - alert("错误"); | ||
| 339 | - }, | ||
| 340 | - success : function(result) { | ||
| 341 | - location.href = '../live/list/1'; | ||
| 342 | - } | ||
| 343 | - }); | ||
| 344 | - }); | ||
| 345 | - }); | ||
| 346 | - | ||
| 347 | - /* $(function() { | ||
| 348 | - $('#create_form').ajaxForm({ | ||
| 349 | - type : 'post', | ||
| 350 | - url : '../live/save', | ||
| 351 | - enctype : 'multipart/form-data', | ||
| 352 | - beforeSubmit : function() { | ||
| 353 | - var cms_column_ref_id=$("#input-22").val(); | ||
| 354 | - if(cms_column_ref_id==''){ | ||
| 355 | - alert("请输入栏目名称,点击获取,然后选择!"); | ||
| 356 | - return false; | ||
| 357 | - } | ||
| 358 | - }, | ||
| 359 | - error : function(XMLHttpRequest, textStatus, errorThrown) { | ||
| 360 | - alert("错误"); | ||
| 361 | - }, | ||
| 362 | - success : function(result) { | ||
| 363 | - location.href = '../live/list/1'; | ||
| 364 | - } | ||
| 365 | - }); | ||
| 366 | - }); | ||
| 367 | - */ | ||
| 368 | - | ||
| 369 | -</script> | ||
| 370 | -</body> | ||
| 371 | -</html> | 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 | + <script type="text/javascript" charset="utf-8" src="${BASE}/static/assets/ueditor/ueditor.config.js"></script> | ||
| 23 | + <script type="text/javascript" charset="utf-8" src="${BASE}/static/assets/ueditor/ueditor.all.min.js"> </script> | ||
| 24 | + <script type="text/javascript" charset="utf-8" src="${BASE}/static/assets/ueditor/lang/zh-cn/zh-cn.js"></script> | ||
| 25 | + | ||
| 26 | +</head> | ||
| 27 | +<body class="skin-blue fixed "> | ||
| 28 | + <div class="wrapper"> | ||
| 29 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 30 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 31 | + <div class="content-wrapper"> | ||
| 32 | + <section class="content-header"> | ||
| 33 | + <h1>${empty tActivity.id ? '新建活动':'编辑活动'} | ||
| 34 | + <small>${tActivity.name}</small> <small class="label label-warning" | ||
| 35 | + style="display: none" id="info_tab_span"><i | ||
| 36 | + class="fa fa-bell-o"></i>保存成功</small> | ||
| 37 | + </h1> | ||
| 38 | + <ol class="breadcrumb"> | ||
| 39 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 40 | + <li class="active">新增活动</li> | ||
| 41 | + </ol> | ||
| 42 | + </section> | ||
| 43 | + <!-- Main content --> | ||
| 44 | + <section class="content"> | ||
| 45 | + | ||
| 46 | + <form id="create_form" enctype="multipart/form-data" method="post" > | ||
| 47 | + | ||
| 48 | + <div class="row"> | ||
| 49 | + <!-- right column --> | ||
| 50 | + <div class="col-md-12"> | ||
| 51 | + <!-- general form elements disabled --> | ||
| 52 | + <div class="box box-warning"> | ||
| 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" value="${tActivity.name }" name="name" | ||
| 59 | + id="name" class="form-control"> | ||
| 60 | + <input type="text" id="activity_id" name="activity_id" value="${tActivity.id}" hidden=""> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | + <div class="form-group"> | ||
| 64 | + <label> 直播时间 </label> | ||
| 65 | + <div class="row"> | ||
| 66 | + <div class="col-lg-6"> | ||
| 67 | + <div class="input-group"> | ||
| 68 | + <span class="input-group-addon"> 开始时间 </span> <input | ||
| 69 | + type="text" class="form-control form_datetime" | ||
| 70 | + value="<fmt:formatDate value="${tActivity.start_time}" pattern="yyyy-MM-dd HH:mm"/>" | ||
| 71 | + name="start_time" id="start_time" | ||
| 72 | + data-inputmask="'alias': 'yyyy-MM-dd HH:mm'" data-mask="" /> | ||
| 73 | + </div> | ||
| 74 | + </div> | ||
| 75 | + <div class="col-lg-6"> | ||
| 76 | + <div class="input-group"> | ||
| 77 | + <span class="input-group-addon"> 结束时间</span> <input | ||
| 78 | + type="text" class="form-control form_datetime" | ||
| 79 | + value="<fmt:formatDate value="${tActivity.end_time}" pattern="yyyy-MM-dd HH:mm"/>" | ||
| 80 | + name="end_time" id="end_time" | ||
| 81 | + data-inputmask="'alias': 'yyyy-MM-dd HH:mm'" data-mask=""> | ||
| 82 | + </div> | ||
| 83 | + </div> | ||
| 84 | + </div> | ||
| 85 | + </div> | ||
| 86 | + <div class="form-group"> | ||
| 87 | + | ||
| 88 | + <label>封面海报 </label> | ||
| 89 | + <div class="input-group"> | ||
| 90 | + <span class="input-group-addon"><i | ||
| 91 | + class="fa fa-file-word-o"></i> </span> <input id="input-22" type="file" name="input-22" accept="image/*" class="file-loading"> | ||
| 92 | + | ||
| 93 | + </div> | ||
| 94 | + </div> | ||
| 95 | + <div class="form-group"> | ||
| 96 | + <label> 播出直播间 </label> | ||
| 97 | + <div class="box box-warning"> | ||
| 98 | + <div class="box-body"> | ||
| 99 | + <div class="form-group"> | ||
| 100 | + | ||
| 101 | + <select class="form-control" name="t_default_video_id" | ||
| 102 | + id="t_default_video_id"> | ||
| 103 | + | ||
| 104 | + <c:forEach var="item" items="${tRooms}" | ||
| 105 | + varStatus="stat"> | ||
| 106 | + <option id="t_room_id_${item.id}" ${item.id==tLive.t_room_id ? 'selected="selected"':''} value="${item.id}">${item.name}</option> | ||
| 107 | + </c:forEach> | ||
| 108 | + </select> | ||
| 109 | + </div> | ||
| 110 | + </div> | ||
| 111 | + </div> | ||
| 112 | + </div> | ||
| 113 | + | ||
| 114 | + <div class="form-group"> | ||
| 115 | + | ||
| 116 | + <label>活动简述 </label> | ||
| 117 | + | ||
| 118 | + <div class="input-group"> | ||
| 119 | + <span class="input-group-addon"><i | ||
| 120 | + class="fa fa-file-word-o"></i> </span> <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script> | ||
| 121 | + </div> | ||
| 122 | + </div> | ||
| 123 | + <div class="box-footer"> | ||
| 124 | + <button type="submit" id="t_activity_save_btn" | ||
| 125 | + name="t_activity_save_btn" class="btn btn-success"> | ||
| 126 | + <i class="fa fa-save "></i> 保存 | ||
| 127 | + </button> | ||
| 128 | + </div> | ||
| 129 | + </div> | ||
| 130 | + </div> | ||
| 131 | + </div> | ||
| 132 | + </div> | ||
| 133 | + </form> | ||
| 134 | + </div> | ||
| 135 | + </section> | ||
| 136 | + </div> | ||
| 137 | + </div> | ||
| 138 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 139 | +</div> | ||
| 140 | + <!-- 信号选择结束 --> | ||
| 141 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 142 | + | ||
| 143 | + <script type="text/javascript"> | ||
| 144 | + | ||
| 145 | + | ||
| 146 | + $(function () { | ||
| 147 | + //Money Euro | ||
| 148 | + $("[data-mask]").inputmask(); | ||
| 149 | + }); | ||
| 150 | + | ||
| 151 | + $(function () { | ||
| 152 | + $("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"}); | ||
| 153 | + //Datemask2 mm/dd/yyyy | ||
| 154 | + $("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"}); | ||
| 155 | + //Money Euro | ||
| 156 | + $("[data-mask]").inputmask(); | ||
| 157 | + | ||
| 158 | + //Date range picker | ||
| 159 | + $('#reservation').daterangepicker(); | ||
| 160 | + //Date range picker with time picker | ||
| 161 | + $('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A'}); | ||
| 162 | + //Date range as a button | ||
| 163 | + $('#daterange-btn').daterangepicker( | ||
| 164 | + { | ||
| 165 | + ranges: { | ||
| 166 | + 'Today': [moment(), moment()], | ||
| 167 | + 'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)], | ||
| 168 | + 'Last 7 Days': [moment().subtract('days', 6), moment()], | ||
| 169 | + 'Last 30 Days': [moment().subtract('days', 29), moment()], | ||
| 170 | + 'This Month': [moment().startOf('month'), moment().endOf('month')], | ||
| 171 | + 'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')] | ||
| 172 | + }, | ||
| 173 | + startDate: moment().subtract('days', 29), | ||
| 174 | + endDate: moment() | ||
| 175 | + }, | ||
| 176 | + function (start, end) { | ||
| 177 | + $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); | ||
| 178 | + } | ||
| 179 | + ); | ||
| 180 | + }); | ||
| 181 | + </script> | ||
| 182 | + | ||
| 183 | + | ||
| 184 | + <!-- Le javascript | ||
| 185 | + ================================================== --> | ||
| 186 | + <script | ||
| 187 | + src="http://www.bootcss.com/p/bootstrap-datetimepicker/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script> | ||
| 188 | + | ||
| 189 | + <script type="text/javascript"> | ||
| 190 | + $(".form_datetime").datetimepicker({ | ||
| 191 | + //format: "dd MM yyyy - hh:ii", | ||
| 192 | + format: "yyyy-mm-dd hh:ii", | ||
| 193 | + autoclose: true, | ||
| 194 | + todayBtn: true, | ||
| 195 | + pickerPosition: "bottom-right" | ||
| 196 | + }); | ||
| 197 | +</script> | ||
| 198 | + | ||
| 199 | +<script type="text/javascript"> | ||
| 200 | + | ||
| 201 | + //实例化编辑器 | ||
| 202 | + //建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例 | ||
| 203 | + var ue = UE.getEditor('editor',{ | ||
| 204 | + autoHeightEnabled: true, | ||
| 205 | + autoFloatEnabled: true | ||
| 206 | + }); | ||
| 207 | + | ||
| 208 | + | ||
| 209 | + function isFocus(e){ | ||
| 210 | + alert(UE.getEditor('editor').isFocus()); | ||
| 211 | + UE.dom.domUtils.preventDefault(e) | ||
| 212 | + } | ||
| 213 | + function setblur(e){ | ||
| 214 | + UE.getEditor('editor').blur(); | ||
| 215 | + UE.dom.domUtils.preventDefault(e) | ||
| 216 | + } | ||
| 217 | + function insertHtml() { | ||
| 218 | + var value = prompt('插入html代码', ''); | ||
| 219 | + UE.getEditor('editor').execCommand('insertHtml', value) | ||
| 220 | + } | ||
| 221 | + function createEditor() { | ||
| 222 | + enableBtn(); | ||
| 223 | + UE.getEditor('editor'); | ||
| 224 | + } | ||
| 225 | + function getAllHtml() { | ||
| 226 | + alert(UE.getEditor('editor').getAllHtml()) | ||
| 227 | + } | ||
| 228 | + function getContent() { | ||
| 229 | + var arr = []; | ||
| 230 | + arr.push("使用editor.getContent()方法可以获得编辑器的内容"); | ||
| 231 | + arr.push("内容为:"); | ||
| 232 | + arr.push(UE.getEditor('editor').getContent()); | ||
| 233 | + alert(arr.join("\n")); | ||
| 234 | + } | ||
| 235 | + function getPlainTxt() { | ||
| 236 | + var arr = []; | ||
| 237 | + arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容"); | ||
| 238 | + arr.push("内容为:"); | ||
| 239 | + arr.push(UE.getEditor('editor').getPlainTxt()); | ||
| 240 | + alert(arr.join('\n')) | ||
| 241 | + } | ||
| 242 | + function setContent(isAppendTo) { | ||
| 243 | + var arr = []; | ||
| 244 | + arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容"); | ||
| 245 | + UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo); | ||
| 246 | + alert(arr.join("\n")); | ||
| 247 | + } | ||
| 248 | + function setDisabled() { | ||
| 249 | + UE.getEditor('editor').setDisabled('fullscreen'); | ||
| 250 | + disableBtn("enable"); | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + function setEnabled() { | ||
| 254 | + UE.getEditor('editor').setEnabled(); | ||
| 255 | + enableBtn(); | ||
| 256 | + } | ||
| 257 | + | ||
| 258 | + function getText() { | ||
| 259 | + //当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容 | ||
| 260 | + var range = UE.getEditor('editor').selection.getRange(); | ||
| 261 | + range.select(); | ||
| 262 | + var txt = UE.getEditor('editor').selection.getText(); | ||
| 263 | + alert(txt) | ||
| 264 | + } | ||
| 265 | + | ||
| 266 | + function getContentTxt() { | ||
| 267 | + var arr = []; | ||
| 268 | + arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容"); | ||
| 269 | + arr.push("编辑器的纯文本内容为:"); | ||
| 270 | + arr.push(UE.getEditor('editor').getContentTxt()); | ||
| 271 | + alert(arr.join("\n")); | ||
| 272 | + } | ||
| 273 | + function hasContent() { | ||
| 274 | + var arr = []; | ||
| 275 | + arr.push("使用editor.hasContents()方法判断编辑器里是否有内容"); | ||
| 276 | + arr.push("判断结果为:"); | ||
| 277 | + arr.push(UE.getEditor('editor').hasContents()); | ||
| 278 | + alert(arr.join("\n")); | ||
| 279 | + } | ||
| 280 | + function setFocus() { | ||
| 281 | + UE.getEditor('editor').focus(); | ||
| 282 | + } | ||
| 283 | + function deleteEditor() { | ||
| 284 | + disableBtn(); | ||
| 285 | + UE.getEditor('editor').destroy(); | ||
| 286 | + } | ||
| 287 | + function disableBtn(str) { | ||
| 288 | + var div = document.getElementById('btns'); | ||
| 289 | + var btns = UE.dom.domUtils.getElementsByTagName(div, "button"); | ||
| 290 | + for (var i = 0, btn; btn = btns[i++];) { | ||
| 291 | + if (btn.id == str) { | ||
| 292 | + UE.dom.domUtils.removeAttributes(btn, ["disabled"]); | ||
| 293 | + } else { | ||
| 294 | + btn.setAttribute("disabled", "true"); | ||
| 295 | + } | ||
| 296 | + } | ||
| 297 | + } | ||
| 298 | + function enableBtn() { | ||
| 299 | + var div = document.getElementById('btns'); | ||
| 300 | + var btns = UE.dom.domUtils.getElementsByTagName(div, "button"); | ||
| 301 | + for (var i = 0, btn; btn = btns[i++];) { | ||
| 302 | + UE.dom.domUtils.removeAttributes(btn, ["disabled"]); | ||
| 303 | + } | ||
| 304 | + } | ||
| 305 | + | ||
| 306 | + function getLocalData () { | ||
| 307 | + alert(UE.getEditor('editor').execCommand( "getlocaldata" )); | ||
| 308 | + } | ||
| 309 | + | ||
| 310 | + function clearLocalData () { | ||
| 311 | + UE.getEditor('editor').execCommand( "clearlocaldata" ); | ||
| 312 | + alert("已清空草稿箱") | ||
| 313 | + } | ||
| 314 | + | ||
| 315 | + $(document).on('ready', function() { | ||
| 316 | + $("#input-22").fileinput({ | ||
| 317 | + previewFileType : "image", | ||
| 318 | + browseClass : "btn btn-success", | ||
| 319 | + browseLabel : "Pick Image", | ||
| 320 | + browseIcon : "<i class=\"glyphicon glyphicon-picture\"></i> ", | ||
| 321 | + removeClass : "btn btn-danger", | ||
| 322 | + removeLabel : "Delete", | ||
| 323 | + removeIcon : "<i class=\"glyphicon glyphicon-trash\"></i> ", | ||
| 324 | + uploadClass : "btn btn-info", | ||
| 325 | + uploadLabel : "Upload", | ||
| 326 | + uploadIcon : "<i class=\"glyphicon glyphicon-upload\"></i> " | ||
| 327 | + }); | ||
| 328 | + | ||
| 329 | + $(function() { | ||
| 330 | + $('#create_form').ajaxForm({ | ||
| 331 | + type : 'post', | ||
| 332 | + url : '../live/save', | ||
| 333 | + enctype : 'multipart/form-data', | ||
| 334 | + beforeSubmit : function() { | ||
| 335 | + return true; | ||
| 336 | + }, | ||
| 337 | + error : function(XMLHttpRequest, textStatus, errorThrown) { | ||
| 338 | + alert("错误"); | ||
| 339 | + }, | ||
| 340 | + success : function(result) { | ||
| 341 | + location.href = '../live/list/1'; | ||
| 342 | + } | ||
| 343 | + }); | ||
| 344 | + }); | ||
| 345 | + }); | ||
| 346 | + | ||
| 347 | + /* $(function() { | ||
| 348 | + $('#create_form').ajaxForm({ | ||
| 349 | + type : 'post', | ||
| 350 | + url : '../live/save', | ||
| 351 | + enctype : 'multipart/form-data', | ||
| 352 | + beforeSubmit : function() { | ||
| 353 | + var cms_column_ref_id=$("#input-22").val(); | ||
| 354 | + if(cms_column_ref_id==''){ | ||
| 355 | + alert("请输入栏目名称,点击获取,然后选择!"); | ||
| 356 | + return false; | ||
| 357 | + } | ||
| 358 | + }, | ||
| 359 | + error : function(XMLHttpRequest, textStatus, errorThrown) { | ||
| 360 | + alert("错误"); | ||
| 361 | + }, | ||
| 362 | + success : function(result) { | ||
| 363 | + location.href = '../live/list/1'; | ||
| 364 | + } | ||
| 365 | + }); | ||
| 366 | + }); | ||
| 367 | + */ | ||
| 368 | + | ||
| 369 | +</script> | ||
| 370 | +</body> | ||
| 371 | +</html> |
src/main/webapp/pages/live/live_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 | -<!-- | ||
| 14 | -<body class="skin-blue fixed ">--> | ||
| 15 | -<body class="skin-blue sidebar-mini"> | ||
| 16 | - <div class="wrapper"> | ||
| 17 | - <%@ include file="/pages/common/top.jsp"%> | ||
| 18 | - <%@ include file="/pages/common/left.jsp"%> | ||
| 19 | - <div class="content-wrapper"> | ||
| 20 | - <!-- Content Header (Page header) --> | ||
| 21 | - <section class="content-header"> | ||
| 22 | - <h1> | ||
| 23 | - 活动管理<small><a href="../../live/preload"><i | ||
| 24 | - class="fa fa-plus"></i>新增活动</a> </small> | ||
| 25 | - <small class="label label-warning" style="display: none" | ||
| 26 | - id="info_tab_span"><i class="fa fa-bell-o"></i></small> | ||
| 27 | - </h1> | ||
| 28 | - | ||
| 29 | - <ol class="breadcrumb"> | ||
| 30 | - <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 31 | - <li class="active">活动管理</li> | ||
| 32 | - </ol> | ||
| 33 | - </section> | ||
| 34 | - <!-- Main content --> | ||
| 35 | - <section class="content"> | ||
| 36 | - <div class="row"> | ||
| 37 | - <div class="col-xs-12"> | ||
| 38 | - <div class="box box-warning"> | ||
| 39 | - <div class="box-header with-border"> | ||
| 40 | - <h3 class="box-title"></h3> | ||
| 41 | - <div class="box-tools"> | ||
| 42 | - <div class="input-group"> | ||
| 43 | - <form action="../search/1" method="post"> | ||
| 44 | - <div class="input-group"> | ||
| 45 | - <input type="text" name="search_text" id="search_text" | ||
| 46 | - class="form-control input-sm" style="width: 150px;" | ||
| 47 | - placeholder="Search" /> | ||
| 48 | - <button id="t_activity_search_btn" type="submit" | ||
| 49 | - class="btn btn-sm btn-default"> | ||
| 50 | - <i class="fa fa-search"></i>搜索 | ||
| 51 | - </button> | ||
| 52 | - </div> | ||
| 53 | - </form> | ||
| 54 | - </div> | ||
| 55 | - </div> | ||
| 56 | - </div> | ||
| 57 | - <!-- /.box-header --> | ||
| 58 | - <div class="box-body"> | ||
| 59 | - <table class="table table-bordered"> | ||
| 60 | - <tr> | ||
| 61 | - <th>活动名称</th> | ||
| 62 | - <th>开始时间</th> | ||
| 63 | - <th>结束时间</th> | ||
| 64 | - <th>状态</th> | ||
| 65 | - <th>修改</th> | ||
| 66 | - <th>删除</th> | ||
| 67 | - </tr> | ||
| 68 | - <c:forEach var="item" items="${tLive.recordList}" | ||
| 69 | - varStatus="stat"> | ||
| 70 | - <tr> | ||
| 71 | - <td><a href="${BASE}/live/preview/${item.id}">${item.title}</a> | ||
| 72 | - </td> | ||
| 73 | - <td><fmt:formatDate value="${item.start_time}" | ||
| 74 | - pattern="yyyy-MM-dd HH:mm" /></td> | ||
| 75 | - <td>${item.end_time}</td> | ||
| 76 | - <td> | ||
| 77 | - <c:if test="${item.t_status_id==0}"> | ||
| 78 | - <span class="badge bg-green">未开始</span> | ||
| 79 | - </c:if> <c:if test="${item.t_status_id==1}"> | ||
| 80 | - <span class="badge bg-red">直播中</span> | ||
| 81 | - </c:if> <c:if test="${item.t_status_id==2}"> | ||
| 82 | - <span class="badge">直播结束</span> | ||
| 83 | - </c:if> <c:if test="${item.t_status_id==3}"> | ||
| 84 | - <span class="badge">回放同步中</span> | ||
| 85 | - </c:if> <c:if test="${item.t_status_id==4}"> | ||
| 86 | - <span class="badge">同步完成</span> | ||
| 87 | - </c:if> | ||
| 88 | - </td> | ||
| 89 | - <td> | ||
| 90 | - <button class="btn btn-default btn-sm" | ||
| 91 | - onclick="t_live_edit(${item.id});"> | ||
| 92 | - <i class="fa fa-edit"></i> | ||
| 93 | - </button> | ||
| 94 | - </td> | ||
| 95 | - <td> | ||
| 96 | - <button class="btn btn-danger btn-sm" | ||
| 97 | - onclick="t_live_delete(${item.id});"> | ||
| 98 | - <i class="fa fa-close"></i> | ||
| 99 | - </button> | ||
| 100 | - </td> | ||
| 101 | - </tr> | ||
| 102 | - </c:forEach> | ||
| 103 | - </table> | ||
| 104 | - </div> | ||
| 105 | - <!-- /.box-body --> | ||
| 106 | - <div class="box-footer clearfix"> | ||
| 107 | - <center> | ||
| 108 | - <tag:pager id="product_pager" pager="${tLive}" /> | ||
| 109 | - </center> | ||
| 110 | - </div> | ||
| 111 | - </div> | ||
| 112 | - </div> | ||
| 113 | - </div> | ||
| 114 | - </div> | ||
| 115 | - <%@ include file="/pages/common/bottom.jsp"%> | ||
| 116 | - </div> | ||
| 117 | - <%@ include file="/pages/common/js.jsp"%> | ||
| 118 | -</body> | ||
| 119 | -</html> | 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 | +<!-- | ||
| 14 | +<body class="skin-blue fixed ">--> | ||
| 15 | +<body class="skin-blue sidebar-mini"> | ||
| 16 | + <div class="wrapper"> | ||
| 17 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 18 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 19 | + <div class="content-wrapper"> | ||
| 20 | + <!-- Content Header (Page header) --> | ||
| 21 | + <section class="content-header"> | ||
| 22 | + <h1> | ||
| 23 | + 活动管理<small><a href="../../live/preload"><i | ||
| 24 | + class="fa fa-plus"></i>新增活动</a> </small> | ||
| 25 | + <small class="label label-warning" style="display: none" | ||
| 26 | + id="info_tab_span"><i class="fa fa-bell-o"></i></small> | ||
| 27 | + </h1> | ||
| 28 | + | ||
| 29 | + <ol class="breadcrumb"> | ||
| 30 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 31 | + <li class="active">活动管理</li> | ||
| 32 | + </ol> | ||
| 33 | + </section> | ||
| 34 | + <!-- Main content --> | ||
| 35 | + <section class="content"> | ||
| 36 | + <div class="row"> | ||
| 37 | + <div class="col-xs-12"> | ||
| 38 | + <div class="box box-warning"> | ||
| 39 | + <div class="box-header with-border"> | ||
| 40 | + <h3 class="box-title"></h3> | ||
| 41 | + <div class="box-tools"> | ||
| 42 | + <div class="input-group"> | ||
| 43 | + <form action="../search/1" method="post"> | ||
| 44 | + <div class="input-group"> | ||
| 45 | + <input type="text" name="search_text" id="search_text" | ||
| 46 | + class="form-control input-sm" style="width: 150px;" | ||
| 47 | + placeholder="Search" /> | ||
| 48 | + <button id="t_activity_search_btn" type="submit" | ||
| 49 | + class="btn btn-sm btn-default"> | ||
| 50 | + <i class="fa fa-search"></i>搜索 | ||
| 51 | + </button> | ||
| 52 | + </div> | ||
| 53 | + </form> | ||
| 54 | + </div> | ||
| 55 | + </div> | ||
| 56 | + </div> | ||
| 57 | + <!-- /.box-header --> | ||
| 58 | + <div class="box-body"> | ||
| 59 | + <table class="table table-bordered"> | ||
| 60 | + <tr> | ||
| 61 | + <th>活动名称</th> | ||
| 62 | + <th>开始时间</th> | ||
| 63 | + <th>结束时间</th> | ||
| 64 | + <th>状态</th> | ||
| 65 | + <th>修改</th> | ||
| 66 | + <th>删除</th> | ||
| 67 | + </tr> | ||
| 68 | + <c:forEach var="item" items="${tLive.recordList}" | ||
| 69 | + varStatus="stat"> | ||
| 70 | + <tr> | ||
| 71 | + <td><a href="${BASE}/live/preview/${item.id}">${item.title}</a> | ||
| 72 | + </td> | ||
| 73 | + <td><fmt:formatDate value="${item.start_time}" | ||
| 74 | + pattern="yyyy-MM-dd HH:mm" /></td> | ||
| 75 | + <td>${item.end_time}</td> | ||
| 76 | + <td> | ||
| 77 | + <c:if test="${item.t_status_id==0}"> | ||
| 78 | + <span class="badge bg-green">未开始</span> | ||
| 79 | + </c:if> <c:if test="${item.t_status_id==1}"> | ||
| 80 | + <span class="badge bg-red">直播中</span> | ||
| 81 | + </c:if> <c:if test="${item.t_status_id==2}"> | ||
| 82 | + <span class="badge">直播结束</span> | ||
| 83 | + </c:if> <c:if test="${item.t_status_id==3}"> | ||
| 84 | + <span class="badge">回放同步中</span> | ||
| 85 | + </c:if> <c:if test="${item.t_status_id==4}"> | ||
| 86 | + <span class="badge">同步完成</span> | ||
| 87 | + </c:if> | ||
| 88 | + </td> | ||
| 89 | + <td> | ||
| 90 | + <button class="btn btn-default btn-sm" | ||
| 91 | + onclick="t_live_edit(${item.id});"> | ||
| 92 | + <i class="fa fa-edit"></i> | ||
| 93 | + </button> | ||
| 94 | + </td> | ||
| 95 | + <td> | ||
| 96 | + <button class="btn btn-danger btn-sm" | ||
| 97 | + onclick="t_live_delete(${item.id});"> | ||
| 98 | + <i class="fa fa-close"></i> | ||
| 99 | + </button> | ||
| 100 | + </td> | ||
| 101 | + </tr> | ||
| 102 | + </c:forEach> | ||
| 103 | + </table> | ||
| 104 | + </div> | ||
| 105 | + <!-- /.box-body --> | ||
| 106 | + <div class="box-footer clearfix"> | ||
| 107 | + <center> | ||
| 108 | + <tag:pager id="product_pager" pager="${tLive}" /> | ||
| 109 | + </center> | ||
| 110 | + </div> | ||
| 111 | + </div> | ||
| 112 | + </div> | ||
| 113 | + </div> | ||
| 114 | + </div> | ||
| 115 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 116 | + </div> | ||
| 117 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 118 | +</body> | ||
| 119 | +</html> |
src/main/webapp/pages/live/video_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"></div> | ||
| 36 | - <div class="box-body"> | ||
| 37 | - <table class="table table-bordered"> | ||
| 38 | - <tr> | ||
| 39 | - <th width="30%">名称</th> | ||
| 40 | - <th width="30%">relation_id</th> | ||
| 41 | - <th width="30%">审核状态</th> | ||
| 42 | - <th width="10%">操作</th> | ||
| 43 | - </tr> | ||
| 44 | - <c:forEach var="item" items="${videos.recordList}" | ||
| 45 | - varStatus="stat"> | ||
| 46 | - <tr> | ||
| 47 | - <td><a onclick="t_live_xq(${item.id});">${item.title}</a></td> | ||
| 48 | - <td>${item.relation_id}</td> | ||
| 49 | - <td><c:choose> | ||
| 50 | - <c:when test="${item.check_state==1}"> | ||
| 51 | - <span class="badge bg-green">审核通过</span> | ||
| 52 | - </c:when> | ||
| 53 | - <c:otherwise> | ||
| 54 | - <span class="badge bg-red">未审核</span> | ||
| 55 | - </c:otherwise> | ||
| 56 | - </c:choose></td> | ||
| 57 | - <td> | ||
| 58 | - <button class="btn btn-danger btn-sm" | ||
| 59 | - onclick="t_live_underLine(${item.id});">下线</button> | ||
| 60 | - </td> | ||
| 61 | - </tr> | ||
| 62 | - </c:forEach> | ||
| 63 | - </table> | ||
| 64 | - </div> | ||
| 65 | - <!-- /.box-body --> | ||
| 66 | - <div class="box-footer clearfix"> | ||
| 67 | - <center> | ||
| 68 | - <tag:pager id="product_pager" pager="${videos}" /> | ||
| 69 | - </center> | ||
| 70 | - </div> | ||
| 71 | - </div> | ||
| 72 | - </div> | ||
| 73 | - </div> | ||
| 74 | - </div> | ||
| 75 | - <%@ include file="/pages/common/bottom.jsp"%> | ||
| 76 | - </div> | ||
| 77 | - <%@ include file="/pages/common/js.jsp"%> | ||
| 78 | -</body> | ||
| 79 | -</html> | 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"></div> | ||
| 36 | + <div class="box-body"> | ||
| 37 | + <table class="table table-bordered"> | ||
| 38 | + <tr> | ||
| 39 | + <th width="30%">名称</th> | ||
| 40 | + <th width="30%">relation_id</th> | ||
| 41 | + <th width="30%">审核状态</th> | ||
| 42 | + <th width="10%">操作</th> | ||
| 43 | + </tr> | ||
| 44 | + <c:forEach var="item" items="${videos.recordList}" | ||
| 45 | + varStatus="stat"> | ||
| 46 | + <tr> | ||
| 47 | + <td><a onclick="t_live_xq(${item.id});">${item.title}</a></td> | ||
| 48 | + <td>${item.relation_id}</td> | ||
| 49 | + <td><c:choose> | ||
| 50 | + <c:when test="${item.check_state==1}"> | ||
| 51 | + <span class="badge bg-green">审核通过</span> | ||
| 52 | + </c:when> | ||
| 53 | + <c:otherwise> | ||
| 54 | + <span class="badge bg-red">未审核</span> | ||
| 55 | + </c:otherwise> | ||
| 56 | + </c:choose></td> | ||
| 57 | + <td> | ||
| 58 | + <button class="btn btn-danger btn-sm" | ||
| 59 | + onclick="t_live_underLine(${item.id});">下线</button> | ||
| 60 | + </td> | ||
| 61 | + </tr> | ||
| 62 | + </c:forEach> | ||
| 63 | + </table> | ||
| 64 | + </div> | ||
| 65 | + <!-- /.box-body --> | ||
| 66 | + <div class="box-footer clearfix"> | ||
| 67 | + <center> | ||
| 68 | + <tag:pager id="product_pager" pager="${videos}" /> | ||
| 69 | + </center> | ||
| 70 | + </div> | ||
| 71 | + </div> | ||
| 72 | + </div> | ||
| 73 | + </div> | ||
| 74 | + </div> | ||
| 75 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 76 | + </div> | ||
| 77 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 78 | +</body> | ||
| 79 | +</html> |
src/main/webapp/pages/user/user_list.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 sidebar-mini"> | ||
| 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 | - <ol class="breadcrumb"> | ||
| 25 | - <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 26 | - <li><a>用户管理</a></li> | ||
| 27 | - </ol> | ||
| 28 | - </section> | ||
| 29 | - <!-- Main content --> | ||
| 30 | - <section class="content"> | ||
| 31 | - <div class="row"> | ||
| 32 | - <div class="col-xs-12"> | ||
| 33 | - <div class="box box-success"> | ||
| 34 | - <div class="box-header with-border"> | ||
| 35 | - <!-- <h3 class="box-title"></h3> --> | ||
| 36 | - <div class="box-tools"> | ||
| 37 | - <div class="input-group"></div> | ||
| 38 | - </div> | ||
| 39 | - </div> | ||
| 40 | - <!-- /.box-header --> | ||
| 41 | - <div class="box-body"> | ||
| 42 | - <table class="table table-bordered"> | ||
| 43 | - <tr> | ||
| 44 | - <th>用户名</th> | ||
| 45 | - <th>用户权限</th> | ||
| 46 | - <th>创建日期</th> | ||
| 47 | - <th>举报次数</th> | ||
| 48 | - <th>举报原因</th> | ||
| 49 | - <th>播放列表</th> | ||
| 50 | - </tr> | ||
| 51 | - <c:forEach var="item" items="${userPage.recordList}" | ||
| 52 | - varStatus="stat"> | ||
| 53 | - <tr> | ||
| 54 | - <td>${item.name}</td> | ||
| 55 | - <td>${item.is_admin}</td> | ||
| 56 | - <td>${item.create_time}</td> | ||
| 57 | - <td> | ||
| 58 | - <c:if test="${item.reported_count<=5}"><span class="badge">${item.reported_count}</span></c:if> | ||
| 59 | - <c:if test="${item.reported_count>5}"><span class="badge bg-red">${item.reported_count}</span></c:if> | ||
| 60 | - </td> | ||
| 61 | - <td> | ||
| 62 | - <c:forEach items="${fn:split(item.reported_reason,',')}" var="tags"> | ||
| 63 | - ${tags} | ||
| 64 | - </c:forEach> | ||
| 65 | - </td> | ||
| 66 | - <td><a href="${BASE}/user/live/${item.id}/1">查看</a></td> | ||
| 67 | - </tr> | ||
| 68 | - </c:forEach> | ||
| 69 | - </table> | ||
| 70 | - </div> | ||
| 71 | - <div class="box-footer clearfix "> | ||
| 72 | - <center> | ||
| 73 | - <tag:pager id="product_pager" pager="${userPage}" /> | ||
| 74 | - </center> | ||
| 75 | - </div> | ||
| 76 | - </div> | ||
| 77 | - </div> | ||
| 78 | - </div> | ||
| 79 | - </section> | ||
| 80 | - </div> | ||
| 81 | - <%@ include file="/pages/common/bottom.jsp"%> | ||
| 82 | - <%@ include file="/pages/common/js.jsp"%> | ||
| 83 | - </div> | ||
| 84 | -</body> | ||
| 85 | -</html> | 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 sidebar-mini"> | ||
| 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 | + <ol class="breadcrumb"> | ||
| 25 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 26 | + <li><a>用户管理</a></li> | ||
| 27 | + </ol> | ||
| 28 | + </section> | ||
| 29 | + <!-- Main content --> | ||
| 30 | + <section class="content"> | ||
| 31 | + <div class="row"> | ||
| 32 | + <div class="col-xs-12"> | ||
| 33 | + <div class="box box-success"> | ||
| 34 | + <div class="box-header with-border"> | ||
| 35 | + <!-- <h3 class="box-title"></h3> --> | ||
| 36 | + <div class="box-tools"> | ||
| 37 | + <div class="input-group"></div> | ||
| 38 | + </div> | ||
| 39 | + </div> | ||
| 40 | + <!-- /.box-header --> | ||
| 41 | + <div class="box-body"> | ||
| 42 | + <table class="table table-bordered"> | ||
| 43 | + <tr> | ||
| 44 | + <th>用户名</th> | ||
| 45 | + <th>用户权限</th> | ||
| 46 | + <th>创建日期</th> | ||
| 47 | + <th>举报次数</th> | ||
| 48 | + <th>举报原因</th> | ||
| 49 | + <th>播放列表</th> | ||
| 50 | + </tr> | ||
| 51 | + <c:forEach var="item" items="${userPage.recordList}" | ||
| 52 | + varStatus="stat"> | ||
| 53 | + <tr> | ||
| 54 | + <td>${item.name}</td> | ||
| 55 | + <td>${item.is_admin}</td> | ||
| 56 | + <td>${item.create_time}</td> | ||
| 57 | + <td> | ||
| 58 | + <c:if test="${item.reported_count<=5}"><span class="badge">${item.reported_count}</span></c:if> | ||
| 59 | + <c:if test="${item.reported_count>5}"><span class="badge bg-red">${item.reported_count}</span></c:if> | ||
| 60 | + </td> | ||
| 61 | + <td> | ||
| 62 | + <c:forEach items="${fn:split(item.reported_reason,',')}" var="tags"> | ||
| 63 | + ${tags} | ||
| 64 | + </c:forEach> | ||
| 65 | + </td> | ||
| 66 | + <td><a href="${BASE}/user/live/${item.id}/1">查看</a></td> | ||
| 67 | + </tr> | ||
| 68 | + </c:forEach> | ||
| 69 | + </table> | ||
| 70 | + </div> | ||
| 71 | + <div class="box-footer clearfix "> | ||
| 72 | + <center> | ||
| 73 | + <tag:pager id="product_pager" pager="${userPage}" /> | ||
| 74 | + </center> | ||
| 75 | + </div> | ||
| 76 | + </div> | ||
| 77 | + </div> | ||
| 78 | + </div> | ||
| 79 | + </section> | ||
| 80 | + </div> | ||
| 81 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 82 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 83 | + </div> | ||
| 84 | +</body> | ||
| 85 | +</html> |
src/main/webapp/pages/user/user_live_list.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 | -</head> | ||
| 14 | -<body class="skin-blue sidebar-mini"> | ||
| 15 | - <div class="wrapper"> | ||
| 16 | - <%@ include file="/pages/common/top.jsp"%> | ||
| 17 | - <%@ include file="/pages/common/left.jsp"%> | ||
| 18 | - <div class="content-wrapper"> | ||
| 19 | - <!-- Content Header (Page header) --> | ||
| 20 | - <section class="content-header"> | ||
| 21 | - <h1>播放列表</h1> | ||
| 22 | - <ol class="breadcrumb"> | ||
| 23 | - <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 24 | - <li><a>播放列表</a></li> | ||
| 25 | - </ol> | ||
| 26 | - </section> | ||
| 27 | - <!-- Main content --> | ||
| 28 | - <section class="content"> | ||
| 29 | - <div class="row"> | ||
| 30 | - <div class="col-xs-12"> | ||
| 31 | - <div class="box box-success"> | ||
| 32 | - <div class="box-header with-border"> | ||
| 33 | - <!-- <h3 class="box-title"></h3> --> | ||
| 34 | - <div class="box-tools"> | ||
| 35 | - <div class="input-group"></div> | ||
| 36 | - </div> | ||
| 37 | - </div> | ||
| 38 | - <!-- /.box-header --> | ||
| 39 | - <div class="box-body"> | ||
| 40 | - <table class="table table-bordered table-hover"> | ||
| 41 | - <tr> | ||
| 42 | - <th>标题</th> | ||
| 43 | - <th>状态</th> | ||
| 44 | - <th>开始时间</th> | ||
| 45 | - <th>结束时间</th> | ||
| 46 | - <th>回放地址</th> | ||
| 47 | - </tr> | ||
| 48 | - <c:forEach var="item" items="${userPage.recordList}" | ||
| 49 | - varStatus="stat"> | ||
| 50 | - <tr> | ||
| 51 | - <td>${item.title}</td> | ||
| 52 | - <td>${item.t_status_id}</td> | ||
| 53 | - <td>${item.start_time}</td> | ||
| 54 | - <td>${item.end_time}</td> | ||
| 55 | - <td><abbr title="initialism">${item.live_url}</abbr></td> | ||
| 56 | - </tr> | ||
| 57 | - </c:forEach> | ||
| 58 | - </table> | ||
| 59 | - </div> | ||
| 60 | - <div class="box-footer clearfix "> | ||
| 61 | - <center> | ||
| 62 | - <tag:pager id="product_pager" pager="${userPage}" /> | ||
| 63 | - </center> | ||
| 64 | - </div> | ||
| 65 | - </div> | ||
| 66 | - </div> | ||
| 67 | - </div> | ||
| 68 | - </section> | ||
| 69 | - </div> | ||
| 70 | - <%@ include file="/pages/common/bottom.jsp"%> | ||
| 71 | - <%@ include file="/pages/common/js.jsp"%> | ||
| 72 | - </div> | ||
| 73 | -</body> | ||
| 74 | -</html> | 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 | +</head> | ||
| 14 | +<body class="skin-blue sidebar-mini"> | ||
| 15 | + <div class="wrapper"> | ||
| 16 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 17 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 18 | + <div class="content-wrapper"> | ||
| 19 | + <!-- Content Header (Page header) --> | ||
| 20 | + <section class="content-header"> | ||
| 21 | + <h1>播放列表</h1> | ||
| 22 | + <ol class="breadcrumb"> | ||
| 23 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 24 | + <li><a>播放列表</a></li> | ||
| 25 | + </ol> | ||
| 26 | + </section> | ||
| 27 | + <!-- Main content --> | ||
| 28 | + <section class="content"> | ||
| 29 | + <div class="row"> | ||
| 30 | + <div class="col-xs-12"> | ||
| 31 | + <div class="box box-success"> | ||
| 32 | + <div class="box-header with-border"> | ||
| 33 | + <!-- <h3 class="box-title"></h3> --> | ||
| 34 | + <div class="box-tools"> | ||
| 35 | + <div class="input-group"></div> | ||
| 36 | + </div> | ||
| 37 | + </div> | ||
| 38 | + <!-- /.box-header --> | ||
| 39 | + <div class="box-body"> | ||
| 40 | + <table class="table table-bordered table-hover"> | ||
| 41 | + <tr> | ||
| 42 | + <th>标题</th> | ||
| 43 | + <th>状态</th> | ||
| 44 | + <th>开始时间</th> | ||
| 45 | + <th>结束时间</th> | ||
| 46 | + <th>回放地址</th> | ||
| 47 | + </tr> | ||
| 48 | + <c:forEach var="item" items="${userPage.recordList}" | ||
| 49 | + varStatus="stat"> | ||
| 50 | + <tr> | ||
| 51 | + <td>${item.title}</td> | ||
| 52 | + <td>${item.t_status_id}</td> | ||
| 53 | + <td>${item.start_time}</td> | ||
| 54 | + <td>${item.end_time}</td> | ||
| 55 | + <td><abbr title="initialism">${item.live_url}</abbr></td> | ||
| 56 | + </tr> | ||
| 57 | + </c:forEach> | ||
| 58 | + </table> | ||
| 59 | + </div> | ||
| 60 | + <div class="box-footer clearfix "> | ||
| 61 | + <center> | ||
| 62 | + <tag:pager id="product_pager" pager="${userPage}" /> | ||
| 63 | + </center> | ||
| 64 | + </div> | ||
| 65 | + </div> | ||
| 66 | + </div> | ||
| 67 | + </div> | ||
| 68 | + </section> | ||
| 69 | + </div> | ||
| 70 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 71 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 72 | + </div> | ||
| 73 | +</body> | ||
| 74 | +</html> |