%%1C^1C2^1C28155E%%delivery_channels_add.html.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?php /* Smarty version 2.6.17, created on 2018-04-18 11:58:11
  2. compiled from admin/activity/delivery_channels_add.html */ ?>
  3. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  4. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/header.html", 'smarty_include_vars' => array()));
  5. $this->_tpl_vars = $_smarty_tpl_vars;
  6. unset($_smarty_tpl_vars);
  7. ?>
  8. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  9. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/left.html", 'smarty_include_vars' => array()));
  10. $this->_tpl_vars = $_smarty_tpl_vars;
  11. unset($_smarty_tpl_vars);
  12. ?>
  13. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  14. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/nav.html", 'smarty_include_vars' => array()));
  15. $this->_tpl_vars = $_smarty_tpl_vars;
  16. unset($_smarty_tpl_vars);
  17. ?>
  18. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  19. $this->_smarty_include(array('smarty_include_tpl_file' => "get_kindeditor.html", 'smarty_include_vars' => array()));
  20. $this->_tpl_vars = $_smarty_tpl_vars;
  21. unset($_smarty_tpl_vars);
  22. ?>
  23. <style>
  24. .set-nav {
  25. margin: 0 auto;
  26. }
  27. .set-nav-hr {
  28. background-color: #ddd;
  29. height: 1px;
  30. position: relative;
  31. }
  32. .form-group label {
  33. font-weight: 600;
  34. }
  35. .checkbox-inline, .radio-inline {
  36. font-weight: 400!important;
  37. }
  38. .rowlabel {
  39. font-weight: 300!important;
  40. }
  41. .music_play_hide {
  42. display:none;
  43. }
  44. </style>
  45. <div id="activity_container">
  46. <form id="activity_form">
  47. <div class="activity_center">
  48. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  49. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_nav.html", 'smarty_include_vars' => array()));
  50. $this->_tpl_vars = $_smarty_tpl_vars;
  51. unset($_smarty_tpl_vars);
  52. ?>
  53. <input name="events_id" type="hidden" value="<?php echo $this->_tpl_vars['eventData']['id']; ?>
  54. ">
  55. <div class="panel panel-default">
  56. <div class="panel-heading"><h3 class="panel-title" id="panel-title">添加投放渠道</h3></div>
  57. <div class="panel-body">
  58. <div class="form-group">
  59. <label class="control-label rowlabel">渠道名称:</label> <small class="text-danger"><24个字</small>
  60. <input class="form-control" type="text" value="" name="str_name" id="str_name"/>
  61. <?php if ($this->_tpl_vars['platFormIds']): ?>
  62. <br>
  63. <label class="control-label rowlabel">选择列表:</label> <small class="text-danger">选择投放渠道所在列表</small><br>
  64. <?php $_from = $this->_tpl_vars['platFormData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  65. foreach ($_from as $this->_tpl_vars['index'] => $this->_tpl_vars['form']):
  66. ?>
  67. <?php if ($this->_tpl_vars['platFormIds'][$this->_tpl_vars['index']]): ?>
  68. <label class="checkbox-inline">
  69. <input type="checkbox" value="<?php echo $this->_tpl_vars['index']; ?>
  70. " name="platform_ids"><?php echo $this->_tpl_vars['form']['name']; ?>
  71. </label>
  72. <?php endif; ?>
  73. <?php endforeach; endif; unset($_from); ?>
  74. <?php endif; ?>
  75. </div>
  76. </div>
  77. </div>
  78. <a href="javaScript:;" class="button button-3d button-primary button-rounded " style="width:150px;" id="add_delivery_channels">
  79. <i class="fa fa-refresh fa-spin add_button" style="display:none;"></i> 添加 </a>
  80. </div>
  81. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  82. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_right.html", 'smarty_include_vars' => array()));
  83. $this->_tpl_vars = $_smarty_tpl_vars;
  84. unset($_smarty_tpl_vars);
  85. ?>
  86. <div style="clear:both;"></div>
  87. </form>
  88. </div>
  89. <script>
  90. KISSY.use('node, io, event', function (S, Node, IO, Event) {
  91. var $ = S.all;
  92. var ing = false;
  93. $("#add_delivery_channels").on('click', function () {
  94. $('.add_button').show();
  95. var post_data = {};
  96. post_data.events_id = $("input[name=events_id]").val();
  97. post_data.str_name = $('input[name=str_name]').val();
  98. if(post_data.str_name==null){
  99. $('.add_button').hide();
  100. alert('请填写渠道名称');return ;
  101. }
  102. post_data.platform_ids_str="";
  103. $("[type='checkbox'][name='platform_ids']:checked").each(function(){
  104. post_data.platform_ids_str+=$(this).val()+"|";
  105. });
  106. if(post_data.platform_ids_str==''){
  107. $('.add_button').hide();
  108. alert('请勾选所属列表');return ;
  109. }
  110. $(this).hide();
  111. new IO({
  112. type: "post"
  113. , url: VG.conf.root_domain+'/?c=Admin_Activity_DeliveryChannels&a=ReqAddDeliveryChannels'
  114. , data: post_data
  115. , success: function (data) {
  116. if (data.ok) { //ok
  117. location = VG.conf.root_domain+'?c=Admin_Activity_DeliveryChannels&a=PageList&events_id='+post_data.events_id;
  118. } else {
  119. alert('操作失败,原因:'+data.msg);
  120. }
  121. return false;
  122. }
  123. , error: function (NULL, textStatus) {
  124. alert("请求服务器失败,原因:"+textStatus);
  125. }
  126. , dataType: "json"
  127. });
  128. });
  129. });
  130. </script>
  131. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  132. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/bottom.html", 'smarty_include_vars' => array()));
  133. $this->_tpl_vars = $_smarty_tpl_vars;
  134. unset($_smarty_tpl_vars);
  135. ?>