Rumah > Artikel > pembangunan bahagian belakang > 【php】八、学生管理系统-查看管理员
【php】8、学生管理系统-查看管理员
<?php include_once 'adminService.class.php'; include_once 'admin.class.php'; session_start(); $name = $_SESSION['admin_name']; if($name == "") { header("Location: admin_login.php?error=1"); exit(); } $admin = new admin(); $service = new adminservice(); $admin = $service->getAdminByName($name); $ii = $admin->getPower(); if($ii > 1) { header("Location: godAdminlist.php"); exit(); } $pagesize = 12; $pagenow = 1; $pagecount = 0; $pagecount = $service->getpagecount($pagesize); if(!empty($_GET['pagenow'])) { $pagenow=$_GET['pagenow']; } $adminlist = $service->getadminlist($pagesize, $pagenow); ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>管理员管理系统</title>
如果登陆的是超级管理员的话:
<?php include_once 'adminService.class.php'; session_start(); $name = $_SESSION['admin_name']; if($name == "") { header("Location: admin_login.php?error=1"); exit(); } $pagesize = 12; $pagenow = 1; $pagecount = 0; $service = new adminservice(); $pagecount = $service->getpagecount($pagesize); if(!empty($_GET['pagenow'])) { $pagenow=$_GET['pagenow']; } $adminlist = $service->getadminlist($pagesize, $pagenow); ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>管理员管理系统</title>