edit.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap">
  5. <ul class="nav nav-tabs">
  6. <if condition="$from eq 'index'">
  7. <li ><a href="{:url('Video/index')}">等待审核列表</a></li>
  8. <elseif condition="$from eq 'lower'" />
  9. <li ><a href="{:url('Video/lower')}">列表</a></li>
  10. <elseif condition="$from eq 'nopassindex'" />
  11. <li ><a href="{:url('Video/nopassindex')}">未通过列表</a></li>
  12. <elseif condition="$from eq 'passindex'" />
  13. <li ><a href="{:url('Video/passindex')}">审核通过列表</a></li>
  14. <elseif condition="$from eq 'lowervideo'" />
  15. <li ><a href="{:url('Video/lowervideo')}">下架视频列表</a></li>
  16. </if>
  17. <li class="active"><a >编辑</a></li>
  18. </ul>
  19. <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Video/edit_post')}">
  20. <input type="hidden" name="id" value="{$video['id']}">
  21. <fieldset>
  22. <div class="form-group" >
  23. <label class="col-sm-2 control-label">视频状态</label>
  24. <if condition="$video['status'] eq '0'">
  25. <div class="col-md-6 col-sm-10">
  26. <label class="radio-inline" ><input type="radio" name="status" value="0" checked />待审核</label>
  27. <label class="radio-inline" ><input type="radio" name="status" value="1" />通过</label>
  28. <label class="radio-inline" ><input type="radio" name="status" value="2" >不通过</label>
  29. </div>
  30. <else />
  31. <if condition="$video['status'] eq '1'">
  32. <label class="col-sm-2 control-label" style="text-align: left;">通过</label>
  33. <elseif condition="$video['status'] eq '2'" />
  34. <div class="col-md-6 col-sm-10">
  35. <label class="radio-inline" ><input type="radio" name="status" value="1" />通过</label>
  36. <label class="radio-inline" ><input type="radio" name="status" value="2" checked >不通过</label>
  37. </div>
  38. </if>
  39. </if>
  40. </div>
  41. <div class="form-group" >
  42. <label for="input-user_nicename" class="col-sm-2 control-label"><span class="form-required">*</span>用户信息</label>
  43. <div class="col-md-6 col-sm-10">
  44. <input type="text" class="form-control" id="input-user_nicename" value=" {$video['userinfo']['user_nicename']} ({$video['uid']}) " readonly />
  45. </div>
  46. </div>
  47. <div class="form-group" >
  48. <label for="input-title" class="col-sm-2 control-label"><span class="form-required">*</span>标题</label>
  49. <div class="col-md-6 col-sm-10">
  50. <input type="text" class="form-control" id="input-title" name="title" value="{$video['title']}" />
  51. </div>
  52. </div>
  53. <div class="form-group">
  54. <label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>图片</label>
  55. <div class="col-md-6 col-sm-10">
  56. <input type="hidden" name="thumb" id="thumbewm" value="{$video['thumb']}">
  57. <a href="javascript:uploadOneImage('图片上传','#thumbewm');">
  58. <if condition="$video['thumb'] neq ''">
  59. <img src="{:get_upload_path($video['thumb'])}"
  60. id="thumbewm-preview"
  61. style="cursor: pointer;max-width:150px;max-height:150px;"/>
  62. <else/>
  63. <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumbewm-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
  64. </if>
  65. </a>
  66. <input type="button" class="btn btn-sm btn-cancel-thumbewm" value="取消图片">
  67. </div>
  68. </div>
  69. <div class="form-group" >
  70. <label for="input-ad_endtime" class="col-sm-2 control-label">视频</label>
  71. <div class="col-md-6 col-sm-10">
  72. <!-- <input type="hidden" name="href" id="thumb3" value="{$video['href']}"> -->
  73. <div class="playerzmblbkjP" id="playerzmblbkjP" style="width:500px;height:500px;"></div>
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. <label for="input-video_upload_type" class="col-sm-2 control-label"><span class="form-required">*</span>视频上传型式</label>
  78. <div class="col-md-6 col-sm-10">
  79. <label class="radio-inline"><input type="radio" name="video_upload_type" value="0" >视频链接</label>
  80. <label class="radio-inline"><input type="radio" name="video_upload_type" value="1" >视频文件</label>
  81. <span class="form-required" >* 需要更改视频时请选择对应上传型式,不需要重新上传视频时无需选择</span>
  82. </div>
  83. </div>
  84. <div class="form-group video_url_area" style="display: none;" >
  85. <label for="input-href_e" class="col-sm-2 control-label"><span class="form-required">*</span>视频链接</label>
  86. <div class="col-md-6 col-sm-10">
  87. <input type="text" class="form-control" id="input-href_e" name="href_e" />以http://或https://开头
  88. </div>
  89. </div>
  90. <div class="form-group video_url_area" style="display: none;" >
  91. <label for="input-href_e_w" class="col-sm-2 control-label"><span class="form-required">*</span>水印视频链接</label>
  92. <div class="col-md-6 col-sm-10">
  93. <input type="text" class="form-control" id="input-href_e_w" name="href_e_w" />以http://或https://开头
  94. </div>
  95. </div>
  96. <div class="form-group upload_video_area" style="display: none;">
  97. <label for="input-file" class="col-sm-2 control-label">上传视频</label>
  98. <div class="col-md-6 col-sm-10">
  99. <input type="file" class="form-control" id="input-file" name="file" />
  100. </div>
  101. </div>
  102. <div class="form-group upload_video_area" style="display: none;">
  103. <label for="input-file_w" class="col-sm-2 control-label">上传水印视频</label>
  104. <div class="col-md-6 col-sm-10">
  105. <input type="file" class="form-control" id="input-file_w" name="file_w" />
  106. </div>
  107. </div>
  108. </fieldset>
  109. <div class="form-actions">
  110. <div class="col-sm-offset-2 col-sm-10">
  111. <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
  112. <if condition="$from eq 'index'">
  113. <a class="btn btn-default" href="{:url('Video/index')}">{:lang('BACK')}</a>
  114. <elseif condition="$from eq 'lower'" />
  115. <a class="btn btn-default" href="{:url('Video/lower')}">{:lang('BACK')}</a>
  116. <elseif condition="$from eq 'nopassindex'" />
  117. <a class="btn btn-default" href="{:url('Video/nopassindex')}">{:lang('BACK')}</a>
  118. <elseif condition="$from eq 'passindex'" />
  119. <a class="btn btn-default" href="{:url('Video/passindex')}">{:lang('BACK')}</a>
  120. <elseif condition="$from eq 'lowervideo'" />
  121. <a class="btn btn-default" href="{:url('Video/lowervideo')}">{:lang('BACK')}</a>
  122. </if>
  123. </div>
  124. </div>
  125. </form>
  126. </div>
  127. <script src="__STATIC__/js/admin.js"></script>
  128. <script type="text/javascript" src="__STATIC__/playback/ckplayer.js" charset="utf-8"></script>
  129. <script type="text/javascript">
  130. $(function(){
  131. var flashvars={
  132. f:"{$video['href']}",//视频地址rtmp://testlive.anbig.com/5showcam/1737_1487723653
  133. a:'',//调用时的参数,只有当s>0的时候有效
  134. s:'0',//调用方式,0=普通方法(f=视频地址),1=网址形式,2=xml形式,3=swf形式(s>0时f=网址,配合a来完成对地址的组装)
  135. c:'0',//是否读取文本配置,0不是,1是
  136. t:'10|10',//视频开始前播放swf/图片时的时间,多个用竖线隔开
  137. y:'',//这里是使用网址形式调用广告地址时使用,前提是要设置l的值为空
  138. z:'',//缓冲广告,只能放一个,swf格式
  139. e:'8',//视频结束后的动作,0是调用js函数,1是循环播放,2是暂停播放并且不调用广告,3是调用视频推荐列表的插件,4是清除视频流并调用js功能和1差不多,5是暂停播放并且调用暂停广告
  140. v:'100',//默认音量,0-100之间
  141. p:'0',//视频默认0是暂停,1是播放,2是不加载视频
  142. h:'0', //播放http视频流时采用何种拖动方法,=0不使用任意拖动,=1是使用按关键帧,=2是按时间点,=3是自动判断按什么(如果视频格式是.mp4就按关键帧,.flv就按关键时间),=4也是自动判断(只要包含字符mp4就按mp4来,只要包含字符flv就按flv来)
  143. k:'32|63',//提示点时间,如 30|60鼠标经过进度栏30秒,60秒会提示n指定的相应的文字
  144. n:'这是提示点的功能,如果不需要删除k和n的值|提示点测试60秒',//提示点文字,跟k配合使用,如 提示点1|提示点2
  145. wh:'',//宽高比,可以自己定义视频的宽高或宽高比如:wh:'4:3',或wh:'1080:720'
  146. lv:'0',//是否是直播流,=1则锁定进度栏
  147. loaded:'loadedHandler',//当播放器加载完成后发送该js函数loaded
  148. //调用播放器的所有参数列表结束
  149. //以下为自定义的播放器参数用来在插件里引用的
  150. my_title:"{$video['title']}",
  151. my_url:encodeURIComponent(window.location.href)//本页面地址
  152. //调用自定义播放器参数结束
  153. };
  154. var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always'}; //这里定义播放器的其它参数如背景色(跟flashvars中的b不同),是否支持全屏,是否支持交互
  155. //var video=['http://img.ksbbs.com/asset/Mon_1605/0ec8cc80112a2d6.mp4->video/mp4'];
  156. var video=["{$video['href']}"];
  157. CKobject.embed('__STATIC__/playback/ckplayer.swf','playerzmblbkjP','ckplayer_playerzmblbkjP','100%','100%',false,flashvars,video,params);
  158. })
  159. </script>
  160. <script type="text/javascript">
  161. $(function(){
  162. $("input[name='video_upload_type']").click(function(){
  163. var val=$("input[name='video_upload_type']:checked").val();
  164. console.log(val);
  165. if(val==0){
  166. $(".video_url_area").show();
  167. $(".upload_video_area").hide();
  168. }else{
  169. $(".video_url_area").hide();
  170. $(".upload_video_area").show();
  171. $("input[name='href_e']").val('');
  172. $("input[name='href_e_w']").val('');
  173. }
  174. });
  175. $('.btn-cancel-thumbewm').click(function () {
  176. $('#thumbewm-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
  177. $('#thumbewm').val('');
  178. });
  179. });
  180. </script>
  181. </body>
  182. </html>