public function index() { require APPPATH . 'libraries/tree.class.php'; $category_edit_option = $category_del_option = false; if (check_backend_module_perm('edit', 'category', $this->data['user_info'])) { $category_edit_option = true; } if (check_backend_module_perm('del', 'category', $this->data['user_info'])) { $category_del_option = true; } $edit_str = $del_str = ''; $categorys = $this->categorys; foreach ($categorys as $key => $row) { if ($category_edit_option) { $edit_str = '<a href="#" data="' . $row['catid'] . '" class="green cate_edit" title="编辑"><i class="icon-pencil bigger-130"></i></a>'; } if ($category_del_option) { $del_str = '<a href="#" data="' . $row['catid'] . '" data-title="' . $row['catname'] . '" class="red delete_confirm" title="删除"><i class="icon-trash bigger-130"></i></a>'; } $categorys[$key]['str_manage'] = "{$edit_str} {$del_str}"; $categorys[$key]['str_menu'] = $row['ismenu'] ? '<span class="label label-sm label-success">YES</span>' : '<span class="label label-sm label-danger">NO</span>'; } $tree = new tree(); $tree->icon = array(' │ ', ' ├─ ', ' └─ '); $tree->nbsp = ' '; $str = "<tr>\n \t\t\t\t<td><label><input type='checkbox' class='ace' name='id[]' value='\$id' /><span class='lbl'></span></label></td>\n \t\t\t\t<td>\$id</td>\n \t\t\t\t<td class='left'>\$spacer\$catname</td>\n \t\t\t\t<td>\$str_menu</td>\n \t\t\t\t<td>\$str_manage</td>\n \t\t\t</tr>"; $tree->init($categorys); $categorys = $tree->get_tree(0, $str); $this->data['categorys'] = $categorys; $this->repair(false); $this->load->view('category/list', $this->data); }
} ?> <?php if (check_backend_module_perm('rotation-edit', 'ad', $user_info)) { ?> <a href="#" data="<?php echo $row['id']; ?> " class="green rotation_edit" title="编辑"> <i class="icon-pencil bigger-130"></i> </a> <?php } ?> <?php if (check_backend_module_perm('rotation-del', 'ad', $user_info)) { ?> <a href="#" data="<?php echo $row['id']; ?> " data-title="<?php echo $row['name']; ?> " class="red delete_confirm" title="删除"> <i class="icon-trash bigger-130"></i> </a> <?php } ?> </div> </td>
if (check_backend_module_perm('image-edit', 'ad', $user_info)) { ?> <a href="<?php echo ADMINURL; ?> ad/image_add/<?php echo $row['id']; ?> " class="green admin_edit" title="编辑"> <i class="icon-pencil bigger-130"></i> </a> <?php } ?> <?php if (check_backend_module_perm('image-del', 'ad', $user_info)) { ?> <a href="#" data="<?php echo $row['id']; ?> " data-title="<?php echo $row['name']; ?> " class="red delete_confirm" title="删除"> <i class="icon-trash bigger-130"></i> </a> <?php } ?> </div> </td>
echo ADMINURL; ?> user/role_edit/<?php echo $row['roleid']; ?> " class="green role_edit" title="编辑" data="<?php echo $row['roleid']; ?> "> <i class="icon-pencil bigger-130"></i> </a> <?php } ?> <?php if (check_backend_module_perm('role-del', 'user', $user_info)) { ?> <a href="#" data="<?php echo $row['roleid']; ?> " data-title="<?php echo $row['rolename']; ?> " class="red delete_confirm" title="删除"> <i class="icon-trash bigger-130"></i> </a> <?php } ?> </div> <?php
<td> <div class="action-buttons"> <?php if (check_backend_module_perm('auto-edit', 'weixin', $user_info)) { ?> <a href="#" class="green auto_edit" title="编辑" data="<?php echo $row['id']; ?> "> <i class="icon-pencil bigger-130"></i> </a> <?php } ?> <?php if (check_backend_module_perm('auto-del', 'weixin', $user_info)) { ?> <a href="#" data="<?php echo $row['id']; ?> " data-title="<?php echo $row['keyword']; ?> " class="red delete_confirm" title="删除"> <i class="icon-trash bigger-130"></i> </a> <?php } ?> </div> </td>
<i class="icon-exchange bigger-130"></i> </a> </div> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <div class="clearfix row"> <?php if (check_backend_module_perm('users-move', 'weixin', $user_info)) { ?> <div class="pull-left col-sm-4"> <button class="btn btn-sm btn-primary" id="uesrs_move" type="submit">批量移动到</button> <select name="groupid"> <?php foreach ($groups as $row) { echo "<option value='{$row['gid']}'>{$row['gname']}</option>" . PHP_EOL; } ?> </select> </div> <?php } ?> <div class="pull-right dataTables_paginate paging_bootstrap">
} ?> </div> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <div class="clearfix row"> <?php if (check_backend_module_perm('news-move', 'content', $user_info)) { ?> <div class="pull-left col-sm-4"> <div class="btn-group btn-cate dropup"> <button class="btn btn-sm btn-danger" onclick="javascript:;" type="button" id="cat_target">选择目标栏目</button> <ul id="move_menu" class="dropdown-menu"> <?php echo $menu; ?> </ul> </div><!-- /btn-group --> <button class="btn btn-sm btn-primary" id="news_move" type="submit">批量移动文章</button> </div> <?php } ?>
?> </span> <?php if ($value['url'] == '#') { ?> <b class="arrow icon-angle-down"></b><?php } ?> </a> <?php if ($children = $value['children']) { ?> <ul class="submenu"> <?php foreach ($children as $k => $v) { if (!check_backend_module_perm($k, $key, $user_info)) { continue; } ?> <li<?php if ($route_c == $key && $route_a == $k) { echo ' class="active"'; } ?> > <a href="<?php echo $v['url']; ?> "> <i class="icon-double-angle-right"></i> <?php
echo ADMINURL; ?> user/group_edit/<?php echo $row['groupid']; ?> " class="green group_edit" title="编辑" data="<?php echo $row['groupid']; ?> "> <i class="icon-pencil bigger-130"></i> </a> <?php } ?> <?php if (check_backend_module_perm('group-del', 'user', $user_info)) { ?> <a href="#" data="<?php echo $row['groupid']; ?> " data-title="<?php echo $row['name']; ?> " class="red delete_confirm" title="删除"> <i class="icon-trash bigger-130"></i> </a> <?php } ?> </div> </td>
</td> <td><?php echo $row['gname']; ?> </td> <td><?php echo $row['count']; ?> </td> <td> <?php if ($row['gid']) { ?> <div class="action-buttons"> <?php if (check_backend_module_perm('group-edit', 'weixin', $user_info)) { ?> <a href="#" class="green edit_group" title="修改名称" data="<?php echo $row['gid']; ?> " data-title="<?php echo $row['gname']; ?> "> <i class="icon-pencil bigger-130"></i> </a> <?php } ?> </div> <?php
} ?> </div> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <div class="clearfix row"> <?php if (check_backend_module_perm('user-move', 'user', $user_info)) { ?> <div class="pull-left col-sm-4"> <button class="btn btn-sm btn-primary" id="uesrs_move" type="submit">批量移动到</button> <select name="groupid"> <?php foreach ($groups as $row) { echo "<option value='{$row['groupid']}'>{$row['name']}</option>" . PHP_EOL; } ?> </select> </div> <?php } ?> <div class="pull-right dataTables_paginate paging_bootstrap">
?> </small> <?php if (check_backend_module_perm('add', 'category', $user_info)) { ?> <button class="btn btn-sm btn-primary" id="category-add" data=""> <i class="icon-plus align-middle bigger-120"></i> <?php echo lang('category_add'); ?> </button> <?php } ?> <?php if (check_backend_module_perm('repair', 'category', $user_info)) { ?> <a class="btn btn-sm btn-success" href="<?php echo ADMINURL; ?> category/repair"><i class="icon-refresh"></i> 更新栏目缓存</a> <?php } ?> </h1> </div> <?php if ($this->input->get('q', ture) == 'repair') { ?> <div class="alert alert-block alert-success">