$content = admin_arrive(); } elseif ($p == "admin_active") { $title = admin_active_title(); $content = admin_active(); } elseif ($p == "admin_free") { $title = admin_free_title(); $content = admin_free(); } elseif ($p == "admin_news") { require_once realpath(__DIR__ . '/../includes/pages/admin_news.php'); $content = admin_news(); } elseif ($p == "admin_rooms") { $title = admin_rooms_title(); $content = admin_rooms(); } elseif ($p == "admin_groups") { $title = admin_groups_title(); $content = admin_groups(); } elseif ($p == "admin_language") { require_once realpath(__DIR__ . '/../includes/pages/admin_language.php'); $content = admin_language(); } elseif ($p == "admin_import") { $title = admin_import_title(); $content = admin_import(); } elseif ($p == "admin_shifts") { $title = admin_shifts_title(); $content = admin_shifts(); } elseif ($p == "admin_export_users") { require_once realpath(__DIR__ . '/../includes/controller/export_users_controller.php'); if (isset($_REQUEST['type'])) { $type = $_REQUEST['type']; } else { $ype = 'csv';
ob_start(); $tpl->display(DESIGN . '/tpl/admin/groups_add.html'); $content = ob_get_contents(); ob_end_clean(); main_content(GROUP_EDIT, $content, '', 1); } } else { table(ERROR, NO_ADMIN_RIGHTS); } } if (!isset($_SESSION['rights']['admin']['groups']) and !isset($_SESSION['rights']['superadmin'])) { table(ERROR, NO_ADMIN_RIGHTS); } else { if (isset($_GET['func'])) { switch ($_GET['func']) { case 'add': admin_groups_add(); break; case 'edit': admin_groups_edit((int) $_GET['id']); break; case 'del': admin_groups_del((int) $_GET['id']); break; default: admin_groups(); } } else { admin_groups(); } }