コード例 #1
0
ファイル: index.php プロジェクト: emteg/beamercontrol
<?php

require_once "../klassen/authentication.class.php";
require_once "../config.php";
require_once "../klassen/datenbank.class.php";
require_once "../libs/smarty/Smarty.class.php";
require_once "../klassen/modul.class.php";
$datenbank = new Datenbank();
$dbModule = $datenbank->queryArray(TModul::SQL_SELECT_ALLE, array(), new ModulFactory());
$modulDateien = modulDateienSuchen($config["beamerModulePfad"]);
$module = modulArrayErzeugen($dbModule, $modulDateien);
seiteAnzeigen($module);
function modulDateienSuchen($pfad)
{
    $result = array();
    $ordner = scandir($pfad);
    foreach ($ordner as $aktuell) {
        if (istModulOrdner($aktuell)) {
            $result[$aktuell] = modulDateienVorhanden($pfad . $aktuell);
        }
    }
    return $result;
}
function seiteAnzeigen($module)
{
    global $config;
    $smarty = new Smarty();
    $smarty->setTemplateDir("../seiten/templates/module/");
    $smarty->assign("rootDir", $config["rootDir"]);
    $smarty->assign("module", $module);
    if (isset($_GET["fehler"]) && is_numeric($_GET["fehler"])) {
コード例 #2
0
ファイル: index.php プロジェクト: emteg/flurmanager
<?php

require_once "../../../klassen/authentication.class.php";
require_once "../../../config.php";
require_once "../../../libs/smarty/Smarty.class.php";
require_once "../../../klassen/datenbank.class.php";
require_once "../../../klassen/bewohner.class.php";
require_once "../../../klassen/belegung.class.php";
$datenbank = new Datenbank();
$belegungen = belegungenLaden();
seiteAnzeigen($belegungen);
function seiteAnzeigen($belegungen)
{
    global $config;
    $smarty = new Smarty();
    $smarty->assign("flurName", $config["flurName"]);
    $smarty->assign("rootDir", $config["rootDir"]);
    $smarty->assign("today", date("Y-m-d"));
    $smarty->assign("belegungen", $belegungen);
    $smarty->setTemplateDir("../../../seiten/templates/geld/neu/mehrfach");
    $smarty->display("index.tpl");
}
function belegungenLaden()
{
    global $datenbank;
    $sql = Belegung::SQL_SELECT_CURRENT_JOIN_BEWOHNER;
    $params = array();
    return $datenbank->queryArray($sql, $params, new BewohnerBelegungFactory());
}