* Lists * * @since 2004-02-25 * @author Christian Ehret <*****@*****.**> */ $smartyType = "www"; include_once "../includes/default.inc.php"; $auth->is_authenticated(); $smarty->assign("tpl_title", "Einnahmen"); $smarty->assign('tpl_nav', 'lists'); $smarty->assign('tpl_subnav', 'income'); $smarty->assign('tpl_type', 'lists'); include_once "accountclass.inc.php"; $account = new Account(); include_once "paycategoryclass.inc.php"; $paycat = new PayCategory(); $smarty->assign('tpl_paycat', $paycat->getall()); $todaydate = getdate(); $day = $todaydate['mday']; $month = $todaydate['mon']; $year = $todaydate['year']; $thedate = "{$day}.{$month}.{$year}"; $theotherdate = "{$day}-{$month}-{$year}"; $smarty->assign('tpl_dates', $account->getdates()); if ($request->GetVar('frm_start', 'post') !== $request->undefined) { $thestart = $request->GetVar('frm_start', 'post'); } else { $thestart = $month . '/' . $year; } $theotherstart = str_replace('/', '-', $thestart); if ($request->GetVar('frm_end', 'post') !== $request->undefined) {
if ($request->GetVar('frm_bookids', 'post') !== $request->undefined) { $bookids = $request->GetVar('frm_bookids', 'post'); } else { $bookids = array($request->GetVar('frm_bookingid', 'post')); } $account->book($request->GetVar('frm_guestid', 'post'), $request->GetVar('frm_bookingid', 'post'), $request->GetVar('frm_date_payment', 'post'), $request->GetVar('frm_description', 'post'), $request->GetVar('frm_amount', 'post'), $request->GetVar('frm_paycat', 'post'), $request->GetVar('frm_receiptid', 'post'), $request->GetVar('frm_on_receipt', 'post')); $addids = $request->GetVar('frm_bookings', 'post'); for ($i = 0; $i < count($addids); $i++) { if ($addids[$i] !== $request->GetVar('frm_bookingid', 'post')) { $account->setStatus($request->GetVar('frm_receiptid', 'post'), $addids[$i]); } } $smarty->assign('tpl_close', 'true'); } else { include_once 'paycategoryclass.inc.php'; $pcat = new PayCategory(); $todaydate = getdate(); $day = $todaydate['mday']; $month = $todaydate['mon']; $year = $todaydate['year']; $thedate = "{$day}.{$month}.{$year}"; $smarty->assign('tpl_thedate', $thedate); $smarty->assign('tpl_guestid', $request->GetVar('frm_accountguestid', 'post')); $smarty->assign('tpl_bookingid', $request->GetVar('frm_bookid', 'post')); $smarty->assign('tpl_bookdate', $booking->getDate($request->GetVar('frm_bookid', 'post'))); $smarty->assign('tpl_receiptid', $request->GetVar('frm_receiptid', 'post')); $smarty->assign('tpl_on_receipt', $request->GetVar('frm_on_receipt', 'post')); if ($request->GetVar('frm_bookids', 'post') !== $request->undefined) { $bookids = $request->GetVar('frm_bookids', 'post'); $smarty->assign('tpl_bookids', $bookids); for ($i = 0; $i < count($bookids); $i++) {
* * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ /** * Manage guest categories * * Settings * * @since 2004-06-05 * @author Christian Ehret <*****@*****.**> */ $smartyType = "www"; include_once "../includes/default.inc.php"; $auth->is_authenticated(); include_once 'paycategoryclass.inc.php'; $pcategory = new PayCategory(); $smarty->assign("tpl_title", "Zahlungskategorieverwaltung"); $smarty->assign('tpl_nav', 'settings'); $smarty->assign('tpl_subnav', 'catsettings'); $smarty->assign('tpl_subnav2', 'paycategory'); if ($request->GetVar('frm_catid', 'post') !== $request->undefined) { if ($request->GetVar('frm_action', 'post') == 'edit') { $smarty->assign('tpl_editid', $request->GetVar('frm_catid', 'post')); } else { if ($request->GetVar('frm_action', 'post') == 'addnew') { $smarty->assign('tpl_addnew', 'true'); } else { if ($request->GetVar('frm_action', 'post') == 'del') { $pcategory->del($request->GetVar('frm_catid', 'post')); } else { $check = $pcategory->saveupdate();