} else { echo NO_ENTRIES_ID; } } else { table(DELETE, '<center>' . DEL_NEWS . '<br /><a href="?section=admin&site=news&func=del&id=' . $id . '&agree=1"><span class="error">' . YES . '</span></a> <a href="?section=admin&site=news">' . NO . '</a></center>'); } } if (!isset($_SESSION['rights']['admin']['news']) and !isset($_SESSION['rights']['superadmin'])) { table(ERROR, NO_ADMIN_RIGHTS); } else { if (isset($_GET['func'])) { switch ($_GET['func']) { case 'add': admin_news_add(); break; case 'edit': admin_news_edit((int) $_GET['id']); break; case 'del': admin_news_del((int) $_GET['id']); break; case 'pin': admin_news(); break; default: admin_news(); } } else { admin_news(); } }
$content = admin_questions(); } elseif ($p == "admin_user") { $title = admin_user_title(); $content = admin_user(); } elseif ($p == "admin_arrive") { $title = admin_arrive_title(); $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();
function verif_admin_news($joueur, $news) { global $PHP_SELF; if (empty($joueur) || empty($news) || !(admin_general($joueur) || admin_news($joueur, $news))) { js_goto($PHP_SELF); } }