$CONTENTTITEL .= '  »  ' . $_LANGUAGE['main_title'];
$TITLE_LOCATION = $_LANGUAGE['admincenter'] . ' - ' . $_LANGUAGE['main_title'];
$color = $_SESSION['APCMS']['HELPSYSTEM']['BGCOLOR'];
$NEWPACMSVERSION = '';
$NEWVERSION = '';
$vstatus = array();
if ($check_version == 1) {
    $vstatus = _APCMS_GetStatusCodeFromUrl($VFILE);
    $versionstxt = $vstatus['html'];
    $match = array();
    preg_match("`([\\s]*(APCMS)[\\s]*)([0-9\\.]*)([\\s]*)`i", $versionstxt, $match);
    if (isset($match[3]) && $match[3] != "") {
        $NEWPACMSVERSION = $match[3];
    }
    if (version_compare(_APCMS_version(), $NEWPACMSVERSION) == -1) {
        $NEWVERSION = _APCMS_MakeHref("http://www.php-programs.de", _APCMS_MakeImg($_SESSION['APCMS']['STYLES_URL'] . "/" . $_SESSION['APCMS']['STYLE'] . "/images/gfx/newversion.gif", 'Neue Version verfügbar!!!'), "APCMS-Homepage", "_blank");
    }
}
$OnlineUserArray = _APCMS_GetUserOnline('indexstats');
if (!($lastbackup = _APCMS_GetLastBackup())) {
    $LASTBACKUPTIME = "<span style=\"color:red\"><b><blink>Noch kein Backup!</blink></b></span>";
    $LASTBACKUPFILE = "<span style=\"color:red\"><b>--</b></span>";
} elseif ($lastbackup['time'] <= $akt_time - 604800) {
    $LASTBACKUPTIME = "<span style=\"color:red\"><blink>" . _APCMS_FormattedDateTime($lastbackup['time']) . "</blink></span>";
    $LASTBACKUPFILE = "<span style=\"color:red\">" . _APCMS_SpecialChars($lastbackup['file']) . "</span>";
} else {
    $LASTBACKUPTIME = _APCMS_FormattedDateTime($lastbackup['time']);
    $LASTBACKUPFILE = _APCMS_SpecialChars($lastbackup['file']);
}
require_once $_SESSION['APCMS']['CLASS_DIR'] . "/apcms_admintable.class." . $_SESSION['APCMS']['SUFFIX'];
$ADMINTABLE1 = new APCMS_ADMINTABLE($_SESSION['APCMS']['TABLE']['BGCOLOR'], $_SESSION['APCMS']['HELPSYSTEM']['BGCOLOR'], $_SESSION['APCMS']['HELPSYSTEM']['FGCOLOR']);
/** 
 * Generiert die Navbuttons 
 * 
 * @param          string $text Text auf dem Button 
 * @param          string $link Link 
 * @param          string $helptitel Hilfetext-Titel 
 * @param          string $helptext Hilfetext 
 * @since          0.0.1 
 * @version        0.0.1 
 * @access         private 
 * @return         string 
 * @author         Alexander Mieland 
 * @copyright      2000-2004 by APP - Another PHP Program 
 */
function _APCMS_GenNavButton($text, $link, $helptitel, $helptext)
{
    $IMGSTRING = '';
    $button = strtolower(str_replace(" ", "_", str_replace("-", "_", $text)));
    if (_APCMS_havePNGSupport()) {
        $BUTTON = $button . ".png";
    } elseif (_APCMS_haveJPEGSupport()) {
        $BUTTON = $button . ".jpg";
    } elseif (_APCMS_haveGIFSupport()) {
        $BUTTON = $button . ".gif";
    }
    if (!file_exists($_SESSION['APCMS']['STYLES_DIR'] . '/' . $_SESSION['APCMS']['STYLE'] . '/images/navbuttons/' . $BUTTON)) {
        $NAVBUTTON = $_SESSION['APCMS']['STYLES_DIR'] . "/" . $_SESSION['APCMS']['STYLE'] . "/images/navbuttons/navbutton.png";
        $NAVBUTTON_DIR = $_SESSION['APCMS']['STYLES_DIR'] . "/" . $_SESSION['APCMS']['STYLE'] . "/images/navbuttons";
        $fontfile = $_SESSION['APCMS']['STYLES_DIR'] . "/" . $_SESSION['APCMS']['STYLE'] . "/configs/buttonfont.ttf";
        if (_APCMS_havePNGSupport()) {
            $im = imagecreatefrompng($NAVBUTTON);
        } elseif (_APCMS_haveJPEGSupport()) {
            $im = imagecreatefromjpeg($NAVBUTTON);
        } elseif (_APCMS_haveGIFSupport()) {
            $im = imagecreatefromgif($NAVBUTTON);
        }
        $black = ImageColorAllocate($im, 0, 0, 0);
        $whiteRGB = _APCMS_hex2rgb($_SESSION['APCMS']['NAVBUTTONS']['COLOR']);
        #echo $_SESSION['APCMS']['NAVBUTTONS']['COLOR']."<br>";
        #echo $whiteRGB['r']." | ".$whiteRGB['g']." | ".$whiteRGB['b']."<br>";
        $white = ImageColorAllocate($im, intval($whiteRGB['r']), intval($whiteRGB['g']), intval($whiteRGB['b']));
        ImageTTFText($im, 7, 0, 2, 11, $white, $fontfile, $text);
        if (_APCMS_havePNGSupport()) {
            imagepng($im, $NAVBUTTON_DIR . "/" . $BUTTON);
        } elseif (_APCMS_haveJPEGSupport()) {
            imagejpeg($im, $NAVBUTTON_DIR . "/" . $BUTTON);
        } elseif (_APCMS_haveGIFSupport()) {
            imagegif($im, $NAVBUTTON_DIR . "/" . $BUTTON);
        }
        imagedestroy($im);
    }
    $IMGSTRING .= '<a href="' . $link . '" ' . _APCMS_HelpSystem('<b>' . $helptitel . '</b><br>' . $helptext) . '>';
    $IMGSTRING .= _APCMS_MakeImg($_SESSION['APCMS']['STYLES_URL'] . '/' . $_SESSION['APCMS']['STYLE'] . '/images/navbuttons/' . $BUTTON, ucwords($button));
    $IMGSTRING .= '</a>';
    return $IMGSTRING;
}