edit.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <include file="public@header" />
  2. </head>
  3. <body>
  4. <div class="wrap">
  5. <ul class="nav nav-tabs">
  6. <li ><a href="{:url('Liveing/index')}">直播列表</a></li>
  7. <li class="active"><a >{:lang('EDIT')}</a></li>
  8. </ul>
  9. <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Liveing/editPost')}">
  10. <div class="form-group">
  11. <label for="input-uid" class="col-sm-2 control-label"><span class="form-required">*</span>用户ID</label>
  12. <div class="col-md-6 col-sm-10">
  13. <input type="text" class="form-control" id="input-uid" name="uid" value="{$data['uid']}" readonly>
  14. </div>
  15. </div>
  16. <div class="form-group" id="liveclass">
  17. <label for="input-type" class="col-sm-2 control-label"><span class="form-required">*</span>直播分类</label>
  18. <div class="col-md-6 col-sm-10">
  19. <select class="form-control" name="liveclassid">
  20. <option value="0" <eq name="data['liveclassid']" value="0">selected</eq>>默认分类</option>
  21. <volist name="liveclass" id="v">
  22. <option value="{$key}" <if condition="$data['liveclassid'] gt 0 and $data['liveclassid'] eq $key">selected</if>>{$v}</option>
  23. </volist>
  24. </select>
  25. </div>
  26. </div>
  27. <div class="form-group" id="type" >
  28. <label for="input-type" class="col-sm-2 control-label"><span class="form-required">*</span>房间类型</label>
  29. <div class="col-md-6 col-sm-10">
  30. <select class="form-control" name="type" id="cdn">
  31. <volist name="type" id="v">
  32. <option value="{$key}" <eq name="data['type']" value="$key">selected</eq>>{$v}</option>
  33. </volist>
  34. </select>
  35. </div>
  36. </div>
  37. <div class="form-group" id="cdn_switch_1">
  38. <label for="input-type_val" class="col-sm-2 control-label"><span class="form-required">*</span>密码或价格</label>
  39. <div class="col-md-6 col-sm-10">
  40. <input type="text" class="form-control" id="input-type_val" name="type_val" value="{$data['type_val']}">
  41. </div>
  42. </div>
  43. <div class="form-group">
  44. <label for="input-pull" class="col-sm-2 control-label"><span class="form-required">*</span>播流地址</label>
  45. <div class="col-md-6 col-sm-10">
  46. <input type="text" class="form-control" id="input-pull" name="pull" value="{$data['pull']}">播流格式:MP4
  47. </div>
  48. </div>
  49. <div class="form-group">
  50. <label for="input-push" class="col-sm-2 control-label"><span class="form-required">*</span>推流地址</label>
  51. <div class="col-md-6 col-sm-10">
  52. <input type="text" class="form-control" id="input-push" name="push" value="{$data['pull']}">推流格式:MP4
  53. </div>
  54. </div>
  55. <div class="form-group" id="anyway">
  56. <label for="input-words" class="col-sm-2 control-label"><span class="form-required">*</span>视频类型</label>
  57. <div class="col-md-6 col-sm-10">
  58. <select class="form-control" name="anyway">
  59. <option value="0" >竖屏</option>
  60. <option value="1" <eq name="data['anyway']" value="1">selected</eq>>横屏</option>
  61. </select>
  62. </div>
  63. </div>
  64. <div class="form-group">
  65. <div class="col-sm-offset-2 col-sm-10">
  66. <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
  67. <a class="btn btn-default" href="{:url('Liveing/index')}">{:lang('BACK')}</a>
  68. </div>
  69. </div>
  70. </form>
  71. </div>
  72. <script src="__STATIC__/js/admin.js"></script>
  73. <script type="text/javascript">
  74. (function(){
  75. $("#cdn").on('change',function(){
  76. var v=$(this).val();
  77. var b=$("#cdn_switch_1");
  78. if(v==0){
  79. b.hide();
  80. $("#input-type_val").val('');
  81. }else{
  82. b.show();
  83. }
  84. });
  85. $("#live_type").on('change',function(){
  86. var v=$(this).val();
  87. if(v==0){
  88. $("#liveclass").show();
  89. $("#type").show();
  90. $("#anyway").show();
  91. }else{
  92. $("#liveclass").hide();
  93. $("#type").hide();
  94. $("#anyway").hide();
  95. }
  96. });
  97. })()
  98. </script>
  99. </body>
  100. </html>