playback_index.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <PHP>
  5. function get_level($id){
  6. $get_level=$GLOBALS['db']->getOne("select ul.name from ".DB_PREFIX."user_level as ul left join ".DB_PREFIX."user as u on u.user_level = ul.level where u.id=".$id);
  7. return $get_level;
  8. }
  9. function get_nickname($id){
  10. $get_nickname=$GLOBALS['db']->getOne("select nick_name from ".DB_PREFIX."user where id=".$id);
  11. return emoji_decode($get_nickname);
  12. }
  13. function get_room_type($room_type){
  14. if($room_type==1){
  15. return "私密";
  16. }elseif($room_type==2){
  17. return "聊天室";
  18. }elseif($room_type==3){
  19. return "互动聊天室";
  20. }else{
  21. return "公开";
  22. }
  23. }
  24. function set_demand_video_status($id,$video){
  25. if($video['live_in']==0){
  26. return "<a href=\"javascript:demand_video_status('".$id."')\">上线</a>";
  27. }else{
  28. return "<a href=\"javascript:demand_video_status('".$id."')\">下线</a>";
  29. }
  30. }
  31. function set_vod_concatvideo($id,$video){
  32. if($video['is_concatvideo']==0){
  33. return "<a href=\"javascript:concatvideo('".$id."')\">合并视频</a>";
  34. }else{
  35. return "<a>视频已合并</a>";
  36. }
  37. }
  38. function video_status($live_in){
  39. if($live_in==0){
  40. return "否";
  41. }elseif($live_in==3){
  42. return "是";
  43. }
  44. }
  45. function live_pay($is_live_pay){
  46. if($is_live_pay==0){
  47. return "否";
  48. }elseif($is_live_pay==1){
  49. return "是";
  50. }}
  51. function live_pay_type($live_pay_type,$video){
  52. if($video['is_live_pay']==1){
  53. if($live_pay_type==1){
  54. return "按场收费";
  55. }elseif($live_pay_type==0){
  56. return "按时收费";
  57. }elseif($live_pay_type==2){
  58. return "暂未收费";
  59. }
  60. }
  61. }
  62. function set_live_pay($id,$video){
  63. if($video['pay_editable']==1){
  64. return "<a href=\"javascript:set_live_pay('".$id."')\">编辑</a>";
  65. }
  66. }
  67. </PHP>
  68. <script>
  69. // console.log("before");
  70. // if (!TECENT_VIDEO) {
  71. // console.log("in");
  72. // $(".button-add").css("display","none");
  73. // }
  74. function set_live_pay(id){
  75. $.ajax({
  76. url: ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=set_live_pay&id="+id,
  77. data: "ajax=1",
  78. dataType: "json",
  79. success: function(msg){
  80. if(msg.status==0){
  81. alert(msg.info);
  82. }
  83. },
  84. error: function(){
  85. $.weeboxs.open(ROOT+'?'+VAR_MODULE+'='+MODULE_NAME+'&'+VAR_ACTION+'=set_live_pay&id='+id, {contentType:'ajax',showButton:false,title:'付费设置',width:600,height:200});
  86. }
  87. });
  88. }
  89. function get_preview(id)
  90. {
  91. window.open(ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=play&id="+id);
  92. }
  93. function del_video(id)
  94. {
  95. if(!id)
  96. {
  97. idBox = $(".key:checked");
  98. if(idBox.length == 0)
  99. {
  100. alert(LANG['DELETE_EMPTY_WARNING']);
  101. return;
  102. }
  103. idArray = new Array();
  104. $.each( idBox, function(i, n){
  105. idArray.push($(n).val());
  106. });
  107. id = idArray.join(",");
  108. }
  109. if(confirm(LANG['CONFIRM_DELETE']))
  110. $.ajax({
  111. url: ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=del_video&id="+id,
  112. data: "ajax=1",
  113. dataType: "json",
  114. success: function(obj){
  115. alert(obj.info);
  116. func();
  117. function func(){
  118. if(obj.status==1){
  119. location.href=location.href;
  120. }
  121. }
  122. }
  123. });
  124. }
  125. function demand_video_status(id)
  126. {
  127. /*if(!id)
  128. {
  129. idBox = $(".key:checked");
  130. if(idBox.length == 0)
  131. {
  132. alert(LANG['VIDEO_STATUS_WARNING']);
  133. return;
  134. }
  135. idArray = new Array();
  136. $.each( idBox, function(i, n){
  137. idArray.push($(n).val());
  138. });
  139. id = idArray.join(",");
  140. }LANG['CONFIRM_VIDEO_STATUS']*/
  141. if(confirm("确定要修改状态?"))
  142. $.ajax({
  143. url: ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=set_demand_video_status&id="+id,
  144. data: "ajax=1",
  145. dataType: "json",
  146. success: function(obj){
  147. alert(obj.info);
  148. func();
  149. function func(){
  150. if(obj.status==1){
  151. location.href=location.href;
  152. }
  153. }
  154. }
  155. });
  156. }
  157. </script>
  158. <load href='__TMPL__Common/js/jquery.bgiframe.js' />
  159. <load href='__TMPL__Common/js/jquery.weebox.js' />
  160. <load href='__TMPL__Common/js/deal.js' />
  161. <load href='__TMPL__Common/style/weebox.css' />
  162. <script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
  163. <load href='__TMPL__Common/js/calendar/calendar.css' />
  164. <load href='__TMPL__Common/js/calendar/calendar.js' />
  165. <div class="main">
  166. <div class="main_title_list"><div class="list-line-ico"></div>审核视频列表</div>
  167. <div class="button_row">
  168. </div>
  169. <div class="search_row">
  170. </div>
  171. <html:list
  172. id="dataTable"
  173. style="dataTable"
  174. name="video"
  175. checkbox="true"
  176. action="true"
  177. datasource="list"
  178. show="id:房间号
  179. ,user_id:主播ID
  180. ,user_id|get_nickname=$video['user_id']:主播
  181. ,title:直播标题
  182. ,max_watch_number:累计观看人数
  183. ,vote_number:{%TICKET}
  184. ,room_type|get_room_type=$video['room_type']:直播类型
  185. ,live_in|video_status=$video['live_in']:上线
  186. ,create_time|to_date:创建时间
  187. ,end_time|to_date:结束时间
  188. ,len_time:直播时长"
  189. actionlist="get_preview:查看,id|set_demand_video_status=$video" />
  190. <table class="dataTable">
  191. <tbody>
  192. <td colspan="11">
  193. </tbody>
  194. </table>
  195. <div class="page">{$page}</div>
  196. </div>
  197. <include file="Public:footer" />