%%3D^3D1^3D1D841B%%page_show.html.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. <?php /* Smarty version 2.6.17, created on 2018-05-26 12:15:27
  2. compiled from admin/activity/page_show.html */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'admin/activity/page_show.html', 50, false),array('modifier', 'in_array', 'admin/activity/page_show.html', 62, false),)), $this); ?>
  5. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  6. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/header.html", 'smarty_include_vars' => array()));
  7. $this->_tpl_vars = $_smarty_tpl_vars;
  8. unset($_smarty_tpl_vars);
  9. ?>
  10. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  11. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/left.html", 'smarty_include_vars' => array()));
  12. $this->_tpl_vars = $_smarty_tpl_vars;
  13. unset($_smarty_tpl_vars);
  14. ?>
  15. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  16. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/nav.html", 'smarty_include_vars' => array()));
  17. $this->_tpl_vars = $_smarty_tpl_vars;
  18. unset($_smarty_tpl_vars);
  19. ?>
  20. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  21. $this->_smarty_include(array('smarty_include_tpl_file' => "get_kindeditor.html", 'smarty_include_vars' => array()));
  22. $this->_tpl_vars = $_smarty_tpl_vars;
  23. unset($_smarty_tpl_vars);
  24. ?>
  25. <style>
  26. .set-nav {
  27. margin: 0 auto;
  28. }
  29. .set-nav-hr {
  30. background-color: #ddd;
  31. height: 1px;
  32. position: relative;
  33. }
  34. .form-group label {
  35. font-weight: 600;
  36. }
  37. .checkbox-inline, .radio-inline {
  38. font-weight: 400!important;
  39. }
  40. .rowlabel {
  41. font-weight: 300!important;
  42. }
  43. .music_play_hide {
  44. display:none;
  45. }
  46. </style>
  47. <div id="activity_container">
  48. <form id="activity_form">
  49. <div class="activity_center">
  50. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  51. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_nav.html", 'smarty_include_vars' => array()));
  52. $this->_tpl_vars = $_smarty_tpl_vars;
  53. unset($_smarty_tpl_vars);
  54. ?>
  55. <input name="events_id" type="hidden" value="<?php echo $this->_tpl_vars['eventData']['id']; ?>
  56. ">
  57. <div class="form-group">
  58. <label>标题:</label>
  59. <input name="events_name" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['events_name']; ?>
  60. ">
  61. </div>
  62. <div class="form-group">
  63. <label class="control-label">列表默认图<small class="text-danger">(JPG、PNG,640x320,小于60k)</small></label>
  64. <div>
  65. <img id="img_url_tag" src="<?php if ($this->_tpl_vars['eventData']['img_url']): ?><?php echo $this->_tpl_vars['eventData']['img_url']; ?>
  66. <?php else: ?>http://placehold.it/320x160&text=640x320<?php endif; ?>" style="width:200px;" class="img-thumbnail">
  67. <input id="img_url_input" name="img_url" type="hidden" value="<?php echo $this->_tpl_vars['eventData']['img_url']; ?>
  68. ">
  69. <input id="image_upload" type="button" value="选择图片" >
  70. </div>
  71. </div>
  72. <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_ARTICLE'): ?>
  73. <div class="form-group">
  74. <label class="control-label">开始时间:</label>
  75. <input name="begin_time" type="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['eventData']['begin_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%Y-%m-%d %H:%M:%S') : smarty_modifier_date_format($_tmp, '%Y-%m-%d %H:%M:%S')); ?>
  76. " class="form-control" style="max-width:250px;min-width:200px;">
  77. </div>
  78. <div class="form-group">
  79. <label class="control-label">结束时间:</label>
  80. <input name="end_time" type="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['eventData']['end_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%Y-%m-%d %H:%M:%S') : smarty_modifier_date_format($_tmp, '%Y-%m-%d %H:%M:%S')); ?>
  81. " class="form-control" style="max-width:250px;min-width:200px;">
  82. </div>
  83. <?php endif; ?>
  84. <div class="form-group">
  85. <label class="control-label">发布到哪些列表</label>
  86. <div>
  87. <?php $_from = $this->_tpl_vars['platformList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  88. foreach ($_from as $this->_tpl_vars['platfrom']):
  89. ?>
  90. <label class="checkbox-inline">
  91. <input disabled name="platform_ids[]" type="checkbox" value="<?php echo $this->_tpl_vars['platfrom']['id']; ?>
  92. " <?php if (((is_array($_tmp=$this->_tpl_vars['platfrom']['id'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['platFormIds']) : in_array($_tmp, $this->_tpl_vars['platFormIds']))): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['platfrom']['name']; ?>
  93. </label>
  94. <?php endforeach; endif; unset($_from); ?>
  95. </div>
  96. <div class="note">注:创建后不可修改</div>
  97. </div>
  98. <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] == 'TYPE_EVENTS_OTHER'): ?>
  99. <div class="form-group">
  100. <label>跳转URL:</label>
  101. <input name="other_url" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['other_url']; ?>
  102. ">
  103. </div>
  104. <?php endif; ?>
  105. <div class="form-group">
  106. <label class="control-label">选择分类</label>
  107. <div>
  108. <select id="cotegory_id" name="category_id">
  109. <option value="0" selected>选择分类名称</option>
  110. <?php $_from = $this->_tpl_vars['categoryList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  111. foreach ($_from as $this->_tpl_vars['cate']):
  112. ?>
  113. <option value="<?php echo $this->_tpl_vars['cate']['id']; ?>
  114. " <?php if ($this->_tpl_vars['cate']['id'] == $this->_tpl_vars['eventData']['category_id']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['cate']['name']; ?>
  115. </option>
  116. <?php endforeach; endif; unset($_from); ?>
  117. </select>
  118. </div>
  119. </div>
  120. <div class="form-group">
  121. <label class="control-label">是否推荐到焦点图</label>
  122. <div>
  123. <?php $_from = $this->_tpl_vars['focusDisplay']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  124. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
  125. ?>
  126. <label class="radio-inline">
  127. <input name="focus_display" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
  128. " <?php if ($this->_tpl_vars['eventData']['focus_display'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
  129. </label>
  130. <?php endforeach; endif; unset($_from); ?>
  131. </div>
  132. </div>
  133. <div class="form-group">
  134. <label class="control-label">是否置顶</label>
  135. <div>
  136. <?php $_from = $this->_tpl_vars['topDisplay']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  137. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
  138. ?>
  139. <label class="radio-inline">
  140. <input name="top_display" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
  141. " <?php if ($this->_tpl_vars['eventData']['top_display'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
  142. </label>
  143. <?php endforeach; endif; unset($_from); ?>
  144. </div>
  145. </div>
  146. <div class="form-group">
  147. <label class="control-label">是否用户登录</label>
  148. <div>
  149. <?php $_from = $this->_tpl_vars['authorize']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  150. foreach ($_from as $this->_tpl_vars['authid'] => $this->_tpl_vars['info']):
  151. ?>
  152. <label class="radio-inline">
  153. <input name="authorize" type="radio" value="<?php echo $this->_tpl_vars['authid']; ?>
  154. " <?php if ($this->_tpl_vars['eventData']['authorize'] == $this->_tpl_vars['authid']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
  155. </label>
  156. <?php endforeach; endif; unset($_from); ?>
  157. </div>
  158. </div>
  159. <div class="form-group">
  160. <label class="control-label">是否在列表中出现</label>
  161. <div>
  162. <?php $_from = $this->_tpl_vars['listDisplay']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  163. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
  164. ?>
  165. <label class="radio-inline">
  166. <input name="list_display" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
  167. " <?php if ($this->_tpl_vars['eventData']['list_display'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
  168. </label>
  169. <?php endforeach; endif; unset($_from); ?>
  170. </div>
  171. </div>
  172. <?php if ($this->_tpl_vars['displayDesc'][$this->_tpl_vars['eventData']['display']]['kw'] != 'EVENT_DISPLAY_UNFINISHED'): ?>
  173. <div class="form-group">
  174. <label class="control-label">当前发布状态</label>
  175. <div>
  176. <?php $_from = $this->_tpl_vars['displayDesc']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  177. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
  178. ?>
  179. <?php if ($this->_tpl_vars['info']['kw'] != 'EVENT_DISPLAY_UNFINISHED'): ?>
  180. <label class="radio-inline">
  181. <input name="display" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
  182. " <?php if ($this->_tpl_vars['eventData']['display'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
  183. </label>
  184. <?php endif; ?>
  185. <?php endforeach; endif; unset($_from); ?>
  186. </div>
  187. </div>
  188. <?php endif; ?>
  189. <?php if (! ((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['deliveryFormNotType']) : in_array($_tmp, $this->_tpl_vars['deliveryFormNotType']))): ?>
  190. <div class="form-group">
  191. <label class="control-label">当前奖品发货状态</label>
  192. <div>
  193. <?php $_from = $this->_tpl_vars['deliveryDesc']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  194. foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['info']):
  195. ?>
  196. <label class="radio-inline">
  197. <input name="delivery" type="radio" value="<?php echo $this->_tpl_vars['key']; ?>
  198. " <?php if ($this->_tpl_vars['eventData']['delivery'] == $this->_tpl_vars['key']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
  199. </label>
  200. <?php endforeach; endif; unset($_from); ?>
  201. </div>
  202. </div>
  203. <?php endif; ?>
  204. <?php if (! ((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['weixinFormNotType']) : in_array($_tmp, $this->_tpl_vars['weixinFormNotType']))): ?>
  205. <div class="panel panel-default">
  206. <div class="panel-heading"><h3 class="panel-title" id="panel-title">设置微信分享</h3></div>
  207. <div class="panel-body">
  208. <div class="form-group">
  209. <div class="form-group">
  210. <label class="control-label rowlabel">分享用图:<small class="text-danger">JPG、PNG,200*200,小于20k</small></label>
  211. <div>
  212. <img id="share_image_tag" src="<?php if ($this->_tpl_vars['eventData']['weixinShare']['imgUrl']): ?><?php echo $this->_tpl_vars['eventData']['weixinShare']['imgUrl']; ?>
  213. <?php else: ?>http://placehold.it/200&text=200x200<?php endif; ?>" style="width:150px;" class="img-thumbnail">
  214. <input id="share_image_input" name='wx_img_url' type="hidden" value="<?php echo $this->_tpl_vars['eventData']['weixinShare']['imgUrl']; ?>
  215. ">
  216. <input id="share_image_upload" type="button" value="选择图片" >
  217. </div>
  218. </div>
  219. <div class="row">
  220. <div class="col-md-6">
  221. <div class="form-group">
  222. <label class="control-label rowlabel">标题:<small class="text-danger">&lt;24个字</small></label>
  223. <input name="weixinShare_title" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['weixinShare']['title']; ?>
  224. ">
  225. </div>
  226. <div class="form-group">
  227. <label class="control-label rowlabel">分享内容:<small class="text-danger">&lt;36个字</small></label>
  228. <input name="weixinShare_content" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['weixinShare']['content']; ?>
  229. ">
  230. </div>
  231. <div class="form-group">
  232. <label class="control-label rowlabel">用户分享后跳转地址:</label>
  233. <input name="weixinShare_jump_url" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['weixinShare']['jump_url']; ?>
  234. ">
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. <?php endif; ?>
  242. <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_ARTICLE' && $this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_CUT_SCREEN' && $this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_OTHER'): ?>
  243. <div class="panel panel-default">
  244. <div class="panel-heading"><h3 class="panel-title" id="panel-title">设置参与规则</h3></div>
  245. <div class="panel-body">
  246. <div class="form-group">
  247. <div class="row">
  248. <div class="col-md-3">
  249. <p>允许每天用户参与次数:</p>
  250. <input name="participation_user_num" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['participation_user_num']; ?>
  251. " style="max-width:;">
  252. </div>
  253. <div class="col-md-3">
  254. <p>允许每天IP参与次数:</p>
  255. <input name="participation_ip_num" type="text" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['participation_ip_num']; ?>
  256. " style="max-width:;">
  257. </div>
  258. <div class="col-md-3">
  259. <p>允许用户参与次数:</p>
  260. <input type="text" name="participation_user_all_num" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['participation_user_all_num']; ?>
  261. " style="max-width:;">
  262. </div>
  263. <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] == 'TYPE_EVENTS_TURNTABLE'): ?>
  264. <div class="col-md-3">
  265. <p>允许用户获奖次数:</p>
  266. <input type="text" name="winning_user_num" class="form-control" value="<?php echo $this->_tpl_vars['eventData']['winning_user_num']; ?>
  267. " style="max-width:;">
  268. </div>
  269. <?php endif; ?>
  270. </div>
  271. </div>
  272. </div>
  273. </div>
  274. <?php endif; ?>
  275. <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['cutDirectionFormNotType']) : in_array($_tmp, $this->_tpl_vars['cutDirectionFormNotType']))): ?>
  276. <div class="panel panel-default">
  277. <div class="panel-heading"><h3 class="panel-title" id="panel-title">切屏方向</h3></div>
  278. <div class="panel-body">
  279. <div class="form-group">
  280. <div>
  281. <label class="radio-inline">
  282. <input name="cut_fx" type="radio" value="fadeInUp" <?php if ($this->_tpl_vars['eventData']['cut_fx'] == 'fadeInUp'): ?>checked<?php endif; ?> > 从下向上翻页
  283. </label>
  284. <label class="checkbox-inline">
  285. <input name="cut_fx" type="radio" value="fadeInRight" <?php if ($this->_tpl_vars['eventData']['cut_fx'] == 'fadeInRight'): ?>checked<?php endif; ?> > 从右向左翻页
  286. </label>
  287. </div>
  288. <div class='note'>调整切屏方向,将改变切屏方式及部分内容显示的效果,一旦选定,尽量不要修改</div>
  289. </div>
  290. </div>
  291. </div>
  292. <?php endif; ?>
  293. <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['musicFormNotType']) : in_array($_tmp, $this->_tpl_vars['musicFormNotType']))): ?>
  294. <div class="panel panel-default">
  295. <div class="panel-heading"><h3 class="panel-title" id="panel-title">专题音乐设置</h3></div>
  296. <div class="panel-body">
  297. <div class="form-group">
  298. <div>
  299. <a href="javascript:;" class="music_play_or_pause <?php if (! $this->_tpl_vars['eventData']['music_url']): ?>music_play_hide<?php endif; ?> button button-caution button-circle button-tiny" data-type="play">播</a>
  300. <input id="music_input" name="music_url" type="hidden" value="<?php echo $this->_tpl_vars['eventData']['music_url']; ?>
  301. ">
  302. <input id="music_upload" type="button" value="选择音乐" >
  303. </div>
  304. <div>
  305. <p></p>
  306. <span class="">音乐图标放置:</span>
  307. <?php $_from = $this->_tpl_vars['getMusicPosition']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  308. foreach ($_from as $this->_tpl_vars['posid'] => $this->_tpl_vars['info']):
  309. ?>
  310. <label class="radio-inline">
  311. <input name="music_position" type="radio" value="<?php echo $this->_tpl_vars['posid']; ?>
  312. " <?php if ($this->_tpl_vars['eventData']['music_position'] == $this->_tpl_vars['posid']): ?>checked<?php endif; ?> > <?php echo $this->_tpl_vars['info']['desc']; ?>
  313. </label>
  314. <?php endforeach; endif; unset($_from); ?>
  315. </div>
  316. </div>
  317. <div>目前只支持MP3格式,小于20k</div>
  318. </div>
  319. </div>
  320. <div class="panel panel-default">
  321. <div class="panel-heading"><h3 class="panel-title" id="panel-title">加载动画设置</h3></div>
  322. <div class="panel-body">
  323. <div class="form-group">
  324. <div class="row">
  325. <div class="col-md-3">
  326. <p>加载背景色:</p>
  327. <input id="loading_bg_input" name="loading_bg_color" type="text" class="form-control" style="width:;" value="<?php echo $this->_tpl_vars['eventData']['loading_bg_color']; ?>
  328. ">
  329. </div>
  330. <div class="col-md-3">
  331. <p>加载动画、文本颜色:</p>
  332. <input id="loading_text_input" name="loading_text_color" type="text" class="form-control" style="width:;" value="<?php echo $this->_tpl_vars['eventData']['loading_text_color']; ?>
  333. ">
  334. </div>
  335. </div>
  336. </div>
  337. </div>
  338. </div>
  339. <?php endif; ?>
  340. <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>
  341. </div>
  342. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  343. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/activity/common_right.html", 'smarty_include_vars' => array()));
  344. $this->_tpl_vars = $_smarty_tpl_vars;
  345. unset($_smarty_tpl_vars);
  346. ?>
  347. <div style="clear:both;"></div>
  348. </form>
  349. </div>
  350. <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['musicFormNotType']) : in_array($_tmp, $this->_tpl_vars['musicFormNotType']))): ?>
  351. <script src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  352. /public/static/js/jquery.minicolors.js"></script>
  353. <link rel="stylesheet" href="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  354. /public/static/js/jquery.minicolors.css">
  355. <?php endif; ?>
  356. <script>
  357. KISSY.use('node, io, jquery, gallery/datetimepicker/2.0.0/index, gallery/xplayer/2.1.0/index', function (S, Node, IO, jQuery, Datetimepicker, Xplayer) {
  358. var $ = S.all;
  359. //日期
  360. new Datetimepicker({
  361. start : 'input[name=begin_time]'
  362. });
  363. //日期
  364. new Datetimepicker({
  365. start : 'input[name=end_time]'
  366. });
  367. var XiamiPlay = new Xplayer({
  368. "autoplay": false
  369. });
  370. <?php if ($this->_tpl_vars['eventData']['music_url']): ?>
  371. XiamiPlay.load({
  372. 'url' : '<?php echo $this->_tpl_vars['eventData']['music_url']; ?>
  373. ',
  374. });
  375. <?php endif; ?>
  376. <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['musicFormNotType']) : in_array($_tmp, $this->_tpl_vars['musicFormNotType']))): ?>
  377. //选择音乐
  378. KindEditor.ready(function(K) {
  379. var uploadbutton = K.uploadbutton({
  380. button : K('#music_upload')[0],
  381. fieldName : 'imgFile',
  382. url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=mp3',
  383. afterUpload : function(data) {
  384. if (data.error === 0) {
  385. var url = K.formatUrl(data.url, 'absolute');
  386. K('#music_input').val(data.url);
  387. $(".music_play_or_pause").removeClass('music_play_hide');
  388. XiamiPlay.load({
  389. 'url' : data.url,
  390. });
  391. } else {
  392. alert(data.message);
  393. }
  394. },
  395. afterError : function(str) {
  396. alert('自定义错误信息: ' + str);
  397. }
  398. });
  399. uploadbutton.fileBox.change(function(e) {
  400. uploadbutton.submit();
  401. });
  402. });
  403. $(".music_play_or_pause").on("click", function() {
  404. if ($(this).attr('data-type') == 'play') {
  405. XiamiPlay.play();
  406. $(this).attr('data-type', 'pause').text('停');
  407. } else {
  408. XiamiPlay.pause();
  409. $(this).attr('data-type', 'play').text('播');
  410. }
  411. });
  412. <?php endif; ?>
  413. var activity_submit_status = false; //按钮状态
  414. function submit_button_active() {
  415. activity_submit_status = true;
  416. $("#activity_submit").addClass('active').all('i').show();
  417. }
  418. function submit_button_default() {
  419. activity_submit_status = false;
  420. $("#activity_submit").removeClass('active').all('i').hide();
  421. }
  422. $("#activity_submit").on('click', function () {
  423. if (activity_submit_status) {
  424. return false;
  425. }
  426. submit_button_active();
  427. //表单验证
  428. var events_name = S.trim($("input[name=events_name]").val());
  429. if (!events_name) {
  430. alert('请填写活动标题');
  431. submit_button_default();
  432. return false;
  433. }
  434. var img_url = $("input[name=img_url]").val();
  435. if (!img_url) {
  436. alert('请选择列表默认图片');
  437. submit_button_default();
  438. return false;
  439. }
  440. var type = $("input[name=type]:checked").val();
  441. if (type <= 0) {
  442. alert('请选择活动类型');
  443. submit_button_default();
  444. return false;
  445. }
  446. <?php if ($this->_tpl_vars['typeData'][$this->_tpl_vars['thisType']]['kw'] != 'TYPE_EVENTS_ARTICLE'): ?>
  447. var begin_time = $("input[name=begin_time]").val();
  448. var end_time = $("input[name=end_time]").val();
  449. if (!begin_time || !end_time) {
  450. alert('请设置活动时间');
  451. submit_button_default();
  452. return false;
  453. }
  454. <?php endif; ?>
  455. formData = IO.serialize("#activity_form");
  456. new IO({
  457. type: "post"
  458. , url: VG.conf.root_domain + '/?c=Admin_Activity_SetBasics&a=ReqUp'
  459. , data: formData
  460. , success: function (data) {
  461. if (data.ok) { //ok
  462. var url = data.msg;
  463. location.href = url;
  464. } else {
  465. alert('操作失败,原因:'+data.msg);
  466. }
  467. return false;
  468. }
  469. , error: function (NULL, textStatus) {
  470. alert("请求服务器失败,原因:"+textStatus);
  471. }
  472. , dataType: "json"
  473. });
  474. });
  475. });
  476. //设置微信分享
  477. KindEditor.ready(function(K) {
  478. var uploadbutton = K.uploadbutton({
  479. button : K('#share_image_upload')[0],
  480. fieldName : 'imgFile',
  481. url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
  482. afterUpload : function(data) {
  483. if (data.error === 0) {
  484. var url = K.formatUrl(data.url, 'absolute');
  485. K('#share_image_input').val(data.url);
  486. K('#share_image_tag').attr('src', data.url);
  487. } else {
  488. alert(data.message);
  489. }
  490. },
  491. afterError : function(str) {
  492. alert('自定义错误信息: ' + str);
  493. }
  494. });
  495. uploadbutton.fileBox.change(function(e) {
  496. uploadbutton.submit();
  497. });
  498. });
  499. //列表默认图
  500. KindEditor.ready(function(K) {
  501. var uploadbutton = K.uploadbutton({
  502. button : K('#image_upload')[0],
  503. fieldName : 'imgFile',
  504. url : VG.conf.root_domain + '/?c=kindeditor&a=updateJson&dir=image',
  505. afterUpload : function(data) {
  506. if (data.error === 0) {
  507. var url = K.formatUrl(data.url, 'absolute');
  508. K('#img_url_input').val(data.url);
  509. K('#img_url_tag').attr('src', data.url);
  510. } else {
  511. alert(data.message);
  512. }
  513. },
  514. afterError : function(str) {
  515. alert('自定义错误信息: ' + str);
  516. }
  517. });
  518. uploadbutton.fileBox.change(function(e) {
  519. uploadbutton.submit();
  520. });
  521. });
  522. <?php if (((is_array($_tmp=$this->_tpl_vars['thisType'])) ? $this->_run_mod_handler('in_array', true, $_tmp, $this->_tpl_vars['musicFormNotType']) : in_array($_tmp, $this->_tpl_vars['musicFormNotType']))): ?>
  523. $("#loading_bg_input").minicolors({
  524. defaultValue: '<?php echo $this->_tpl_vars['eventData']['loading_bg_color']; ?>
  525. '
  526. });
  527. $("#loading_text_input").minicolors({
  528. defaultValue: '<?php echo $this->_tpl_vars['eventData']['loading_text_color']; ?>
  529. '
  530. });
  531. <?php endif; ?>
  532. </script>
  533. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  534. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/bottom.html", 'smarty_include_vars' => array()));
  535. $this->_tpl_vars = $_smarty_tpl_vars;
  536. unset($_smarty_tpl_vars);
  537. ?>