%%4B^4B9^4B9E8CB7%%page_create.html.php 21 KB

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