%%49^492^49271E10%%blletin_list.html.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <?php /* Smarty version 2.6.17, created on 2018-04-18 11:20:24
  2. compiled from admin/platform/blletin_list.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/platform/blletin_list.html', 52, 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. <script type="text/javascript" src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  26. /public/static/js/jquery-1.7.2.min.js"></script>
  27. <link rel="stylesheet" href="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  28. /public/static/js/jquery.minicolors.css" />
  29. <script type="text/javascript" src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  30. /public/static/js/jquery.minicolors.js"></script>
  31. <style>
  32. .set-nav {
  33. margin: 0 auto;
  34. }
  35. .set-nav-hr {
  36. background-color: #ddd;
  37. height: 1px;
  38. position: relative;
  39. }
  40. .form-group label {
  41. font-weight: 600;
  42. }
  43. .checkbox-inline, .radio-inline {
  44. font-weight: 400!important;
  45. }
  46. .rowlabel {
  47. font-weight: 300!important;
  48. }
  49. .music_play_hide {
  50. display:none;
  51. }
  52. </style>
  53. <div class="panel panel-default col-md-7">
  54. <div class="panel-body">
  55. <table class="table">
  56. <thead>
  57. <tr>
  58. <th>公告ID</th>
  59. <th>标题</th>
  60. <th>日期</th>
  61. <th>操作</th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. <?php if (! $this->_tpl_vars['bulletinsData']): ?>
  66. <tr><td colspan="5" align="center">暂无公告</td></tr>
  67. <?php endif; ?>
  68. <?php $_from = $this->_tpl_vars['bulletinsData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  69. foreach ($_from as $this->_tpl_vars['item']):
  70. ?>
  71. <tr>
  72. <td><?php echo $this->_tpl_vars['item']['id']; ?>
  73. </td>
  74. <td><a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
  75. /?c=Admin_Platform_Bulletin&a=PageShow&bulletin_id=<?php echo $this->_tpl_vars['item']['id']; ?>
  76. "><?php echo $this->_tpl_vars['item']['title']; ?>
  77. </a></td>
  78. <td><?php echo ((is_array($_tmp=$this->_tpl_vars['item']['update_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, '%Y-%m-%d') : smarty_modifier_date_format($_tmp, '%Y-%m-%d')); ?>
  79. </td>
  80. <?php if ($this->_tpl_vars['isSuperadmin']): ?>
  81. <td><a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
  82. /?c=Admin_Platform_Bulletin&a=PageUp&bulletin_id=<?php echo $this->_tpl_vars['item']['id']; ?>
  83. ">编辑</a></td>
  84. <td><a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
  85. /?c=Admin_Platform_Bulletin&a=PageShow&bulletin_id=<?php echo $this->_tpl_vars['item']['id']; ?>
  86. ">查看</a></td>
  87. <?php else: ?>
  88. <td><a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
  89. /?c=Admin_Platform_Bulletin&a=PageShow&bulletin_id=<?php echo $this->_tpl_vars['item']['id']; ?>
  90. ">查看</a></td>
  91. <?php endif; ?>
  92. </tr>
  93. <?php endforeach; endif; unset($_from); ?>
  94. </tbody>
  95. </table>
  96. <div class="page"><?php echo $this->_tpl_vars['page_html']; ?>
  97. </div>
  98. </div>
  99. </div>
  100. <?php if ($this->_tpl_vars['isSuperadmin']): ?>
  101. <form id="add_blletin_form">
  102. <div class="col-md-5" style="padding-left: 30px;">
  103. <div class="form-group">
  104. <label class="control-label rowlabel">标题</label>
  105. <input name="title" type="text" class="form-control" >
  106. </div>
  107. <div class="form-group">
  108. <label class="control-label rowlabel">内容</label>
  109. <textarea name="content" rows="2" class="form-control" style="width:100%;height:260px;" id="content"></textarea>
  110. <div class="note">只有管理员有这部分操作权限,其他人没有</div>
  111. </div>
  112. <div>
  113. <a id="add_blletin_btn" href="javascript:;" class="button button-primary button-small">添加新公告</a>
  114. </div>
  115. </div>
  116. </form>
  117. <?php endif; ?>
  118. <script>
  119. var content_editor;
  120. KISSY.use('node, io, uri', function (S, Node, IO, Uri) {
  121. var $ = S.all;
  122. var Query = Uri.Query;
  123. $("#add_blletin_btn").on('click', function () {
  124. var title = $("input[name=title]").val();
  125. if (!title) {
  126. alert('请填写公告标题');
  127. return false;
  128. }
  129. var content = content_editor.html();
  130. if (!content) {
  131. alert('请填公告内容');
  132. return false;
  133. }
  134. var formData = IO.serialize("#add_blletin_form");
  135. formData = new Query(formData).set('content', content).toString();
  136. new IO({
  137. type: "post"
  138. , url: VG.conf.root_domain + '/?c=Admin_Platform_Bulletin&a=ReqCreate'
  139. , data: formData
  140. , success: function (data) {
  141. if (data.ok) { //ok
  142. location.href = location.href;
  143. } else {
  144. alert('操作失败,原因:'+data.msg);
  145. location.href = location.href;
  146. }
  147. return false;
  148. }
  149. , error: function (NULL, textStatus) {
  150. alert("请求服务器失败,原因:"+textStatus);
  151. }
  152. , dataType: "json"
  153. });
  154. });
  155. });
  156. var KCONFIG = {
  157. allowFileManager : true,
  158. uploadJson : VG.conf.root_domain + '/?c=kindeditor&a=updateJson',
  159. fileManagerJson : VG.conf.root_domain + '/?c=kindeditor&a=fileManagerJson',
  160. items : [
  161. 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
  162. 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
  163. 'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'lineheight']
  164. }
  165. KindEditor.ready(function(K) {
  166. content_editor = K.create('textarea[name=content]', KCONFIG);
  167. });
  168. </script>
  169. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  170. $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/bottom.html", 'smarty_include_vars' => array()));
  171. $this->_tpl_vars = $_smarty_tpl_vars;
  172. unset($_smarty_tpl_vars);
  173. ?>