public function manage() { $tree = Loader::lib('Tree'); $tree->icon = array(' │ ', ' ├─ ', ' └─ '); $tree->nbsp = ' '; $userid = $_SESSION['userid']; $admin_username = cookie('admin_username'); $result = $this->db->order('listorder ASC,id DESC')->select(); foreach ($result as $r) { $r['cname'] = L($r['name'], '', 'member_menu'); $r['str_manage'] = '<a href="?app=member&controller=member_menu&action=edit&id=' . $r['id'] . '&menuid=' . $_GET['menuid'] . '">' . L('edit') . '</a> | <a href=\'' . art_confirm(L('confirm', array('message' => $r['cname'])), '?app=member&controller=member_menu&action=delete&id=' . $r['id'] . '&menuid=' . $_GET['menuid']) . '\'>' . L('delete') . '</a> '; $array[] = $r; } $str = "<tr>\n <td align='center'><input name='listorders[\$id]' type='text' size='3' value='\$listorder' class='input-text-c'></td>\n <td align='center'>\$id</td>\n <td >\$spacer\$cname</td>\n <td align='center'>\$str_manage</td>\n </tr>"; $tree->init($array); $categorys = $tree->get_tree(0, $str); include $this->view('member_menu'); }
<td align="center"><input type="checkbox" name="ipbannedid[]" value="<?php echo $info['ipbannedid']; ?> "></td> <td width="30%" align="left"><?php echo $info['ip']; ?> </td> <td align="center"><?php echo date('Y-m-d', $info['expires']); ?> </td> <td align="center"><a href="<?php echo art_confirm(L('confirm_del_ip'), U('admin/ipbanned/delete', array('ipbannedid' => $info['ipbannedid']))); ?> "><?php echo L('delete'); ?> </a></td> </tr> <?php } } ?> </tbody> </table> <div class="btn"> <a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('selected_all');
?> </a> | <a href="javascript:void(0);" onclick="edit('<?php echo $info['linkageid']; ?> ','<?php echo String::addslashes($info['name']); ?> ')"><?php echo L('edit'); ?> </a> | <a href="<?php echo art_confirm(L('linkage_is_del'), '?app=admin&controller=linkage&action=delete&linkageid=' . $info['linkageid']); ?> "><?php echo L('delete'); ?> </a> | <a href="?app=admin&controller=linkage&action=public_cache&linkageid=<?php echo $info['linkageid']; ?> "><?php echo L('update_backup'); ?> </a></td> </tr> <?php
echo L('edit'); ?> </a> | <?php if ($_SESSION['roleid'] != 1) { ?> <font color="#ccc"><?php echo L('delete'); ?> </font> <?php } else { ?> <a href="<?php echo art_confirm(L('posid_del_cofirm'), '?app=admin&controller=position&action=delete&posid=' . $info['posid']); ?> "><?php echo L('delete'); ?> </a> <?php } ?> </td> </tr> <?php } } ?> </tbody>
</td> <td><?php echo $val['username']; ?> </td> <td><a href="?app=block&controller=admin&action=history_restore&id=<?php echo $val['id']; ?> "><?php echo L('restore'); ?> </a> <a href="<?php echo art_confirm(L('are_you_sure_you_want_to_delete'), '?app=block&controller=admin&action=history_del&id=' . $val['id']); ?> "><?php echo L('delete'); ?> </a></td> </tr> <?php } } ?> </tbody> </table> </div> <?php if ($pages) {
/** * 管理栏目 */ public function init() { $show_hash = ''; $tree = new Tree(); $models = S('common/model'); // 加载模型缓存 $category_items = array(); foreach ($models as $modelid => $model) { $category_items[$modelid] = S('common/category_items_' . $modelid); } $tree->icon = array(' │ ', ' ├─ ', ' └─ '); $tree->nbsp = ' '; $categorys = array(); // 读取缓存 $result = S('common/category_content'); // 加载栏目缓存 $show_detail = count($result) < 500 ? 1 : 0; $parentid = isset($_GET['parentid']) ? intval($_GET['parentid']) : 0; $html_root = C('system', 'html_root'); $types = array(0 => L('category_type_system'), 1 => L('category_type_page'), 2 => L('category_type_link')); if (!empty($result) && is_array($result)) { foreach ($result as $r) { $r['modelname'] = $r['modelid'] > 0 ? $models[$r['modelid']]['name'] : ''; $r['str_manage'] = ''; if (!$show_detail) { if ($r['parentid'] != $parentid) { continue; } $r['parentid'] = 0; $r['str_manage'] .= '<a href="' . U('admin/category/init', array('parentid' => $r['catid'], 'menuid' => $_GET['menuid'], 's' => $r['type'])) . '">' . L('manage_sub_category') . '</a> | '; } $r['str_manage'] .= '<a href="?app=admin&controller=category&action=add&parentid=' . $r['catid'] . '&menuid=84&s=' . $r['type'] . '">' . L('add_sub_category') . '</a> | '; $r['str_manage'] .= '<a href="?app=admin&controller=category&action=edit&catid=' . $r['catid'] . '&menuid=' . $_GET['menuid'] . '&type=' . $r['type'] . '">' . L('edit') . '</a> | <a href="' . art_confirm(L('confirm', array('message' => addslashes($r['catname']))), '?app=admin&controller=category&action=delete&catid=' . $r['catid'] . '&menuid=' . $_GET['menuid']) . '">' . L('delete') . '</a> '; $r['typename'] = $types[$r['type']]; $r['display_icon'] = $r['ismenu'] ? '' : ' <img src ="' . IMG_PATH . 'icon/gear_disable.png" title="' . L('not_display_in_menu') . '">'; if ($r['type'] || $r['child']) { $r['items'] = ''; } else { $r['items'] = $category_items[$r['modelid']][$r['catid']]; } $r['help'] = ''; $setting = string2array($r['setting']); if ($r['url']) { if (preg_match('/^(http|https):\\/\\//', $r['url'])) { $catdir = $r['catdir']; $prefix = $r['sethtml'] ? '' : $html_root; $catdir = $prefix . '/' . $r['parentdir'] . $catdir; if ($r['type'] == 0 && $setting['ishtml'] && strpos($r['url'], '?') === false && substr_count($r['url'], '/') < 4) { $r['help'] = '<img src="' . IMG_PATH . 'icon/help.png" title="' . L('tips_domain') . $r['url'] . ' ' . L('directory_binding') . ' ' . $catdir . '/">'; } } else { $r['url'] = substr(SITE_URL, 0, -1) . $r['url']; } $r['url'] = "<a href='{$r['url']}' target='_blank'>" . L('vistor') . "</a>"; } else { $r['url'] = "<a href='?app=admin&controller=category&action=public_cache&menuid=128&application=admin'><font color='red'>" . L('update_backup') . "</font></a>"; } $categorys[$r['catid']] = $r; } } $str = "<tr>\n\t\t<td align='center'><input name='listorders[\$id]' type='text' size='3' value='\$listorder' class='input-text-c'></td>\n\t\t<td align='center'>\$id</td>\n\t\t<td >\$spacer\$catname\$display_icon</td>\n\t\t<td>\$typename</td>\n\t\t<td>\$modelname</td>\n\t\t<td align='center'>\$items</td>\n\t\t<td align='center'>\$url</td>\n\t\t<td align='center'>\$help</td>\n\t\t<td align='center' >\$str_manage</td>\n\t\t</tr>"; $tree->init($categorys); $categorys = $tree->get_tree(0, $str); include $this->view('category_manage'); }
?> </td> <td><?php echo $r['urlrule']; ?> </td> <td align='center'><a href="javascript:edit('<?php echo $r['urlruleid']; ?> ')"><?php echo L('edit'); ?> </a> | <a href="<?php echo art_confirm(L('confirm', array('message' => $r['urlruleid'])), '?app=admin&controller=urlrule&action=delete&urlruleid=' . $r['urlruleid'] . '&menuid=' . $_GET['menuid']); ?> "><?php echo L('delete'); ?> </a></td> </tr> <?php } ?> </tbody> </table> <div id="pages"><?php echo $pages; ?> </div>
</td> <td align="center"><textarea ondblclick="copy_text(this)" style="width: 400px;height:30px" /><?php echo htmlspecialchars($v['tag']); ?> </textarea></td> <td align="center"><a href="javascript:edit(<?php echo $v['id']; ?> , '<?php echo htmlspecialchars(String::addslashes($v['name'])); ?> ')"><?php echo L('edit'); ?> </a> | <a href="<?php echo art_confirm(htmlspecialchars(String::addslashes(L('confirm', array('message' => $v['name'])))), '?app=tag&controller=tag&action=del&id=' . $v['id']); ?> " ><?php echo L('delete'); ?> </a></td> </tr> <?php } } ?> </tbody> </table> <div class="btn"> <label for="check_box"><?php echo L('select_all');
</td> <td align="center" width="12%"><a href="###" onclick="edit(<?php echo $info['linkid']; ?> , '<?php echo String::addslashes($info['name']); ?> ')" title="<?php echo L('edit'); ?> "><?php echo L('edit'); ?> </a> | <a href="<?php echo art_confirm(L('confirm', array('message' => String::addslashes($info['name']))), '?app=link&controller=link&action=delete&linkid=' . $info['linkid']); ?> "><?php echo L('delete'); ?> </a> </td> </tr> <?php } } ?> </tbody> </table> </div> <div class="btn">
echo $info['id']; ?> ', '<?php echo $info['trade_sn']; ?> ')"><?php echo L('change_price'); ?> </a> | <a href="?app=pay&controller=payment&action=pay_cancel&id=<?php echo $info['id']; ?> "><?php echo L('closed'); ?> </a> | <a href="<?php echo art_confirm(L('trade_record_del'), '?app=pay&controller=payment&action=pay_del&id=' . $info['id'] . '&menuid=' . $_GET['menuid']); ?> "><?php echo L('delete'); ?> </a> <?php } ?> </td> </tr> <?php } }
?> </a> <?php } else { ?> <font color="#BEBEBE"> <?php echo L('field_disabled'); ?> </font><?php } ?> |<?php if (!in_array($r['field'], $forbid_delete)) { ?> <a href="<?php echo art_confirm(L('confirm', array('message' => $r['name'])), '?app=content&controller=model_field&action=delete&modelid=' . $r['modelid'] . '&fieldid=' . $r['fieldid'] . '&menuid=' . $_GET['menuid']); ?> "><?php echo L('delete'); ?> </a><?php } else { ?> <font color="#BEBEBE"> <?php echo L('delete'); ?> </font><?php } ?> </td> </tr>
/** * 管理联动菜单子菜单 */ public function public_manage_submenu() { $keyid = isset($_GET['keyid']) && trim($_GET['keyid']) ? trim($_GET['keyid']) : showmessage(L('linkage_parameter_error')); $tree = Loader::lib('Tree'); $tree->icon = array(' │ ', ' ├─ ', ' └─ '); $tree->nbsp = ' '; $sum = $this->db->where(array('keyid' => $keyid))->count(); $sql_parentid = isset($_GET['parentid']) ? trim($_GET['parentid']) : 0; $where = $sum > 40 ? array('keyid' => $keyid, 'parentid' => $sql_parentid) : array('keyid' => $keyid); $result = $this->db->where($where)->order('listorder ,linkageid')->select(); $areas = array(); foreach ($result as $areaid => $area) { $areas[$area['linkageid']] = array('id' => $area['linkageid'], 'parentid' => $area['parentid'], 'name' => $area['name'], 'listorder' => $area['listorder'], 'style' => $area['style'], 'keyid' => $keyid, 'description' => $area['description']); $areas[$area['linkageid']]['str_manage'] = $sum > 40 && $this->_is_last_node($area['keyid'], $area['linkageid']) ? '<a href="?app=admin&controller=linkage&action=public_manage_submenu&keyid=' . $area['keyid'] . '&parentid=' . $area['linkageid'] . '">' . L('linkage_manage_submenu') . '</a> | ' : ''; $areas[$area['linkageid']]['str_manage'] .= '<a href="javascript:void(0);" onclick="add(\'' . $keyid . '\',\'' . String::addslashes($area['name']) . '\',\'' . $area['linkageid'] . '\')">' . L('linkage_add_submenu') . '</a> | <a href="javascript:void(0);" onclick="edit(\'' . $area['linkageid'] . '\',\'' . $area['name'] . '\',\'' . $area['parentid'] . '\')">' . L('edit') . '</a> | <a href="' . art_confirm(L('linkage_is_del'), '?app=admin&controller=linkage&action=delete&linkageid=' . $area['linkageid'] . '&keyid=' . $area['keyid']) . '">' . L('delete') . '</a> '; } $str = "<tr>\n <td align='center' width='80'><input name='listorders[\$id]' type='text' size='3' value='\$listorder' class='input-text-c'></td>\n <td align='center' width='100'>\$id</td>\n <td>\$spacer\$name</td>\n <td >\$description</td>\n <td align='center'>\$str_manage</td>\n </tr>"; $tree->init($areas); $submenu = $tree->get_tree($sql_parentid, $str); $big_menu = big_menu('?app=admin&controller=linkage&action=public_sub_add&keyid=' . $keyid, 'add', L('linkage_add'), 500, 430); include $this->view('linkage_submenu'); }
?> <a href="javascript:edit('<?php echo $info['pay_code']; ?> ', '<?php echo $info['pay_name']; ?> ')"><?php echo L('edit'); ?> </a> | <a href="<?php echo art_confirm(L('confirm', array('message' => $info['pay_name'])), '?app=admin&controller=payment&action=delete&id=' . $info['id']); ?> "><?php echo L('plus_uninstall'); ?> </a> <?php } else { ?> <a href="javascript:add('<?php echo $info['pay_code']; ?> ', '<?php echo $info['pay_name']; ?>
?> </a> | <a href="javascript:edit(<?php echo $v['id']; ?> , '<?php echo $v['name']; ?> ')"><?php echo L('edit'); ?> </a> | <a href="<?php echo art_confirm(L('confirm', array('message' => $v['name'])), '?app=block&controller=admin&action=del&id=' . $v['id']); ?> "><?php echo L('delete'); ?> </a></td> </tr> <?php } } ?> </tbody> </table> </div> </div> <div id="pages"><?php
echo $info['lastusetime'] ? date('Y-m-d H:i', $info['lastusetime']) : ''; ?> </td> <td align="center"><a href="javascript:edit(<?php echo $info['badid']; ?> , '<?php echo String::addslashes($info['badword']); ?> ')"><?php echo L('edit'); ?> </a> | <a href="<?php echo art_confirm(L('badword_confirm_del'), U('admin/badword/delete', array('badid' => $info['badid']))); ?> "><?php echo L('delete'); ?> </a></td> </tr> <?php } } ?> </tbody> </table> <div class="btn"> <a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('selected_all');
echo Format::date($v['creat_at'], 1); ?> </td> <td align="center"><?php echo $v['username']; ?> </td> <td align="center"><a href="<?php echo art_confirm(L('are_you_sure_you_want_to_restore'), '?app=template&controller=template_bak&action=restore&id=' . $v['id'] . '&style=' . $this->style . '&dir=' . $this->dir . '&filename=' . $this->filename); ?> " ><?php echo L('restore'); ?> </a> | <a href="<?php echo art_confirm(L('confirm', array('message' => Format::date($v['creat_at'], 1))), '?app=template&controller=template_bak&action=del&id=' . $v['id'] . '&style=' . $this->style . '&dir=' . $this->dir . '&filename=' . $this->filename); ?> " ><?php echo L('delete'); ?> </a></td> </tr> <?php } } ?> </tbody> </table> </from> </div> </div>
echo $info['url']; ?> </td> <td align="center"><a href="javascript:edit(<?php echo $info['keylinkid']; ?> , '<?php echo String::addslashes($info['word']); ?> ')"><?php echo L('edit'); ?> </a> | <a href="<?php echo art_confirm(L('keylink_confirm_del'), '?app=admin&controller=keylink&action=delete&keylinkid=' . $info['keylinkid']); ?> "><?php echo L('delete'); ?> </a></td> </tr> <?php } } ?> </tbody> </table> <div class="btn"> <a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('selected_all');
echo $info['siteurl']; ?> </td> <td width="15%" align="center"><a href="javascript:edit(<?php echo $info['id']; ?> , '<?php echo String::addslashes($info['sitename']); ?> ')"><?php echo L('edit'); ?> </a> | <a href="<?php echo art_confirm(L('downserver_del_cofirm'), U('admin/downserver/delete', array('id' => $info['id']))); ?> "><?php echo L('delete'); ?> </a></td> </tr> <?php } } ?> </tbody> </table> <div class="btn"> <input type="submit" class="btn btn-primary btn-sm"name="dosubmit" value="<?php