コード例 #1
0
ファイル: menu.php プロジェクト: Kayomani/Obsidian
<?php

if (!CheckPermission("admin", "view admin menu")) {
    $master->AddError("You do not have permission to access this page!");
}
function convertDateOut($data)
{
    $date = strtotime($data);
    $fdate = strftime("%d/%m/%Y %H:%M", $date);
    return $fdate;
}
$lans = new Lan_events();
$lans->find();
$lanlist = array();
while ($lans->fetch()) {
    $lans->end = convertDateOut($lans->end);
    $lans->start = convertDateOut($lans->start);
    $seats = new Lan_seats();
    $seats->lan_id = $lans->id;
    $lans->true_seats = $seats->count();
    $lanlist[] = clone $lans;
}
$master->Smarty->assign("lans", $lanlist);
コード例 #2
0
ファイル: core.php プロジェクト: Kayomani/Obsidian
//Load system config
require_once 'config.php';
//require_once ('integration/integration.php');
//Load template libary
require_once 'libs/smarty/Smarty.class.php';
//Load Data objects
LoadDataObjects();
//Load Master
$master = new Master();
// Check LAN ID
if (getCurrentLID() == "0" || isset($_GET["lanid"])) {
    if (isset($_GET["lanid"])) {
        $lan = new Lan_events();
        $lan->id = $lan->escape($_GET["lanid"]);
        $lan->find();
        if (!$lan->fetch()) {
            die("Unknown LAN :-O");
        }
        $_SESSION["lanmode"] = $lan->mode_id;
        setCurrentLID($_GET["lanid"]);
        $master->Smarty->assign("lan", $lan);
    } else {
        die("Unknown LAN :-(");
    }
}
if (!isset($_SESSION["UID"])) {
    $_SESSION["UID"] = '0';
}
/*
 * ======================================================================================================
 *