getToken()) Http::redirect('../../auth/login', '无效的 token,请重新登录~'); if ($user->getPermission() != "2") Http::abort(403, '此页面仅超级管理员可访问'); } else { Http::redirect('../../auth/login', '非法访问,请先登录'); } $action = isset($_GET['action']) ? $_GET['action'] : 'index'; switch ($action) { case 'index': View::show('setup.migrations.index'); break; case 'import-v2-textures': View::show('setup.migrations.import-v2-textures'); break; case 'import-v2-users': View::show('setup.migrations.import-v2-users'); break; default: throw new App\Exceptions\E('非法参数', 1, true); break; }