%%61^61B^61BE7FAB%%setPage_event.html.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <?php /* Smarty version 2.6.17, created on 2018-05-29 15:01:53
  2. compiled from admin/activity/setPage_event.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. .ke-container {
  45. width:640px!important
  46. }
  47. </style>
  48. <div id="activity_container">
  49. <form id="activity_form">
  50. <div class="activity_center">
  51. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  52. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_nav.html", 'smarty_include_vars' => array()));
  53. $this->_tpl_vars = $_smarty_tpl_vars;
  54. unset($_smarty_tpl_vars);
  55. ?>
  56. <input name="events_id" type="hidden" value="<?php echo $this->_tpl_vars['events_Data']['events']['id']; ?>
  57. ">
  58. <div class="panel panel-default">
  59. <div class="panel-body">
  60. <div class="form-group">
  61. <label class="control-label rowlabel">显示顶部数据栏目:</label>
  62. <?php $_from = $this->_tpl_vars['eventsTopData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  63. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
  64. ?>
  65. <label class="radio-inline">
  66. <input name="top_data" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
  67. " <?php if ($this->_tpl_vars['eventData']['top_data'] == $this->_tpl_vars['key']): ?>checked<?php elseif (! $this->_tpl_vars['eventData']['top_data'] && $this->_tpl_vars['key'] == 1): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['info']['desc']; ?>
  68. </label>
  69. <?php endforeach; endif; unset($_from); ?>
  70. </div>
  71. <div class="form-group">
  72. <label class="control-label rowlabel">显示分栏标签:</label>
  73. <input name="is_column_tag_1" type="checkbox" value="1" <?php if ($this->_tpl_vars['eventData']['is_column_tag_1'] == 1): ?>checked<?php endif; ?>>
  74. <input name="column_tag_1" class="form-control" style="display:inline;width:150px;" type="text" value="<?php if ($this->_tpl_vars['eventData']['column_tag_1']): ?><?php echo $this->_tpl_vars['eventData']['column_tag_1']; ?>
  75. <?php else: ?> 活动介绍<?php endif; ?>"/>
  76. <input name="is_column_tag_2" type="checkbox" value="1" <?php if ($this->_tpl_vars['eventData']['is_column_tag_2'] == 1): ?>checked<?php endif; ?>>
  77. <input name="column_tag_2" class="form-control" style="display:inline;width:150px;" type="text" value="<?php if ($this->_tpl_vars['eventData']['column_tag_2']): ?><?php echo $this->_tpl_vars['eventData']['column_tag_2']; ?>
  78. <?php else: ?> 中奖信息<?php endif; ?>"/>
  79. <input name="is_column_tag_3" type="checkbox" value="1" <?php if ($this->_tpl_vars['eventData']['is_column_tag_3'] == 1): ?>checked<?php endif; ?>>
  80. <input name="column_tag_3" class="form-control" style="display:inline;width:150px;" type="text" value="<?php if ($this->_tpl_vars['eventData']['column_tag_3']): ?><?php echo $this->_tpl_vars['eventData']['column_tag_3']; ?>
  81. <?php else: ?> 试用评价<?php endif; ?>"/>
  82. </div>
  83. <div class="form-group">
  84. <label class="control-label rowlabel">正文内容:</label>
  85. <textarea name="events_tips" class="form-control" rows="15" style="width:;"><?php echo $this->_tpl_vars['eventData']['events_tips']; ?>
  86. </textarea>
  87. </div>
  88. <div class="form-group">
  89. <label class="control-label rowlabel">是否显示分享按钮:</label>
  90. <?php $_from = $this->_tpl_vars['eventsShareButton']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  91. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
  92. ?>
  93. <label class="radio-inline">
  94. <input name="share_button" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
  95. " <?php if ($this->_tpl_vars['eventData']['share_button'] == $this->_tpl_vars['key']): ?>checked<?php elseif (! $this->_tpl_vars['eventData']['share_button'] && $this->_tpl_vars['key'] == 1): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['info']['desc']; ?>
  96. </label>
  97. <?php endforeach; endif; unset($_from); ?>
  98. <input name="share_button_tips" class="form-control" style="display:inline;width:300px;" type="text" value="<?php if ($this->_tpl_vars['eventData']['share_button_tips']): ?><?php echo $this->_tpl_vars['eventData']['share_button_tips']; ?>
  99. <?php else: ?>分享优惠给好友<?php endif; ?>"/>
  100. </div>
  101. <div class="form-group">
  102. <label class="control-label rowlabel">是否显示导购按钮:</label>
  103. <?php $_from = $this->_tpl_vars['eventsBuyButton']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  104. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
  105. ?>
  106. <label class="radio-inline">
  107. <input name="buy_button" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
  108. " <?php if ($this->_tpl_vars['eventData']['buy_button'] == $this->_tpl_vars['key']): ?>checked<?php elseif (! $this->_tpl_vars['eventData']['buy_button'] && $this->_tpl_vars['key'] == 1): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['info']['desc']; ?>
  109. </label>
  110. <?php endforeach; endif; unset($_from); ?>
  111. <input name="buy_button_tips" class="form-control" style="display:inline;width:150px;" type="text" value="<?php if ($this->_tpl_vars['eventData']['buy_button_tips']): ?><?php echo $this->_tpl_vars['eventData']['buy_button_tips']; ?>
  112. <?php else: ?>立即购买通道<?php endif; ?>"/>
  113. <input name="buy_button_link" class="form-control" style="display:inline;width:150px;" type="text" value="<?php if ($this->_tpl_vars['eventData']['buy_button_link']): ?><?php echo $this->_tpl_vars['eventData']['buy_button_link']; ?>
  114. <?php else: ?>微信链接<?php endif; ?>"/>
  115. <input name="buy_button_app" class="form-control" style="display:inline;width:150px;" type="text" value="<?php if ($this->_tpl_vars['eventData']['buy_button_app']): ?><?php echo $this->_tpl_vars['eventData']['buy_button_app']; ?>
  116. <?php else: ?>APP链接<?php endif; ?>"/>
  117. </div>
  118. <div class="form-group">
  119. <label class="control-label rowlabel">互动提示语:</label>
  120. <input name="events_hd_tips" class="form-control" type="text" style="width:300px;" value="<?php echo $this->_tpl_vars['eventData']['events_hd_tips']; ?>
  121. "/>
  122. </div>
  123. <div class="form-group">
  124. <label class="control-label rowlabel">活动规则提示语:</label>
  125. <input name="operationt_tips" class="form-control" type="text" style="width:300px;" value="<?php echo $this->_tpl_vars['eventData']['operationt_tips']; ?>
  126. "/>
  127. </div>
  128. <div class="form-group">
  129. <label class="control-label rowlabel">活动规则:</label>
  130. <textarea name="events_rules" class="form-control" rows="15" style="width:;"><?php echo $this->_tpl_vars['eventData']['events_rules']; ?>
  131. </textarea>
  132. </div>
  133. <a id="activity_submit" href="javascript:;" class="button button-3d button-primary button-rounded"><i class="fa fa-refresh fa-spin" style="display:none;"></i> 保存设置</a>
  134. </div>
  135. </div>
  136. </div>
  137. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  138. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_right.html", 'smarty_include_vars' => array()));
  139. $this->_tpl_vars = $_smarty_tpl_vars;
  140. unset($_smarty_tpl_vars);
  141. ?>
  142. <div style="clear:both;"></div>
  143. </form>
  144. </div>
  145. <script>
  146. var tips_editor,rules_editor;
  147. KISSY.use('node, io, uri', function (S, Node, IO, Uri) {
  148. var $ = S.all;
  149. var Query = Uri.Query;
  150. var activity_submit_status = false; //按钮状态
  151. function submit_button_active() {
  152. activity_submit_status = true;
  153. $("#activity_submit").addClass('active').all('i').show();
  154. }
  155. function submit_button_default() {
  156. activity_submit_status = false;
  157. $("#activity_submit").removeClass('active').all('i').hide();
  158. }
  159. $("#activity_submit").on('click', function () {
  160. if (activity_submit_status) {
  161. return false;
  162. }
  163. submit_button_active();
  164. var events_tips = tips_editor.html();
  165. var events_rules = rules_editor.html();
  166. formData = IO.serialize("#activity_form");
  167. formData = new Query(formData).set('events_tips', events_tips).toString();
  168. formData = new Query(formData).set('events_rules', events_rules).toString();
  169. new IO({
  170. type: "post"
  171. , url: VG.conf.root_domain + '/?c=Admin_Activity_SetPage&a=ReqUpRoutine'
  172. , data: formData
  173. , success: function (data) {
  174. if (data.ok) { //ok
  175. location.href = location.href;
  176. } else {
  177. alert('操作失败,原因:'+data.msg);
  178. location.href = location.href;
  179. }
  180. return false;
  181. }
  182. , error: function (NULL, textStatus) {
  183. alert("请求服务器失败,原因:"+textStatus);
  184. }
  185. , dataType: "json"
  186. });
  187. });
  188. });
  189. var KCONFIG = {
  190. allowFileManager : true,
  191. uploadJson : VG.conf.root_domain + '/?c=kindeditor&a=updateJson',
  192. fileManagerJson : VG.conf.root_domain + '/?c=kindeditor&a=fileManagerJson',
  193. items : [
  194. 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
  195. 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
  196. 'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'lineheight', 'flash']
  197. }
  198. KindEditor.ready(function(K) {
  199. tips_editor = K.create('textarea[name=events_tips]', KCONFIG);
  200. });
  201. KindEditor.ready(function(K) {
  202. rules_editor = K.create('textarea[name=events_rules]', KCONFIG);
  203. });
  204. </script>
  205. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  206. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/bottom.html", 'smarty_include_vars' => array()));
  207. $this->_tpl_vars = $_smarty_tpl_vars;
  208. unset($_smarty_tpl_vars);
  209. ?>