コード例 #1
0
ファイル: index.php プロジェクト: HostedDinner/fstat
require_once __DIR__ . "/classes/display/urlbuilder.php";
require_once __DIR__ . "/classes/backend.php";
//"Config"
require_once __DIR__ . "/config/settings.php";
include_once __DIR__ . "/config/information.php";
//instances of the classes
$displayTime = new DisplayTime();
$displayTime->setUnsafeStartDate(isset($_GET['year']) ? $_GET['year'] : null, isset($_GET['month']) ? $_GET['month'] : null);
$displayTime->setUnsafeEndDate(isset($_GET['year']) ? $_GET['year'] : null, isset($_GET['month']) ? $_GET['month'] : null);
$urlBuilder = new URLBuilder(isset($_GET['show']) ? $_GET['show'] : null, $lang->getLanguage());
$backend = new Backend();
if (isset($_GET['length'])) {
    $backend->setUnsafeListLength($_GET['length']);
}
//set Page title
switch ($urlBuilder->getPage()) {
    case "about":
        $fstat_title = FLANG_H_ABOUT_FSTAT;
        break;
    case "last":
        $fstat_title = FLANG_H_LAST . " " . $backend->getListLength() . " " . FLANG_VISITOR_L;
        break;
    case "lastbots":
        $fstat_title = FLANG_H_LAST . " " . $backend->getListLength() . " " . FLANG_BOT_L;
        break;
    case "overview":
    default:
        $fstat_title = FLANG_H_STATFOR . " " . $lang->monthnames[$displayTime->getStartMonth() - 1] . " " . $displayTime->getStartYear();
        break;
}
?>