Пример #1
0
$menu_array[] = array($admin_lang['articles'], 'admin.php?page=articles');
$menu_array[] = array($admin_lang['sitestyle'], 'admin.php?page=sitestyle');
$menu_array[] = array($admin_lang['users'], 'admin.php?page=users');
$menu_array[] = array($admin_lang['gallery editor'], 'admin.php?page=gallery_editor');
$menu_array[] = array($admin_lang['files'], 'admin.php?page=files');
$menu_array[] = array($admin_lang['logout'], 'admin.php?page=logout');
//
// insert the 'functions' here
//
if (!isset($extern_page)) {
    $extern_page = 'admincontrol';
}
if ($extern_page == '') {
    $extern_page = 'admincontrol';
}
counter_set("a:{$extern_page}");
if ($extern_page == 'admincontrol') {
    $title = $admin_lang['admincontrol'];
    $text = page_admincontrol();
} elseif ($extern_page == 'sitepreview') {
    $title = $admin_lang['sitepreview'];
    $text = page_sitepreview();
} elseif ($extern_page == 'menueeditor') {
    $title = $admin_lang['menueeditor'];
    $text = page_menueeditor();
} elseif ($extern_page == 'sitestyle') {
    $title = $admin_lang['sitestyle'];
    $text = page_sitestyle();
} elseif ($extern_page == 'news') {
    $title = $admin_lang['news'];
    $text = page_news();
Пример #2
0
set_usercookies();
//
// TOOD : GET AUTHORISATION
//
if (endsWith($_SERVER['PHP_SELF'], 'admin.php') && !$actual_user_is_admin && !$actual_user_is_logged_in) {
    header('Location: special.php?page=login');
}
$pagePrefix = 'l:';
if (endsWith($_SERVER['PHP_SELF'], 'admin.php')) {
    $pagePrefix = 'a:';
} elseif (endsWith($_SERVER['PHP_SELF'], 'gallery.php')) {
    $pagePrefix = 'g:';
} elseif (endsWith($_SERVER['PHP_SELF'], 'special.php')) {
    $pagePrefix = 's:';
}
counter_set($pagePrefix . $extern_page);
actual_online();
if (!isset($internal_style)) {
    $internal_style = "clear";
}
if (isset($extern_style) && $actual_user_is_admin && (!endsWith($_SERVER['PHP_SELF'], 'admin.php') || isset($extern_save))) {
    $internal_style = $extern_style;
}
$stylefile = "./styles/{$internal_style}/mainpage.php";
$_file = fopen($stylefile, 'r');
$page = fread($_file, filesize($stylefile));
if (!isset($internal_default_page)) {
    $internal_default_page = '';
}
if ($extern_page == $internal_default_page) {
    $page = preg_replace("/\\<notathome\\>(.+?)\\<\\/notathome\\>/s", "", $page);