Example #1
0
* 
* Calendar
* 
* @since 2004-06-05
* @author Christian Ehret <*****@*****.**> 
*/
$nocachecontrol = true;
include_once "../includes/default.inc.php";
$auth->is_authenticated();
include_once '../includes/bookingclass.inc.php';
include_once "../includes/fileselector.inc.php";
$booking = new Booking();
$bookid = $request->GetVar('bookid', 'get');
$bookdata = $booking->getMeldedata($bookid);
// get RTF-Template
$tplfile = selectfile('tpl_meldeschein.rtf');
// $tplfile = 'C:\wwwroot\zvs\default\tpl_meldeschein.rtf';
$tplHandle = fopen($tplfile, 'r');
$tpl = fread($tplHandle, filesize($tplfile));
fclose($tplHandle);
// replace placeholders
$tpl = ereg_replace("%arrival%", $bookdata[nicestart], $tpl);
$tpl = ereg_replace("%depature%", $bookdata[niceend], $tpl);
$tpl = ereg_replace("%name1%", $bookdata[lastname], $tpl);
$tpl = ereg_replace("%firstname1%", $bookdata[firstname], $tpl);
$birthday = "";
if ($bookdata[birthdate] !== "00.00.0000") {
    $birthday = $bookdata[birthdate];
}
$tpl = ereg_replace("%birthday1%", $birthday, $tpl);
$tpl = ereg_replace("%birthplace1%", $bookdata[birthplace], $tpl);
Example #2
0
} else {
    $theguestid = $request->GetVar('frm_theguestid', 'get');
    $start = $request->GetVar('frm_start', 'get');
    $end = $request->GetVar('frm_end', 'get');
    $guestarticles = $kassacls->getTimeline($theguestid, $start, $end, 'ASC', $cats);
    $table = '\\trowd\\trgaph10\\trleft-10\\trrh301\\trpaddl10\\trpaddr10\\trpaddfl3\\trpaddfr3\\clbrdrb\\brdrw10\\brdrs \\cellx830\\clbrdrb\\brdrw10\\brdrs \\cellx3420\\clbrdrb\\brdrw10\\brdrs \\cellx4662\\clbrdrb\\brdrw10\\brdrs \\cellx5904\\clbrdrb\\brdrw10\\brdrs \\cellx7145\\clbrdrb\\brdrw10\\brdrs \\cellx8387\\clbrbrb\\brdrw10\\brdrs \\cellx9629\\pard\\intbl\\nowidctlpar\\b Anzahl\\b0\\cell\\b Artikel\\b0\\cell\\b Datum\\b0\\cell\\b\\qr Preis\\b0\\cell\\b Total\\b0\\cell\\b Bezahlt\\cell Datum\\cell\\row';
    for ($i = 0; $i < count($guestarticles); $i++) {
        if ($i == count($guestarticles) - 2) {
            $table .= '\\trowd\\trgaph10\\trleft-10\\trrh301\\trpaddl10\\trpaddr10\\trpaddfl3\\trpaddfr3\\cellx830\\clbrdrt\\brdrw10\\brdrs \\cellx3420\\clbrdrt\\brdrw10\\brdrs \\cellx4662\\clbrdrt\\brdrw10\\brdrs \\cellx5904\\clbrdrt\\brdrw10\\brdrs \\cellx7145\\clbrdrt\\brdrw10\\brdrs \\cellx8387\\clbrdrt\\brdrw10\\brdrs\\brdrw10\\brdrs \\cellx9629\\pard\\intbl\\nowidctlpar\\cell\\cell\\cell\\pard\\intbl\\nowidctlpar\\qr\\b Summe:\\cell ' . $guestarticles[$i]['total1'] . ' \\\'80\\cell ' . $guestarticles[$i]['total2'] . ' \\\'80\\cell\\cell\\b0\\row';
        } elseif ($i == count($guestarticles) - 1) {
            $table .= '\\trowd\\trgaph10\\trleft-10\\trrh301\\trpaddl10\\trpaddr10\\trpaddfl3\\trpaddfr3\\cellx830\\cellx3420\\cellx4662\\cellx5904\\cellx7145\\cellx8387\\brdrw10\\brdrs\\brdrw10\\brdrs \\cellx9629\\pard\\intbl\\nowidctlpar\\cell\\cell\\cell\\pard\\intbl\\nowidctlpar\\qr\\b Differenz:\\cell ' . $guestarticles[$i]['total1'] . ' \\\'80\\b0\\cell\\cell\\cell\\row\\pard\\nowidctlpar\\par';
        } else {
            $table .= '\\trowd\\trgaph10\\trleft-10\\trrh301\\trpaddl10\\trpaddr10\\trpaddfl3\\trpaddfr3\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx830\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx3420\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx4662\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx5904\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx7145\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx8387\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx9629\\pard\\intbl\\nowidctlpar\\b0 ' . $guestarticles[$i]['num'] . '\\cell ' . $guestarticles[$i]['description'] . '\\cell ' . str_replace(',', ',\\par', $guestarticles[$i]['timestamp']) . ' Uhr\\cell\\pard\\intbl\\nowidctlpar\\qr ' . $guestarticles[$i]['price'] . ' \\\'80\\cell ' . $guestarticles[$i]['total1'] . ' \\\'80\\cell ' . $guestarticles[$i]['total2'] . ' \\\'80\\cell ' . str_replace(',', ',\\par', $guestarticles[$i]['updated']) . ' \\cell\\row';
        }
    }
}
// get RTF-Template
$tplfile = selectfile('tpl_receipt.rtf');
// $tplfile = 'C:\wwwroot\zvs\default\tpl_meldeschein.rtf';
$tplHandle = fopen($tplfile, 'r');
$tpl = fread($tplHandle, filesize($tplfile));
fclose($tplHandle);
// replace placeholders
$tpl = ereg_replace("%test%", $table, $tpl);
$tpl = ereg_replace("%name%", $barguest->getName($theguestid), $tpl);
$tpl = ereg_replace("%date%", date("d.m.Y"), $tpl);
// show RTF-File
header("Cache-control: private");
header("Content-type: application/rtf");
header("Content-Disposition: attachment; filename=\"bon.rtf\"");
echo $tpl;
    $statarr = $roomlist->getlist($thestart, $theend);
}
$children1 = $request->GetVar('children1', 'session');
$children2 = $request->GetVar('children2', 'session');
$children3 = $request->GetVar('children3', 'session');
//  $table = '\trowd\trgaph70\trleft-108\trbrdrl\brdrs\brdrw15\brdrcf1 \trbrdrt\brdrs\brdrw15\brdrcf1 \trbrdrr\brdrs\brdrw15\brdrcf1 \trbrdrb\brdrs\brdrw15\brdrcf1 \trpaddl70\trpaddr70\trpaddfl3\trpaddfr3\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx648\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx1667\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx3935\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx4954\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx5973\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx7575\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx8596\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx9276\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx9956\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx10636\clbrdrt\brdrw15\brdrs\brdrcf1\clbrdrb\brdrw15\brdrs\brdrcf1 \cellx12415\pard';
$table = '\\trowd\\trgaph70\\trleft-70\\trbrdrl\\brdrs\\brdrw15\\brdrcf1 \\trbrdrt\\brdrs\\brdrw15\\brdrcf1 \\trbrdrr\\brdrs\\brdrw15\\brdrcf1 \\trbrdrb\\brdrs\\brdrw15\\brdrcf1 \\trpaddl70\\trpaddr70\\trpaddfl3\\trpaddfr3\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx840\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx1970\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx3113\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx4133\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx5263\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx6393\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx8343\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx9620\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx10433\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx11246\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx12059\\clbrdrt\\brdrw15\\brdrs\\brdrcf1\\clbrdrb\\brdrw15\\brdrs\\brdrcf1 \\cellx13299\\pard';
$table .= '\\intbl\\nowidctlpar\\b\\fs22 Zimmer\\cell Abreise\\cell Nachname\\cell Vorname\\cell Ankunft\\cell Abreise\\cell Buchungskategorie\\cell Erwachsene\\cell Kinder bis 3\\cell Kinder bis 12\\cell Kinder bis 16\\cell Bemerkung\\cell\\row\\trowd\\trgaph70\\trleft-70\\trbrdrl\\brdrs\\brdrw15\\brdrcf1 \\trbrdrt\\brdrs\\brdrw15\\brdrcf1 \\trbrdrr\\brdrs\\brdrw15\\brdrcf1 \\trbrdrb\\brdrs\\brdrw15\\brdrcf1 \\trpaddl70\\trpaddr70\\trpaddfl3\\trpaddfr3\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx840\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx1970\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx3113\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx4133\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx5263\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx6393\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx8343\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx9620\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx10433\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx11246\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx12059\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx13299\\pard';
//  $table .= '\intbl\nowidctlpar\b\fs16 Zimmer\cell Abreise\cell Name\cell Ankunft\cell Abreise\cell Buchungskategorie\cell Erwachsene\cell Kinder bis 3\cell Kinder bis 12\cell Kinder bis 16\cell Bemerkung\cell\row\trowd\trgaph70\trleft-108\trbrdrl\brdrs\brdrw15\brdrcf1 \trbrdrt\brdrs\brdrw15\brdrcf1 \trbrdrr\brdrs\brdrw15\brdrcf1 \trbrdrb\brdrs\brdrw15\brdrcf1 \trpaddl70\trpaddr70\trpaddfl3\trpaddfr3 \clbrdrt\brdrw15\brdrs\brdrcf1 \cellx648\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx1667\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx3935\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx4954\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx5973\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx7575\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx8596\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx9276\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx9956\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx10636\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx12415\pard';
for ($i = 0; $i < count($statarr); $i++) {
    $name = $statarr[$i]['lastname'];
    if ($statarr[$i]['firstname'] != '') {
        $name .= ", " . $statarr[$i]['firstname'];
    }
    $table .= '\\intbl\\nowidctlpar\\b0 ' . $statarr[$i]['room'] . '\\cell ' . $statarr[$i]['enddate'] . '\\cell ' . $statarr[$i]['lastname'] . '\\cell ' . $statarr[$i]['firstname'] . '\\cell ' . $statarr[$i]['startdate'] . '\\cell ' . $statarr[$i]['enddate2'] . '\\cell ' . $statarr[$i]['bookingcat'] . '\\cell ' . $statarr[$i]['person'] . '\\cell ' . $statarr[$i]['children1'] . '\\cell ' . $statarr[$i]['children2'] . '\\cell ' . $statarr[$i]['children3'] . '\\cell ' . $statarr[$i]['addinfo'] . '\\cell\\row\\trowd\\trgaph70\\trleft-70\\trbrdrl\\brdrs\\brdrw15\\brdrcf1 \\trbrdrt\\brdrs\\brdrw15\\brdrcf1 \\trbrdrr\\brdrs\\brdrw15\\brdrcf1 \\trbrdrb\\brdrs\\brdrw15\\brdrcf1 \\trpaddl70\\trpaddr70\\trpaddfl3\\trpaddfr3\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx840\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx1970\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx3113\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx4133\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx5263\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx6393\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx8343\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx9620\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx10433\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx11246\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx12059\\clbrdrt\\brdrw15\\brdrs\\brdrcf1 \\cellx13299\\pard';
    //		$table .= '\intbl\nowidctlpar\b0 '.$statarr[$i]['room'].'\cell '.$statarr[$i]['enddate'].'\cell '.$name.'                                                      \cell '.$statarr[$i]['startdate'].'\cell '.$statarr[$i]['enddate2'].'\cell '.$statarr[$i]['bookingcat'].'\cell '.$statarr[$i]['person'].'\cell '.$statarr[$i]['children1'].'\cell '.$statarr[$i]['children2'].'\cell '.$statarr[$i]['children3'].'\cell '.$statarr[$i]['addinfo'].'\cell\row\trowd\trgaph70\trleft-108\trbrdrl\brdrs\brdrw15\brdrcf1 \trbrdrt\brdrs\brdrw15\brdrcf1 \trbrdrr\brdrs\brdrw15\brdrcf1 \trbrdrb\brdrs\brdrw15\brdrcf1 \trpaddl70\trpaddr70\trpaddfl3\trpaddfr3\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx648\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx1667\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx3935\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx4954\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx5973\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx7575\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx8596\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx9276\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx9956\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx10636\clbrdrt\brdrw15\brdrs\brdrcf1 \cellx12415\pard';
}
$table .= '\\nowidctlpar\\fs16\\par';
// get RTF-Template
$tplfile = selectfile('tpl_guest.rtf');
$tplHandle = fopen($tplfile, 'r');
$tpl = fread($tplHandle, filesize($tplfile));
fclose($tplHandle);
// replace placeholders
$tpl = ereg_replace("%table%", $table, $tpl);
$tpl = ereg_replace("%date%", date("d.m.Y"), $tpl);
// show RTF-File
header("Cache-control: private");
header("Content-type: application/rtf");
header("Content-Disposition: attachment; filename=\"roomchange.rtf\"");
echo $tpl;
Example #4
0
} else {
    list($month, $year) = split('[/]', $theend);
    $theend = "{$year}-{$month}-01 00:00:00";
    $rtfdate = "bis 01.{$month}.{$year} ";
    list($month, $year) = split('[/]', $thestart);
    $thestart = "{$year}-{$month}-01 00:00:00";
    $statarr = $statistics->get($thestart, $theend, $thecat3);
    $rtfdate = "vom 01.{$month}.{$year} " . $rtfdate;
}
$table = '\\trowd\\trgaph10\\trleft-10\\trrh301\\trpaddl10\\trpaddr10\\trpaddfl3\\trpaddfr3\\clbrdrb\\brdrw10\\brdrs \\cellx851\\clbrdrb\\brdrw10\\brdrs \\cellx4678\\clbrdrb\\brdrw10\\brdrs \\cellx5954\\clbrdrb\\brdrw10\\brdrs \\cellx7230\\pard\\intbl\\nowidctlpar\\b Anzahl\\b0\\cell\\b Artikel\\b0\\cell\\qr\\b Einzelpreis\\b0\\cell\\b Summe\\b0\\cell\\row';
for ($i = 0; $i < count($statarr); $i++) {
    if ($i == count($statarr) - 1) {
        $table .= '\\trowd\\trgaph10\\trleft-10\\trrh301\\trpaddl10\\trpaddr10\\trpaddfl3\\trpaddfr3\\clbrdrt\\brdrw10\\brdrs\\brdrw10\\brdrs \\cellx851\\clbrdrt\\brdrw10\\brdrs\\brdrw10\\brdrs \\cellx4678\\clbrdrt\\brdrw10\\brdrs\\brdrw10\\brdrs \\cellx5954\\clbrdrt\\brdrw10\\brdrs\\brdrw10\\brdrs \\cellx7230\\pard\\intbl\\nowidctlpar \\cell\\cell\\pard\\intbl\\nowidctlpar\\qr\\b Summe: \\b0\\cell\\b ' . str_replace('.', ',', $statarr[$i]['total']) . ' EUR\\b0\\cell\\row\\pard\\nowidctlpar\\par';
    } else {
        $table .= '\\trowd\\trgaph10\\trleft-10\\trrh301\\trpaddl10\\trpaddr10\\trpaddfl3\\trpaddfr3\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx851\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx4678\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx5954\\clbrdrt\\brdrw10\\brdrs\\clbrdrb\\brdrw10\\brdrs \\cellx7230\\pard\\intbl\\nowidctlpar ' . $statarr[$i]['num'] . '\\cell ' . $statarr[$i]['description'] . '\\cell\\pard\\intbl\\nowidctlpar\\qr ' . str_replace('.', ',', $statarr[$i]['price']) . ' EUR\\cell ' . str_replace('.', ',', $statarr[$i]['total']) . ' EUR\\cell\\row';
    }
}
// get RTF-Template
$tplfile = selectfile('tpl_statistics.rtf');
// $tplfile = 'C:\wwwroot\zvs\default\tpl_meldeschein.rtf';
$tplHandle = fopen($tplfile, 'r');
$tpl = fread($tplHandle, filesize($tplfile));
fclose($tplHandle);
// replace placeholders
$tpl = ereg_replace("%table%", $table, $tpl);
$tpl = ereg_replace("%date%", $rtfdate, $tpl);
// show RTF-File
header("Cache-control: private");
header("Content-type: application/rtf");
header("Content-Disposition: attachment; filename=\"statistics.rtf\"");
echo $tpl;
Example #5
0
*  free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
* 
*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html.
*  A copy is found in the textfile GPL.txt and important notices to the license 
*  from the author is found in LICENSE.txt distributed with these scripts.
*
* 
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* View "meldeschein" as PDF
* 
* Calendar
* 
* @since 2004-06-05
* @author Christian Ehret <*****@*****.**> 
*/
include_once "../includes/default.inc.php";
$auth->is_authenticated();
include_once "../includes/fileselector.inc.php";
include_once selectfile('meldescheinpdf.php');
 /**
  * Booking::emailConfirmation()
  * 
  * Create a mailto link for email confirmation
  * 
  * @param number $bookid id of booking
  * @return string mailto link
  * @access public 
  * @since 2003-09-30
  * @author Christian Ehret <*****@*****.**> 
  */
 function emailConfirmation($bookid)
 {
     include_once "../includes/fileselector.inc.php";
     include_once selectfile('emailconfirmation.php');
     return createEmailConfirmation($bookid);
 }