找到admin/content_all.inc.php文件
然后在它里面的后面加上- $allow_manage = $priv_role->check('catid', $catid, 'manage');
复制代码 来判断操作者是否有权限管理,然后在- case 'listorder':
- $result = $c->listorder($listorders);
- if($result)
- {
- showmessage('操作成功!', $forward);
- }
- else
- {
- showmessage('操作失败!');
- }
- break;
复制代码 后面加上- case 'cancel'://放入回收站
- if(!$allow_manage) showmessage('无管理权限!');
- $c->status($contentid, 0);
- showmessage('操作成功!', $forward);
- break;
- case 'delete'://彻底删除
- if(!$allow_manage) showmessage('无管理权限!');
- $c->delete($contentid);
- showmessage('操作成功!', $forward);
- break;
- case 'recycle'://回收站管理员
- if(!$allow_manage) showmessage('无管理权限!');
- $infos = $c->listinfo("status=0", 'listorder DESC,contentid DESC', $page, 20);
- $pagetitle = $CATEGORY[$catid]['catname'].'-回收站';
- include admin_tpl('content_all_recycle');
- break;
- case 'clear'://清空回收站
- if(!$allow_manage) showmessage('无管理权限!');
- $c->clear();
- showmessage('操作成功!', $forward);
- break;
- case 'restore'://还原选中部分
- if(!$allow_manage) showmessage('无管理权限!');
- $c->restore($contentid);
- showmessage('操作成功!', $forward);
- break;
- case 'restoreall'://全部还原
- if(!$allow_manage) showmessage('无管理权限!');
- $c->restoreall();
- showmessage('操作成功!', $forward);
- break;
复制代码 然后在admin/templates下面新建content_all_recycle.tpl.php文件里面放入如下代码:- <?php
- defined('IN_PHPCMS') or exit('Access Denied');
- include admin_tpl('header');
- ?>
- <body>
- <?=$menu?>
- <form name="myform" method="post" action="">
- <table cellpadding="0" cellspacing="1" class="table_list">
- <caption>回收站管理</caption>
- <tr>
- <th width="30">选中</th>
- <th width="40">ID</th>
- <th>标题</th>
- <th width="80">状态</th>
- <th width="70">录入者</th>
- <th width="120">更新时间</th>
- <th width="100">管理操作</th>
- </tr>
- <?php
- if(is_array($infos)){
- foreach($infos as $info){
- ?>
- <tr>
- <td style="text-align:center"><input type="checkbox" name="contentid[]" value="<?=$info['contentid']?>" id="content_<?=$info['contentid']?>" /></td>
- <td style="text-align:center"><?=$info['contentid']?></td>
- <td align="left"><a href="show.php?id=<?=$info['contentid']?>" target="_blank"><?=output::style($info['title'], $info['style'])?></a></td>
- <td style="text-align:center"><?=$STATUS[$info['status']]?></td>
- <td><?=username($info['userid'])?></td>
- <td style="text-align:center"><?=date('Y-m-d', $info['updatetime'])?></td>
- <td>
- <a href="?mod=<?=$mod?>&file=<?=$file?>&action=view&contentid=<?=$info['contentid']?>">查看</a> |
- <a href="?mod=<?=$mod?>&file=<?=$file?>&action=edit&contentid=<?=$info['contentid']?>">修改</a> |
- <a href="?mod=<?=$mod?>&file=<?=$file?>&action=log_list&contentid=<?=$info['contentid']?>">日志</a>
- </td>
- </tr>
- <?php
- }
- }
- ?>
- </table>
- <table cellpadding="0" cellspacing="0" border="0" width="100%">
- <tr height="30">
- <td><span style="width:60px"><a href="###" onClick="javascript:$('input[type=checkbox]').attr('checked', true)">全选</a>/<a href="###" onClick="javascript:$('input[type=checkbox]').attr('checked', false)">取消</a></span>
- <input type="button" name="delete" value="彻底删除" onClick="myform.action='?mod=<?=$mod?>&file=<?=$file?>&action=delete&catid=<?=$catid?>&forward=<?=urlencode(URL)?>';myform.submit();">
- <input type="button" name="clear" value="清空回收站" onClick="myform.action='?mod=<?=$mod?>&file=<?=$file?>&action=clear&catid=<?=$catid?>&forward=<?=urlencode(URL)?>';myform.submit();">
- <input type="button" name="restore" value=" 还原 " onClick="myform.action='?mod=<?=$mod?>&file=<?=$file?>&action=restore&catid=<?=$catid?>&forward=<?=urlencode(URL)?>';myform.submit();">
- <input type="button" name="restoreall" value="全部还原" onClick="myform.action='?mod=<?=$mod?>&file=<?=$file?>&action=restoreall&catid=<?=$catid?>&forward=<?=urlencode(URL)?>';myform.submit();">
- </td>
- </tr>
- </table>
- <div id="pages"><?=$c->pages?></div>
- </form>
- </body>
- </html>
复制代码 这样所有信息管理处,全完整,不然就删除也删除不了…… |