Exemplo n.º 1
0
* @author Christian Ehret <*****@*****.**> 
*/
$smartyType = "www";
include_once "../includes/default.inc.php";
$auth->is_authenticated();
include_once 'guestclass.inc.php';
$guest = new Guest();
$smarty->assign("tpl_title", "Gast bearbeiten/anlegen");
if ($request->GetVar('type', 'get') == "edit") {
    $smarty->assign('tpl_nav', 'gast');
    $smarty->assign('tpl_type', 'edit');
} else {
    $smarty->assign('tpl_nav', 'showgast');
    $smarty->assign('tpl_type', 'show');
}
$smarty->assign('tpl_subnav', 'documents');
if ($request->GetVar('guestid', 'get') !== $request->undefined) {
    $guestid = $request->GetVar('guestid', 'get');
    $smarty->assign('tpl_guestid', $guestid);
    if ($request->GetVar('showall', 'get') == 'true') {
        $number = 0;
    } else {
        $number = 10;
    }
    $smarty->assign('tpl_gast', $guest->getGuest($guestid));
    $smarty->assign('tpl_meldedocuments', $guest->getMeldeData($guestid, $number));
    $smarty->assign('tpl_bookings', $guest->getLastBookings($guestid, $number));
    $smarty->assign('tpl_laststays', $guest->getLastStays($guestid, $number));
    $smarty->assign('tpl_lastreceipts', $guest->getLastReceipts($guestid, $number));
}
$smarty->display('showguestdocuments.tpl');