123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <?php /* Smarty version 2.6.17, created on 2018-04-18 11:20:24
- compiled from admin/platform/blletin_list.html */ ?>
- <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
- smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'admin/platform/blletin_list.html', 52, false),)), $this); ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/header.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/left.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/nav.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "get_kindeditor.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
- <script type="text/javascript" src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/js/jquery-1.7.2.min.js"></script>
- <link rel="stylesheet" href="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/js/jquery.minicolors.css" />
- <script type="text/javascript" src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
- /public/static/js/jquery.minicolors.js"></script>
- <style>
- .set-nav {
- margin: 0 auto;
- }
- .set-nav-hr {
- background-color: #ddd;
- height: 1px;
- position: relative;
- }
- .form-group label {
- font-weight: 600;
- }
- .checkbox-inline, .radio-inline {
- font-weight: 400!important;
- }
- .rowlabel {
- font-weight: 300!important;
- }
- .music_play_hide {
- display:none;
- }
- </style>
- <div class="panel panel-default col-md-7">
- <div class="panel-body">
- <table class="table">
- <thead>
- <tr>
- <th>公告ID</th>
- <th>标题</th>
- <th>日期</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if (! $this->_tpl_vars['bulletinsData']): ?>
- <tr><td colspan="5" align="center">暂无公告</td></tr>
- <?php endif; ?>
- <?php $_from = $this->_tpl_vars['bulletinsData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
- foreach ($_from as $this->_tpl_vars['item']):
- ?>
- <tr>
- <td><?php echo $this->_tpl_vars['item']['id']; ?>
- </td>
- <td><a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
- /?c=Admin_Platform_Bulletin&a=PageShow&bulletin_id=<?php echo $this->_tpl_vars['item']['id']; ?>
- "><?php echo $this->_tpl_vars['item']['title']; ?>
- </a></td>
- <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')); ?>
- </td>
- <?php if ($this->_tpl_vars['isSuperadmin']): ?>
- <td><a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
- /?c=Admin_Platform_Bulletin&a=PageUp&bulletin_id=<?php echo $this->_tpl_vars['item']['id']; ?>
- ">编辑</a></td>
- <td><a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
- /?c=Admin_Platform_Bulletin&a=PageShow&bulletin_id=<?php echo $this->_tpl_vars['item']['id']; ?>
- ">查看</a></td>
- <?php else: ?>
- <td><a href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
- /?c=Admin_Platform_Bulletin&a=PageShow&bulletin_id=<?php echo $this->_tpl_vars['item']['id']; ?>
- ">查看</a></td>
- <?php endif; ?>
- </tr>
- <?php endforeach; endif; unset($_from); ?>
- </tbody>
- </table>
- <div class="page"><?php echo $this->_tpl_vars['page_html']; ?>
- </div>
- </div>
- </div>
- <?php if ($this->_tpl_vars['isSuperadmin']): ?>
- <form id="add_blletin_form">
- <div class="col-md-5" style="padding-left: 30px;">
- <div class="form-group">
- <label class="control-label rowlabel">标题</label>
- <input name="title" type="text" class="form-control" >
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">内容</label>
- <textarea name="content" rows="2" class="form-control" style="width:100%;height:260px;" id="content"></textarea>
- <div class="note">只有管理员有这部分操作权限,其他人没有</div>
- </div>
- <div>
- <a id="add_blletin_btn" href="javascript:;" class="button button-primary button-small">添加新公告</a>
- </div>
- </div>
- </form>
- <?php endif; ?>
- <script>
- var content_editor;
- KISSY.use('node, io, uri', function (S, Node, IO, Uri) {
- var $ = S.all;
- var Query = Uri.Query;
-
- $("#add_blletin_btn").on('click', function () {
- var title = $("input[name=title]").val();
- if (!title) {
- alert('请填写公告标题');
- return false;
- }
- var content = content_editor.html();
- if (!content) {
- alert('请填公告内容');
- return false;
- }
-
- var formData = IO.serialize("#add_blletin_form");
- formData = new Query(formData).set('content', content).toString();
-
- new IO({
- type: "post"
- , url: VG.conf.root_domain + '/?c=Admin_Platform_Bulletin&a=ReqCreate'
- , data: formData
- , success: function (data) {
- if (data.ok) { //ok
- location.href = location.href;
- } else {
- alert('操作失败,原因:'+data.msg);
- location.href = location.href;
- }
- return false;
- }
- , error: function (NULL, textStatus) {
- alert("请求服务器失败,原因:"+textStatus);
- }
- , dataType: "json"
- });
- });
-
- });
- var KCONFIG = {
- allowFileManager : true,
- uploadJson : VG.conf.root_domain + '/?c=kindeditor&a=updateJson',
- fileManagerJson : VG.conf.root_domain + '/?c=kindeditor&a=fileManagerJson',
- items : [
- 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
- 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
- 'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'lineheight']
- }
- KindEditor.ready(function(K) {
- content_editor = K.create('textarea[name=content]', KCONFIG);
- });
- </script>
- <?php $_smarty_tpl_vars = $this->_tpl_vars;
- $this->_smarty_include(array('smarty_include_tpl_file' => "./admin/bottom.html", 'smarty_include_vars' => array()));
- $this->_tpl_vars = $_smarty_tpl_vars;
- unset($_smarty_tpl_vars);
- ?>
|