diff options
| author | Nigel Osborne <kiwi3685@me.com> | 2010-05-21 08:39:53 +0000 |
|---|---|---|
| committer | Nigel Osborne <kiwi3685@me.com> | 2010-05-21 08:39:53 +0000 |
| commit | d8dbf93181515642b24a4794f02cb5f979a849dd (patch) | |
| tree | 3b162d434a7d7ce2a0cca2660d80453cdc817320 /includes/classes/class_reportbase.php | |
| parent | 79119da2b89bcd3a250943b5b7bb3bce103a891a (diff) | |
| download | webtrees-d8dbf93181515642b24a4794f02cb5f979a849dd.tar.gz webtrees-d8dbf93181515642b24a4794f02cb5f979a849dd.tar.bz2 webtrees-d8dbf93181515642b24a4794f02cb5f979a849dd.zip | |
Removing the use of PGVR from all report files - part of the "Rebranding" blueprint
Diffstat (limited to 'includes/classes/class_reportbase.php')
| -rw-r--r-- | includes/classes/class_reportbase.php | 764 |
1 files changed, 382 insertions, 382 deletions
diff --git a/includes/classes/class_reportbase.php b/includes/classes/class_reportbase.php index 95595a3721..04b4ca54e3 100644 --- a/includes/classes/class_reportbase.php +++ b/includes/classes/class_reportbase.php @@ -66,88 +66,88 @@ if (!isset($embed_fonts)) { * @package webtrees * @subpackage Reports */ -class PGVReportBase { +class ReportBase { /** * Left Margin (expressed in points) Default: 17.99 mm, 0.7083 inch - * @see PGVRDocSHandler() + * @see DocSHandler() * @var float */ public $leftmargin = 51; /** * Right Margin (expressed in points) Default: 9.87 mm, 0.389 inch - * @see PGVRDocSHandler() + * @see DocSHandler() * @var float */ public $rightmargin = 28; /** * Top Margin (expressed in points) Default: 26.81 mm - * @see PGVRDocSHandler() + * @see DocSHandler() * @var float */ public $topmargin = 76; /** * Bottom Margin (expressed in points) Default: 21.6 mm - * @see PGVRDocSHandler() + * @see DocSHandler() * @var float */ public $bottommargin = 60; /** * Header Margin (expressed in points) Default: 4.93 mm - * @see PGVRDocSHandler() + * @see DocSHandler() * @var float */ public $headermargin = 14; /** * Footer Margin (expressed in points) Default: 9.88 mm, 0.389 inch - * @see PGVRDocSHandler() + * @see DocSHandler() * @var float */ public $footermargin = 28; /** * Page orientation (portrait, landscape) - * @see PGVRDocSHandler() + * @see DocSHandler() * @var string */ public $orientation = "portrait"; /** * Page format name - * @see PGVRDocSHandler() - * @see PGVReportBase::setup() + * @see DocSHandler() + * @see ReportBase::setup() * @var string */ public $pageFormat = "A4"; /** * Height of page format in points - * @see PGVRDocSHandler() - * @see PGVReportBase::setup() + * @see DocSHandler() + * @see ReportBase::setup() * @var float */ public $pageh = 0.0; /** * Width of page format in points - * @see PGVRDocSHandler() - * @see PGVReportBase::setup() + * @see DocSHandler() + * @see ReportBase::setup() * @var float */ public $pagew = 0.0; /** - * An array of the PGVRStyles elements found in the document - * @see PGVRStyleSHandler() + * An array of the Styles elements found in the document + * @see StyleSHandler() * @var array */ - public $PGVRStyles = array(); + public $Styles = array(); /** * The default Report font name - * @see PGVRStyleSHandler() + * @see StyleSHandler() * @var string */ public $defaultFont = "dejavusans"; /** * The default Report font size - * @see PGVRStyleSHandler() + * @see StyleSHandler() * @var int */ public $defaultFontSize = 12; @@ -160,7 +160,7 @@ class PGVReportBase { /** * RTL Language (false=LTR, true=RTL) - * @see PGVReportBase::setup() + * @see ReportBase::setup() * @var boolean */ public $rtl = false; @@ -173,20 +173,20 @@ class PGVReportBase { /** * Character set - * @see PGVReportBase::setup() + * @see ReportBase::setup() * @var string */ public $charset = "UTF-8"; /** * Show the Generated by... (true=show the text) - * @see PGVRDocSHandler() + * @see DocSHandler() * @var boolean */ public $showGenText = true; /** * Generated By... text - * @see PGVReportBase::setup() + * @see ReportBase::setup() * @var string */ public $generatedby = ""; @@ -199,7 +199,7 @@ class PGVReportBase { /** * The report title - * @see PGVReportBase::addTitle() + * @see ReportBase::addTitle() * @var string */ public $title = ""; @@ -211,24 +211,24 @@ class PGVReportBase { // var $rauthor = ""; /** * Keywords - * @see PGVReportBase::setup() + * @see ReportBase::setup() * @var string */ public $rkeywords = ""; /** * Report Description / Subject - * @see PGVReportBase::addDescription() + * @see ReportBase::addDescription() * @var string */ public $rsubject = ""; /** - * Initial Setup - PGVReportBase + * Initial Setup - ReportBase * * Setting up document wide defaults that will be inherited of the report modules * As DEFAULT A4 and Portrait will be used if not set * - * @see PGVRDocSHandler() + * @see DocSHandler() * @todo add page sizes to wiki */ function setup() { @@ -376,17 +376,17 @@ class PGVReportBase { } else { if ($this->pagew < 10) { - die("<strong>REPORT ERROR PGVReportBase::setup(): </strong>For custom size pages you must set \"customwidth\" larger then this in the XML file"); + die("<strong>REPORT ERROR ReportBase::setup(): </strong>For custom size pages you must set \"customwidth\" larger then this in the XML file"); } if ($this->pageh < 10) { - die("<strong>REPORT ERROR PGVReportBase::setup(): </strong>For custom size pages you must set \"customheight\" larger then this in the XML file"); + die("<strong>REPORT ERROR ReportBase::setup(): </strong>For custom size pages you must set \"customheight\" larger then this in the XML file"); } } return 0; } /** - * Process the Header , Page header, Body or Footer - PGVReportBase + * Process the Header , Page header, Body or Footer - ReportBase * * @param string $p Header (H), Page header (PH), Body (B) or Footer (F) */ @@ -396,7 +396,7 @@ class PGVReportBase { } /** - * Add the Title when raw character data is used in PGVRTitle - PGVReportBase + * Add the Title when raw character data is used in Title - ReportBase * * @param string $data */ @@ -406,7 +406,7 @@ class PGVReportBase { } /** - * Add the Description when raw character data is used in PGVRDescription - PGVReportBase + * Add the Description when raw character data is used in Description - ReportBase * * @param string $data */ @@ -416,27 +416,27 @@ class PGVReportBase { } /** - * Add Style to PGVRStyles array - PGVReportBase + * Add Style to Styles array - ReportBase * - * @see PGVRStyleSHandler() + * @see StyleSHandler() * @param array $style */ function addStyle($style) { - $this->PGVRStyles[$style["name"]] = $style; + $this->Styles[$style["name"]] = $style; return 0; } /** - * Get a style from the PGVRStyles array - PGVReportBase + * Get a style from the Styles array - ReportBase * * @param string $s Style name * @return array */ function getStyle($s) { - if (!isset($this->PGVRStyles[$s])) { - return current($this->PGVRStyles); + if (!isset($this->Styles[$s])) { + return current($this->Styles); } - return $this->PGVRStyles[$s]; + return $this->Styles[$s]; } // static callback functions to sort data @@ -453,8 +453,8 @@ class PGVReportBase { * function get_type() { // remove this die line only if it's cousing problem - It confirms that it's not used - die("<strong>REPORT ERROR PGVReportBase::get_type: </strong> It is used"); - return "PGVReportBase"; + die("<strong>REPORT ERROR ReportBase::get_type: </strong> It is used"); + return "ReportBase"; } */ } @@ -465,7 +465,7 @@ class PGVReportBase { * @package webtrees * @subpackage Reports */ -class PGVRElement { +class Element { /** * @var string */ @@ -491,7 +491,7 @@ class PGVRElement { } function addText($t) { - global $embed_fonts, $SpecialOrds, $pgvreport, $reportTitle, $reportDescription; + global $embed_fonts, $SpecialOrds, $wt_report, $reportTitle, $reportDescription; foreach($SpecialOrds as $ord) { if (strpos($t, chr($ord))!==false) { @@ -508,9 +508,9 @@ class PGVRElement { // Adding the title and description to the Document Properties if ($reportTitle) { - $pgvreport->addTitle($t); + $wt_report->addTitle($t); } elseif ($reportDescription) { - $pgvreport->addDescription($t); + $wt_report->addDescription($t); } return 0; } @@ -536,10 +536,10 @@ class PGVRElement { /** * Get the Class name type * - * @return string PGVRElementBase + * @return string ElementBase */ function get_type() { - return "PGVRElementBase"; + return "ElementBase"; } function setText($text) { @@ -547,7 +547,7 @@ class PGVRElement { return 0; } -} //-- END PGVRElement +} //-- END Element /** * HTML element class @@ -556,12 +556,12 @@ class PGVRElement { * @subpackage Reports * @todo add info */ -class PGVRHtml extends PGVRElement { +class Html extends Element { public $tag; public $attrs; public $elements = array(); - function PGVRHtml($tag, $attrs) { + function Html($tag, $attrs) { $this->tag = $tag; $this->attrs = $attrs; return 0; @@ -587,10 +587,10 @@ class PGVRHtml extends PGVRElement { /** * Get the class type - * @return string PGVRHtml + * @return string Html */ function get_type() { - return "PGVRHtml"; + return "Html"; } } @@ -600,7 +600,7 @@ class PGVRHtml extends PGVRElement { * @package webtrees * @subpackage Reports */ -class PGVRCell extends PGVRElement { +class Cell extends Element { /** * Allows to center or align the text. Possible values are:<ul><li>left or empty string: left align</li><li>center: center align</li><li>right: right align</li><li>justify: justification (default value when $ishtml=false)</li></ul> * @var string @@ -645,7 +645,7 @@ class PGVRCell extends PGVRElement { */ public $newline; /** - * The name of the PGVRStyle that should be used to render the text. + * The name of the Style that should be used to render the text. * @var string */ public $styleName; @@ -679,7 +679,7 @@ class PGVRCell extends PGVRElement { public $reseth; /** - * CELL - PGVRElement + * CELL - Element * * @param int $width cell width (expressed in points) * @param int $height cell height (expressed in points) @@ -695,7 +695,7 @@ class PGVRCell extends PGVRElement { * @param string $bocolor Border color * @param string $tcolor Text color */ - function PGVRCell($width, $height, $border, $align, $bgcolor, $style, $ln, $top, $left, $fill, $stretch, $bocolor, $tcolor, $reseth) { + function Cell($width, $height, $border, $align, $bgcolor, $style, $ln, $top, $left, $fill, $stretch, $bocolor, $tcolor, $reseth) { $this->align = $align; $this->border = $border; $this->bgcolor = $bgcolor; @@ -740,10 +740,10 @@ class PGVRCell extends PGVRElement { } /** * Get the class type - * @return string PGVRCell + * @return string Cell */ function get_type() { - return "PGVRCell"; + return "Cell"; } } @@ -754,7 +754,7 @@ class PGVRCell extends PGVRElement { * @subpackage Reports * @todo add info */ -class PGVRTextBox extends PGVRElement { +class TextBox extends Element { /** * Array of elements in the TextBox * @var array @@ -843,7 +843,7 @@ class PGVRTextBox extends PGVRElement { public $reseth; /** - * TextBox - PGVRElement - Base + * TextBox - Element - Base * * @param float $width Text box width * @param float $height Text box height @@ -858,7 +858,7 @@ class PGVRTextBox extends PGVRElement { * @param boolean $padding * @param boolean $reseth */ - function PGVRTextBox($width, $height, $border, $bgcolor, $newline, $left, $top, $pagecheck, $style, $fill, $padding, $reseth) { + function TextBox($width, $height, $border, $bgcolor, $newline, $left, $top, $pagecheck, $style, $fill, $padding, $reseth) { $this->border = $border; $this->bgcolor = $bgcolor; $this->fill= $fill; @@ -885,10 +885,10 @@ class PGVRTextBox extends PGVRElement { /** * Get the class type - * @return string PGVRTextBox + * @return string TextBox */ function get_type() { - return "PGVRTextBox"; + return "TextBox"; } } @@ -899,7 +899,7 @@ class PGVRTextBox extends PGVRElement { * @subpackage Reports * @todo add info */ -class PGVRText extends PGVRElement { +class Text extends Element { /** * Text color in HTML code * @var string @@ -927,7 +927,7 @@ class PGVRText extends PGVRElement { * @param string $style The name of the text style * @param string $color HTML color code */ - function PGVRText($style, $color) { + function Text($style, $color) { $this->text = ""; $this->color = $color; $this->wrapWidthRemaining = 0; @@ -951,10 +951,10 @@ class PGVRText extends PGVRElement { /** * Get the class type - * @return string PGVRText + * @return string Text */ function get_type() { - return "PGVRText"; + return "Text"; } } @@ -965,7 +965,7 @@ class PGVRText extends PGVRElement { * @subpackage Reports * @todo add info */ -class PGVRFootnote extends PGVRElement { +class Footnote extends Element { /** * The name of the style for this element * @var string @@ -993,7 +993,7 @@ class PGVRFootnote extends PGVRElement { public $wrapWidthCell; public $addlink; - function PGVRFootnote($style="") { + function Footnote($style="") { $this->text = ""; if (!empty($style)) { $this->styleName = $style; @@ -1049,10 +1049,10 @@ class PGVRFootnote extends PGVRElement { /** * Get the class type - * @return string PGVRFootnote + * @return string Footnote */ function get_type() { - return "PGVRFootnote"; + return "Footnote"; } } @@ -1063,21 +1063,21 @@ class PGVRFootnote extends PGVRElement { * @subpackage Reports * @todo add info */ -class PGVRPageHeader extends PGVRElement { +class PageHeader extends Element { public $elements = array(); - function PGVRTextBox() { + function TextBox() { $this->elements = array(); return 0; } - function PGVRPageHeader() { + function PageHeader() { $this->elements = array(); return 0; } /** - * Add element - PGVRPageHeader + * Add element - PageHeader * @param $element */ function addElement($element) { @@ -1087,10 +1087,10 @@ class PGVRPageHeader extends PGVRElement { /** * Get the class type - * @return string PGVRPageHeader + * @return string PageHeader */ function get_type() { - return "PGVRPageHeader"; + return "PageHeader"; } } @@ -1101,7 +1101,7 @@ class PGVRPageHeader extends PGVRElement { * @subpackage Reports * @todo add info */ -class PGVRImage extends PGVRElement { +class Image extends Element { /** * File name of the image * @var string @@ -1139,7 +1139,7 @@ class PGVRImage extends PGVRElement { public $line = ""; /** - * PGVRImage class function - Base + * Image class function - Base * * @param string $file File name of the image * @param float $x X-position (left) of the image @@ -1149,7 +1149,7 @@ class PGVRImage extends PGVRElement { * @param string $align Placement of the image. L: left, C:center, R:right * @param string $ln T:same line, N:next line */ - function PGVRImage($file, $x, $y, $w, $h, $align, $ln) { + function Image($file, $x, $y, $w, $h, $align, $ln) { $this->file = $file; $this->width = $w; $this->height = $h; @@ -1170,10 +1170,10 @@ class PGVRImage extends PGVRElement { /** * Get the class type - * @return string PGVRImage + * @return string Image */ function get_type() { - return "PGVRImage"; + return "Image"; } } @@ -1184,7 +1184,7 @@ class PGVRImage extends PGVRElement { * @subpackage Reports * @todo add info */ -class PGVRLine extends PGVRElement { +class Line extends Element { /** * Start horizontal position, current position (default) * @var mixed @@ -1213,7 +1213,7 @@ class PGVRLine extends PGVRElement { * @param mixed $x2 * @param mixed $y2 */ - function PGVRLine($x1, $y1, $x2, $y2) { + function Line($x1, $y1, $x2, $y2) { $this->x1 = $x1; $this->y1 = $y1; $this->x2 = $x2; @@ -1231,10 +1231,10 @@ class PGVRLine extends PGVRElement { /** * Get the class type - * @return string PGVRLine + * @return string Line */ function get_type() { - return "PGVRLine"; + return "Line"; } } @@ -1246,57 +1246,57 @@ class PGVRLine extends PGVRElement { */ $elementHandler = array(); $elementHandler["br"]["start"] = "brSHandler"; -$elementHandler["PGVRBody"]["start"] = "PGVRBodySHandler"; -$elementHandler["PGVRCell"]["end"] = "PGVRCellEHandler"; -$elementHandler["PGVRCell"]["start"] = "PGVRCellSHandler"; -$elementHandler["PGVRDescription"]["end"] = "PGVRDescriptionEHandler"; -$elementHandler["PGVRDescription"]["start"] = "PGVRDescriptionSHandler"; -$elementHandler["PGVRDoc"]["end"] = "PGVRDocEHandler"; -$elementHandler["PGVRDoc"]["start"] = "PGVRDocSHandler"; -$elementHandler["PGVReport"]["end"] = ""; -$elementHandler["PGVReport"]["start"] = ""; -$elementHandler["PGVRFacts"]["end"] = "PGVRFactsEHandler"; -$elementHandler["PGVRFacts"]["start"] = "PGVRFactsSHandler"; -$elementHandler["PGVRFooter"]["start"] = "PGVRFooterSHandler"; -$elementHandler["PGVRFootnote"]["end"] = "PGVRFootnoteEHandler"; -$elementHandler["PGVRFootnote"]["start"] = "PGVRFootnoteSHandler"; -$elementHandler["PGVRFootnoteTexts"]["start"] = "PGVRFootnoteTextsSHandler"; -$elementHandler["PGVRGedcom"]["end"] = "PGVRGedcomEHandler"; -$elementHandler["PGVRGedcom"]["start"] = "PGVRGedcomSHandler"; -$elementHandler["PGVRGedcomValue"]["start"] = "PGVRGedcomValueSHandler"; -$elementHandler["PGVRGeneration"]["start"] = "PGVRGenerationSHandler"; -$elementHandler["PGVRGetPersonName"]["start"] = "PGVRGetPersonNameSHandler"; -$elementHandler["PGVRHeader"]["start"] = "PGVRHeaderSHandler"; -$elementHandler["PGVRHighlightedImage"]["start"]= "PGVRHighlightedImageSHandler"; -$elementHandler["PGVRif"]["end"] = "PGVRifEHandler"; -$elementHandler["PGVRif"]["start"] = "PGVRifSHandler"; -$elementHandler["PGVRImage"]["start"] = "PGVRImageSHandler"; -$elementHandler["PGVRInput"]["end"] = ""; -$elementHandler["PGVRInput"]["start"] = ""; -$elementHandler["PGVRLine"]["start"] = "PGVRLineSHandler"; -$elementHandler["PGVRList"]["end"] = "PGVRListEHandler"; -$elementHandler["PGVRList"]["start"] = "PGVRListSHandler"; -$elementHandler["PGVRListTotal"]["start"] = "PGVRListTotalSHandler"; -$elementHandler["PGVRNewPage"]["start"] = "PGVRNewPageSHandler"; -$elementHandler["PGVRNow"]["start"] = "PGVRNowSHandler"; -$elementHandler["PGVRPageHeader"]["end"] = "PGVRPageHeaderEHandler"; -$elementHandler["PGVRPageHeader"]["start"] = "PGVRPageHeaderSHandler"; -$elementHandler["PGVRPageNum"]["start"] = "PGVRPageNumSHandler"; -$elementHandler["PGVRRelatives"]["end"] = "PGVRRelativesEHandler"; -$elementHandler["PGVRRelatives"]["start"] = "PGVRRelativesSHandler"; -$elementHandler["PGVRRepeatTag"]["end"] = "PGVRRepeatTagEHandler"; -$elementHandler["PGVRRepeatTag"]["start"] = "PGVRRepeatTagSHandler"; -$elementHandler["PGVRSetVar"]["start"] = "PGVRSetVarSHandler"; -$elementHandler["PGVRStyle"]["start"] = "PGVRStyleSHandler"; -$elementHandler["PGVRText"]["end"] = "PGVRTextEHandler"; -$elementHandler["PGVRText"]["start"] = "PGVRTextSHandler"; -$elementHandler["PGVRTextBox"]["end"] = "PGVRTextBoxEHandler"; -$elementHandler["PGVRTextBox"]["start"] = "PGVRTextBoxSHandler"; -$elementHandler["PGVRTitle"]["end"] = "PGVRTitleEHandler"; -$elementHandler["PGVRTitle"]["start"] = "PGVRTitleSHandler"; -$elementHandler["PGVRTotalPages"]["start"] = "PGVRTotalPagesSHandler"; -$elementHandler["PGVRvar"]["start"] = "PGVRvarSHandler"; -$elementHandler["PGVRvarLetter"]["start"] = "PGVRvarLetterSHandler"; +$elementHandler["Body"]["start"] = "BodySHandler"; +$elementHandler["Cell"]["end"] = "CellEHandler"; +$elementHandler["Cell"]["start"] = "CellSHandler"; +$elementHandler["Description"]["end"] = "DescriptionEHandler"; +$elementHandler["Description"]["start"] = "DescriptionSHandler"; +$elementHandler["Doc"]["end"] = "DocEHandler"; +$elementHandler["Doc"]["start"] = "DocSHandler"; +$elementHandler["Report"]["end"] = ""; +$elementHandler["Report"]["start"] = ""; +$elementHandler["Facts"]["end"] = "FactsEHandler"; +$elementHandler["Facts"]["start"] = "FactsSHandler"; +$elementHandler["Footer"]["start"] = "FooterSHandler"; +$elementHandler["Footnote"]["end"] = "FootnoteEHandler"; +$elementHandler["Footnote"]["start"] = "FootnoteSHandler"; +$elementHandler["FootnoteTexts"]["start"] = "FootnoteTextsSHandler"; +$elementHandler["Gedcom"]["end"] = "GedcomEHandler"; +$elementHandler["Gedcom"]["start"] = "GedcomSHandler"; +$elementHandler["GedcomValue"]["start"] = "GedcomValueSHandler"; +$elementHandler["Generation"]["start"] = "GenerationSHandler"; +$elementHandler["GetPersonName"]["start"] = "GetPersonNameSHandler"; +$elementHandler["Header"]["start"] = "HeaderSHandler"; +$elementHandler["HighlightedImage"]["start"]= "HighlightedImageSHandler"; +$elementHandler["if"]["end"] = "ifEHandler"; +$elementHandler["if"]["start"] = "ifSHandler"; +$elementHandler["Image"]["start"] = "ImageSHandler"; +$elementHandler["Input"]["end"] = ""; +$elementHandler["Input"]["start"] = ""; +$elementHandler["Line"]["start"] = "LineSHandler"; +$elementHandler["List"]["end"] = "ListEHandler"; +$elementHandler["List"]["start"] = "ListSHandler"; +$elementHandler["ListTotal"]["start"] = "ListTotalSHandler"; +$elementHandler["NewPage"]["start"] = "NewPageSHandler"; +$elementHandler["Now"]["start"] = "NowSHandler"; +$elementHandler["PageHeader"]["end"] = "PageHeaderEHandler"; +$elementHandler["PageHeader"]["start"] = "PageHeaderSHandler"; +$elementHandler["PageNum"]["start"] = "PageNumSHandler"; +$elementHandler["Relatives"]["end"] = "RelativesEHandler"; +$elementHandler["Relatives"]["start"] = "RelativesSHandler"; +$elementHandler["RepeatTag"]["end"] = "RepeatTagEHandler"; +$elementHandler["RepeatTag"]["start"] = "RepeatTagSHandler"; +$elementHandler["SetVar"]["start"] = "SetVarSHandler"; +$elementHandler["Style"]["start"] = "StyleSHandler"; +$elementHandler["Text"]["end"] = "TextEHandler"; +$elementHandler["Text"]["start"] = "TextSHandler"; +$elementHandler["TextBox"]["end"] = "TextBoxEHandler"; +$elementHandler["TextBox"]["start"] = "TextBoxSHandler"; +$elementHandler["Title"]["end"] = "TitleEHandler"; +$elementHandler["Title"]["start"] = "TitleSHandler"; +$elementHandler["TotalPages"]["start"] = "TotalPagesSHandler"; +$elementHandler["var"]["start"] = "varSHandler"; +$elementHandler["varLetter"]["start"] = "varLetterSHandler"; $elementHandler["sp"]["start"] = "spSHandler"; /** @@ -1304,7 +1304,7 @@ $elementHandler["sp"]["start"] = "spSHandler"; * * @global object $currentElement */ -$currentElement = new PGVRElement(); +$currentElement = new Element(); /** * Should character data be printed @@ -1341,9 +1341,9 @@ $printDataStack = array(); /** * @todo add info -* @global array $pgvreportStack +* @global array $wt_reportStack */ -$pgvreportStack = array(); +$wt_reportStack = array(); /** * @todo add info @@ -1438,7 +1438,7 @@ function startElement($parser, $name, $attrs) { $newattrs[$key] = $value; } $attrs = $newattrs; - if (($processFootnote)&&($processIfs==0 || $name=="PGVRif")&&($processGedcoms==0 || $name=="PGVRGedcom")&&($processRepeats==0 || $name=="PGVRFacts" || $name=="PGVRRepeatTag")) { + if (($processFootnote)&&($processIfs==0 || $name=="if")&&($processGedcoms==0 || $name=="Gedcom")&&($processRepeats==0 || $name=="Facts" || $name=="RepeatTag")) { if (isset($elementHandler[$name]["start"])) { if ($elementHandler[$name]["start"] != "") { call_user_func($elementHandler[$name]["start"], $attrs); @@ -1463,7 +1463,7 @@ function endElement($parser, $name) { global $elementHandler, $processIfs, $processGedcoms, $processRepeats; global $processFootnote; - if (($processFootnote || $name=="PGVRFootnote")&&($processIfs==0 || $name=="PGVRif")&&($processGedcoms==0 || $name=="PGVRGedcom")&&($processRepeats==0 || $name=="PGVRFacts" || $name=="PGVRRepeatTag" || $name=="PGVRList" || $name=="PGVRRelatives")) { + if (($processFootnote || $name=="Footnote")&&($processIfs==0 || $name=="if")&&($processGedcoms==0 || $name=="Gedcom")&&($processRepeats==0 || $name=="Facts" || $name=="RepeatTag" || $name=="List" || $name=="Relatives")) { if (isset($elementHandler[$name]["end"])) { if ($elementHandler[$name]["end"]!="") { call_user_func($elementHandler[$name]["end"]); @@ -1484,32 +1484,32 @@ function endElement($parser, $name) { * @todo check this */ function characterData($parser, $data) { - global $printData, $currentElement, $processGedcoms, $processIfs, $processRepeats, $reportTitle, $pgvreport, $reportDescription; + global $printData, $currentElement, $processGedcoms, $processIfs, $processRepeats, $reportTitle, $wt_report, $reportDescription; // global $processFootnote; if ($printData && ($processGedcoms==0) && ($processIfs==0)&&($processRepeats==0)) { $currentElement->addText($data); } elseif ($reportTitle) { - $pgvreport->addTitle($data); + $wt_report->addTitle($data); } elseif ($reportDescription) { - $pgvreport->addDescription($data); + $wt_report->addDescription($data); } } /** -* XML <PGVRStyleSHandler /> elemnt handler +* XML <StyleSHandler /> elemnt handler * * @param array $attrs an array of key value pairs for the attributes -* @see PGVReportBase::$defaultFont -* @see PGVReportBase::$defaultFontSize -* @see PGVReportBase::addStyle() +* @see ReportBase::$defaultFont +* @see ReportBase::$defaultFontSize +* @see ReportBase::addStyle() * @todo add info - update wiki */ -function PGVRStyleSHandler($attrs) { - global $pgvreport; +function StyleSHandler($attrs) { + global $wt_report; if (empty($attrs["name"])) { - die("<strong>REPORT ERROR PGVRStyle: </strong> The \"name\" of the style is missing or not set in the XML file."); + die("<strong>REPORT ERROR Style: </strong> The \"name\" of the style is missing or not set in the XML file."); } // array Style that will be passed on @@ -1519,181 +1519,181 @@ function PGVRStyleSHandler($attrs) { $s["name"] = $attrs["name"]; // string Name of the DEFAULT font - $s["font"] = $pgvreport->defaultFont; + $s["font"] = $wt_report->defaultFont; if (!empty($attrs["font"])) $s["font"] = $attrs["font"]; // int The size of the font in points - $s["size"] = $pgvreport->defaultFontSize; + $s["size"] = $wt_report->defaultFontSize; if (!empty($attrs["size"])) $s["size"] = (int)$attrs["size"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) // string B: bold, I: italic, U: underline, D: line trough, The default value is regular. $s["style"] = ""; if (!empty($attrs["style"])) $s["style"] = $attrs["style"]; - $pgvreport->addStyle($s); + $wt_report->addStyle($s); } /** -* XML <PGVRDoc> start elemnt handler +* XML <Doc> start elemnt handler * * Sets up the basics of the document proparties * @param array $attrs an array of key value pairs for the attributes -* @see PGVRDocEHandler() -* @see PGVReportBase::setup() +* @see DocEHandler() +* @see ReportBase::setup() * @todo add showGeneratedBy, height, width param to wiki and update the defaults */ -function PGVRDocSHandler($attrs) { - global $parser, $xml_parser, $pgvreport; +function DocSHandler($attrs) { + global $parser, $xml_parser, $wt_report; $parser = $xml_parser; // Custom page width - if (!empty($attrs["customwidth"])) $pgvreport->pagew = (int)$attrs["customwidth"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) + if (!empty($attrs["customwidth"])) $wt_report->pagew = (int)$attrs["customwidth"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) // Custom Page height - if (!empty($attrs["customheight"])) $pgvreport->pageh = (int)$attrs["customheight"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) + if (!empty($attrs["customheight"])) $wt_report->pageh = (int)$attrs["customheight"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) // Left Margin if (isset($attrs["leftmargin"])) { - if ($attrs["leftmargin"] === "0") $pgvreport->leftmargin = 0; + if ($attrs["leftmargin"] === "0") $wt_report->leftmargin = 0; elseif (!empty($attrs["leftmargin"])) { - $pgvreport->leftmargin = (int)$attrs["leftmargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) + $wt_report->leftmargin = (int)$attrs["leftmargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) } } // Right Margin if (isset($attrs["rightmargin"])) { - if ($attrs["rightmargin"] === "0") $pgvreport->rightmargin = 0; + if ($attrs["rightmargin"] === "0") $wt_report->rightmargin = 0; elseif (!empty($attrs["rightmargin"])) { - $pgvreport->rightmargin = (int)$attrs["rightmargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) + $wt_report->rightmargin = (int)$attrs["rightmargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) } } // Top Margin if (isset($attrs["topmargin"])) { - if ($attrs["topmargin"] === "0") $pgvreport->topmargin = 0; + if ($attrs["topmargin"] === "0") $wt_report->topmargin = 0; elseif (!empty($attrs["topmargin"])) { - $pgvreport->topmargin = (int)$attrs["topmargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) + $wt_report->topmargin = (int)$attrs["topmargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) } } // Bottom Margin if (isset($attrs["bottommargin"])) { - if ($attrs["bottommargin"] === "0") $pgvreport->bottommargin = 0; + if ($attrs["bottommargin"] === "0") $wt_report->bottommargin = 0; elseif (!empty($attrs["bottommargin"])) { - $pgvreport->bottommargin = (int)$attrs["bottommargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) + $wt_report->bottommargin = (int)$attrs["bottommargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) } } // Header Margin if (isset($attrs["headermargin"])) { - if ($attrs["headermargin"] === "0") $pgvreport->headermargin = 0; + if ($attrs["headermargin"] === "0") $wt_report->headermargin = 0; elseif (!empty($attrs["headermargin"])) { - $pgvreport->headermargin = (int)$attrs["headermargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) + $wt_report->headermargin = (int)$attrs["headermargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) } } // Footer Margin if (isset($attrs["footermargin"])) { - if ($attrs["footermargin"] === "0") $pgvreport->footermargin = 0; + if ($attrs["footermargin"] === "0") $wt_report->footermargin = 0; elseif (!empty($attrs["footermargin"])) { - $pgvreport->footermargin = (int)$attrs["footermargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) + $wt_report->footermargin = (int)$attrs["footermargin"]; // Get it as int to ignore all decimal points or text (if any text then int(0)) } } // Page Orientation if (!empty($attrs["orientation"])) { - if ($attrs["orientation"] == "landscape") $pgvreport->orientation = "landscape"; + if ($attrs["orientation"] == "landscape") $wt_report->orientation = "landscape"; elseif ($attrs["orientation"] == "portrait") { - $pgvreport->orientation = "portrait"; + $wt_report->orientation = "portrait"; } } // Page Size - if (!empty($attrs["pageSize"])) $pgvreport->pageFormat = strtoupper($attrs["pageSize"]); + if (!empty($attrs["pageSize"])) $wt_report->pageFormat = strtoupper($attrs["pageSize"]); // Show Generated By... if (isset($attrs["showGeneratedBy"])) { - if ($attrs["showGeneratedBy"] === "0") $pgvreport->showGenText = false; + if ($attrs["showGeneratedBy"] === "0") $wt_report->showGenText = false; elseif ($attrs["showGeneratedBy"] === "1") { - $pgvreport->showGenText = true; + $wt_report->showGenText = true; } } - $pgvreport->setup(); + $wt_report->setup(); } /** -* XML </PGVRDoc> end elemnt handler +* XML </Doc> end elemnt handler * -* @see PGVRDocSHandler() +* @see DocSHandler() */ -function PGVRDocEHandler() { - global $pgvreport; - $pgvreport->run(); +function DocEHandler() { + global $wt_report; + $wt_report->run(); } /** -* XML <PGVRHeader> start elemnt handler +* XML <Header> start elemnt handler * -* @see PGVReportBase::setProcessing() +* @see ReportBase::setProcessing() */ -function PGVRHeaderSHandler() { - global $pgvreport; +function HeaderSHandler() { + global $wt_report; // Clear the Header before any new elements are added - $pgvreport->clearHeader(); - $pgvreport->setProcessing("H"); + $wt_report->clearHeader(); + $wt_report->setProcessing("H"); } /** -* XML <PGVRPageHeader> start elemnt handler +* XML <PageHeader> start elemnt handler * * @param array $attrs an array of key value pairs for the attributes -* @see PGVRPageHeaderEHandler() +* @see PageHeaderEHandler() */ -function PGVRPageHeaderSHandler($attrs) { - global $printDataStack, $printData, $pgvreportStack, $pgvreport, $PGVReportRoot; +function PageHeaderSHandler($attrs) { + global $printDataStack, $printData, $wt_reportStack, $wt_report, $ReportRoot; array_push($printDataStack, $printData); $printData = false; - array_push($pgvreportStack, $pgvreport); - $pgvreport = $PGVReportRoot->createPageHeader(); + array_push($wt_reportStack, $wt_report); + $wt_report = $ReportRoot->createPageHeader(); } /** -* XML <PGVRPageHeaderEHandler> end elemnt handler +* XML <PageHeaderEHandler> end elemnt handler * -* @see PGVRPageHeaderSHandler() +* @see PageHeaderSHandler() */ -function PGVRPageHeaderEHandler() { - global $printData, $printDataStack, $pgvreport, $currentElement, $pgvreportStack; +function PageHeaderEHandler() { + global $printData, $printDataStack, $wt_report, $currentElement, $wt_reportStack; $printData = array_pop($printDataStack); - $currentElement = $pgvreport; - $pgvreport = array_pop($pgvreportStack); - $pgvreport->addElement($currentElement); + $currentElement = $wt_report; + $wt_report = array_pop($wt_reportStack); + $wt_report->addElement($currentElement); } /** -* XML <PGVRBodySHandler> start elemnt handler +* XML <BodySHandler> start elemnt handler */ -function PGVRBodySHandler() { - global $pgvreport; - $pgvreport->setProcessing("B"); +function BodySHandler() { + global $wt_report; + $wt_report->setProcessing("B"); } /** -* XML <PGVRFooterSHandler> start elemnt handler +* XML <FooterSHandler> start elemnt handler */ -function PGVRFooterSHandler() { - global $pgvreport; - $pgvreport->setProcessing("F"); +function FooterSHandler() { + global $wt_report; + $wt_report->setProcessing("F"); } /** -* XML <PGVRCell> start elemnt handler +* XML <Cell> start elemnt handler * * @param array $attrs an array of key value pairs for the attributes -* @see PGVRCellEHandler() -* @see PGVRCell +* @see CellEHandler() +* @see Cell * @todo defaults to wiki */ -function PGVRCellSHandler($attrs) { - global $printData, $printDataStack, $currentElement, $PGVReportRoot, $pgvreport; +function CellSHandler($attrs) { + global $printData, $printDataStack, $currentElement, $ReportRoot, $wt_report; // string The text alignment of the text in this box. $align= ""; @@ -1701,13 +1701,13 @@ function PGVRCellSHandler($attrs) { $align = $attrs["align"]; // RTL supported left/right alignment if ($align == "rightrtl") { - if ($pgvreport->rtl) { + if ($wt_report->rtl) { $align = "left"; } else { $align = "right"; } } elseif ($align == "leftrtl") { - if ($pgvreport->rtl) { + if ($wt_report->rtl) { $align = "right"; } else { $align = "left"; @@ -1782,7 +1782,7 @@ function PGVRCellSHandler($attrs) { } } - // string The name of the PGVRStyle that should be used to render the text. + // string The name of the Style that should be used to render the text. $style = ""; if (!empty($attrs["style"])) $style = $attrs["style"]; @@ -1813,29 +1813,29 @@ function PGVRCellSHandler($attrs) { array_push($printDataStack, $printData); $printData = true; - $currentElement = $PGVReportRoot->createCell($width, $height, $border, $align, $bgcolor, $style, $ln, $top, $left, $fill, $stretch, $bocolor, $tcolor, $reseth); + $currentElement = $ReportRoot->createCell($width, $height, $border, $align, $bgcolor, $style, $ln, $top, $left, $fill, $stretch, $bocolor, $tcolor, $reseth); } /** -* XML </PGVRCell> end elemnt handler +* XML </Cell> end elemnt handler * -* @see PGVRCellSHandler() +* @see CellSHandler() * @final */ -function PGVRCellEHandler() { - global $printData, $printDataStack, $currentElement, $pgvreport; +function CellEHandler() { + global $printData, $printDataStack, $currentElement, $wt_report; $printData = array_pop($printDataStack); - $pgvreport->addElement($currentElement); + $wt_report->addElement($currentElement); } /** -* XML <PGVRNow /> elemnt handler +* XML <Now /> elemnt handler * -* @see PGVRElement::addText() +* @see Element::addText() * @final */ -function PGVRNowSHandler() { +function NowSHandler() { global $currentElement; $g = timestamp_to_gedcom_date(client_time()); @@ -1843,33 +1843,33 @@ function PGVRNowSHandler() { } /** -* XML <PGVRPageNum /> elemnt handler +* XML <PageNum /> elemnt handler * -* @see PGVRElement::addText() +* @see Element::addText() * @final */ -function PGVRPageNumSHandler() { +function PageNumSHandler() { global $currentElement; $currentElement->addText("#PAGENUM#"); } /** -* XML <PGVRTotalPages /> elemnt handler +* XML <TotalPages /> elemnt handler * -* @see PGVRElement::addText() +* @see Element::addText() * @final */ -function PGVRTotalPagesSHandler() { +function TotalPagesSHandler() { global $currentElement; $currentElement->addText("{{nb}}"); } /** -* @see PGVRGedcomEHandler() +* @see GedcomEHandler() * @todo add info * @param array $attrs an array of key value pairs for the attributes */ -function PGVRGedcomSHandler($attrs) { +function GedcomSHandler($attrs) { global $vars, $gedrec, $gedrecStack, $processGedcoms, $fact, $desc, $ged_level; if ($processGedcoms>0) { @@ -1938,10 +1938,10 @@ function PGVRGedcomSHandler($attrs) { } /** -* @see PGVRGedcomSHandler() +* @see GedcomSHandler() * @todo add info */ -function PGVRGedcomEHandler() { +function GedcomEHandler() { global $gedrec, $gedrecStack, $processGedcoms, $fact, $desc; if ($processGedcoms>0) { @@ -1955,14 +1955,14 @@ function PGVRGedcomEHandler() { } /** -* XML <PGVRTextBoxSHandler> start elemnt handler +* XML <TextBoxSHandler> start elemnt handler * * @param array $attrs an array of key value pairs for the attributes -* @see PGVRTextBoxEHandler() +* @see TextBoxEHandler() * @todo defaults to wiki */ -function PGVRTextBoxSHandler($attrs) { - global $printData, $printDataStack, $pgvreport, $currentElement, $pgvreportStack, $PGVReportRoot; +function TextBoxSHandler($attrs) { + global $printData, $printDataStack, $wt_report, $currentElement, $wt_reportStack, $ReportRoot; // string Background color code $bgcolor = ""; @@ -2074,37 +2074,37 @@ function PGVRTextBoxSHandler($attrs) { array_push($printDataStack, $printData); $printData = false; - array_push($pgvreportStack, $pgvreport); - $pgvreport = $PGVReportRoot->createTextBox($width, $height, $border, $bgcolor, $newline, $left, $top, $pagecheck, $style, $fill, $padding, $reseth); + array_push($wt_reportStack, $wt_report); + $wt_report = $ReportRoot->createTextBox($width, $height, $border, $bgcolor, $newline, $left, $top, $pagecheck, $style, $fill, $padding, $reseth); } /** -* XML <PGVRTextBoxEHandler> end elemnt handler +* XML <TextBoxEHandler> end elemnt handler * -* @see PGVRTextBoxSHandler() +* @see TextBoxSHandler() */ -function PGVRTextBoxEHandler() { - global $printData, $printDataStack, $pgvreport, $currentElement, $pgvreportStack; +function TextBoxEHandler() { + global $printData, $printDataStack, $wt_report, $currentElement, $wt_reportStack; $printData = array_pop($printDataStack); - $currentElement = $pgvreport; - $pgvreport = array_pop($pgvreportStack); - $pgvreport->addElement($currentElement); + $currentElement = $wt_report; + $wt_report = array_pop($wt_reportStack); + $wt_report->addElement($currentElement); } /** -* @see PGVRTextEHandler() +* @see TextEHandler() * @todo add info to wiki about "color" -* @todo more variables in PGVRText class, check it out +* @todo more variables in Text class, check it out * @param array $attrs an array of key value pairs for the attributes */ -function PGVRTextSHandler($attrs) { - global $printData, $printDataStack, $currentElement, $PGVReportRoot; +function TextSHandler($attrs) { + global $printData, $printDataStack, $currentElement, $ReportRoot; array_push($printDataStack, $printData); $printData = true; - // string The name of the PGVRStyle that should be used to render the text. + // string The name of the Style that should be used to render the text. $style = ""; if (!empty($attrs["style"])) $style = $attrs["style"]; @@ -2112,28 +2112,28 @@ function PGVRTextSHandler($attrs) { $color = ""; if (!empty($attrs["color"])) $color = $attrs["color"]; - $currentElement = $PGVReportRoot->createText($style, $color); + $currentElement = $ReportRoot->createText($style, $color); } /** -* @see PGVRTextSHandler() +* @see TextSHandler() */ -function PGVRTextEHandler() { - global $printData, $printDataStack, $pgvreport, $currentElement; +function TextEHandler() { + global $printData, $printDataStack, $wt_report, $currentElement; $printData = array_pop($printDataStack); - $pgvreport->addElement($currentElement); + $wt_report->addElement($currentElement); } /** -* XML <PGVRGetPersonName> start elemnt handler +* XML <GetPersonName> start elemnt handler * Get the name * 1. id is empty - current GEDCOM record * 2. id is set with a record id * * @param array $attrs an array of key value pairs for the attributes */ -function PGVRGetPersonNameSHandler($attrs) { +function GetPersonNameSHandler($attrs) { // @deprecated global $currentElement, $vars, $gedrec; @@ -2208,11 +2208,11 @@ function PGVRGetPersonNameSHandler($attrs) { } /** -* XML <PGVRGedcomValue> start elemnt handler +* XML <GedcomValue> start elemnt handler * * @param array $attrs an array of key value pairs for the attributes */ -function PGVRGedcomValueSHandler($attrs) { +function GedcomValueSHandler($attrs) { // @deprecated global $currentElement, $gedrec, $fact, $desc; @@ -2284,12 +2284,12 @@ function PGVRGedcomValueSHandler($attrs) { } /** -* XML <PGVRRepeatTag> start elemnt handler +* XML <RepeatTag> start elemnt handler * -* @see PGVRRepeatTagEHandler() +* @see RepeatTagEHandler() * @param array $attrs an array of key value pairs for the attributes */ -function PGVRRepeatTagSHandler($attrs) { +function RepeatTagSHandler($attrs) { // @deprecated // global $repeats, $repeatsStack, $gedrec, $repeatBytes, $parser, $parserStack, $processRepeats, $fact, $desc; global $repeats, $repeatsStack, $gedrec, $repeatBytes, $parser, $processRepeats, $fact, $desc; @@ -2370,11 +2370,11 @@ function PGVRRepeatTagSHandler($attrs) { } /** -* XML </ PGVRRepeatTag> end elemnt handler +* XML </ RepeatTag> end elemnt handler * -* @see PGVRRepeatTagSHandler() +* @see RepeatTagSHandler() */ -function PGVRRepeatTagEHandler() { +function RepeatTagEHandler() { global $processRepeats, $repeats, $repeatsStack, $repeatBytes; $processRepeats--; @@ -2394,7 +2394,7 @@ function PGVRRepeatTagEHandler() { } //-- read the xml from the file $lines = file($report); - while(strpos($lines[$lineoffset + $repeatBytes], "<PGVRRepeatTag")===false) { + while(strpos($lines[$lineoffset + $repeatBytes], "<RepeatTag")===false) { $lineoffset--; } $lineoffset++; @@ -2403,9 +2403,9 @@ function PGVRRepeatTagEHandler() { // RepeatTag Level counter $count = 1; while(0 < $count) { - if (strstr($lines[$line_nr], "<PGVRRepeatTag")!==false) { + if (strstr($lines[$line_nr], "<RepeatTag")!==false) { $count++; - } elseif (strstr($lines[$line_nr], "</PGVRRepeatTag")!==false) { + } elseif (strstr($lines[$line_nr], "</RepeatTag")!==false) { $count--; } if (0 < $count) { @@ -2435,7 +2435,7 @@ function PGVRRepeatTagEHandler() { //-- set the character data handler xml_set_character_data_handler($repeat_parser, "characterData"); if (!xml_parse($repeat_parser, $reportxml, true)) { - printf($reportxml."\nPGVRRepeatTagEHandler XML error: %s at line %d", xml_error_string(xml_get_error_code($repeat_parser)), xml_get_current_line_number($repeat_parser)); + printf($reportxml."\nRepeatTagEHandler XML error: %s at line %d", xml_error_string(xml_get_error_code($repeat_parser)), xml_get_current_line_number($repeat_parser)); print_r($repeatsStack); debug_print_backtrace(); exit; @@ -2463,26 +2463,26 @@ function PGVRRepeatTagEHandler() { * $ language_settings[] * * -* Or retrieve variables preset with <PGVRSetVar> element +* Or retrieve variables preset with <SetVar> element * * If the variable is a date and 'date="1"' attribute is set then the date will be reformated * from Sep to September * * @param array $attrs an array of key value pairs for the attributes -* @see PGVRSetVarSHandler() +* @see SetVarSHandler() */ -function PGVRvarSHandler($attrs) { +function varSHandler($attrs) { // @deprecated global $currentElement, $type, $parser; // Retrievable variables global $desc, $fact, $language_settings, $vars; if (empty($attrs["var"])) { - die("<strong>REPORT ERROR PGVRvar: </strong> The attribute \"var=\" is missing or not set in the XML file on line: ".xml_get_current_line_number($parser)); + die("<strong>REPORT ERROR var: </strong> The attribute \"var=\" is missing or not set in the XML file on line: ".xml_get_current_line_number($parser)); } $var = $attrs["var"]; - // PGVRSetVar element preset variables + // SetVar element preset variables if (!empty($vars[$var]["id"])) { $var = $vars[$var]["id"]; } else { @@ -2512,11 +2512,11 @@ function PGVRvarSHandler($attrs) { * * @param array $attrs an array of key value pairs for the attributes */ -function PGVRvarLetterSHandler($attrs) { +function varLetterSHandler($attrs) { global $currentElement, $fact, $desc; if (empty($attrs["var"])) { - die("<strong>REPORT ERROR PGVRvarLetter: </strong> The attribute \"var=\" is missing or not set in the XML file."); + die("<strong>REPORT ERROR varLetter: </strong> The attribute \"var=\" is missing or not set in the XML file."); } $var=$attrs["var"]; @@ -2531,9 +2531,9 @@ function PGVRvarLetterSHandler($attrs) { /** * @todo add info * @param array $attrs an array of key value pairs for the attributes -* @see PGVRFactsEHandler() +* @see FactsEHandler() */ -function PGVRFactsSHandler($attrs) { +function FactsSHandler($attrs) { // @deprecated // global $repeats, $repeatsStack, $gedrec, $parser, $parserStack, $repeatBytes, $processRepeats, $vars; global $repeats, $repeatsStack, $gedrec, $parser, $repeatBytes, $processRepeats, $vars; @@ -2611,11 +2611,11 @@ function PGVRFactsSHandler($attrs) { } /** -* XML </ PGVRFacts> end elemnt handler +* XML </ Facts> end elemnt handler * -* @see PGVRFactsSHandler() +* @see FactsSHandler() */ -function PGVRFactsEHandler() { +function FactsEHandler() { global $repeats, $repeatsStack, $repeatBytes, $parser, $parserStack, $report, $gedrec, $fact, $desc, $type, $processRepeats; $processRepeats--; @@ -2634,7 +2634,7 @@ function PGVRFactsEHandler() { //-- read the xml from the file $lines = file($report); - while(($lineoffset + $repeatBytes > 0) and (strpos($lines[$lineoffset + $repeatBytes], "<PGVRFacts ")) === false) { + while(($lineoffset + $repeatBytes > 0) and (strpos($lines[$lineoffset + $repeatBytes], "<Facts ")) === false) { $lineoffset--; } $lineoffset++; @@ -2681,7 +2681,7 @@ function PGVRFactsEHandler() { //-- set the character data handler xml_set_character_data_handler($repeat_parser, "characterData"); if (!xml_parse($repeat_parser, $reportxml, true)) { - die(sprintf($reportxml."\nPGVRFactsEHandler XML error: %s at line %d", xml_error_string(xml_get_error_code($repeat_parser)), xml_get_current_line_number($repeat_parser))); + die(sprintf($reportxml."\nFactsEHandler XML error: %s at line %d", xml_error_string(xml_get_error_code($repeat_parser)), xml_get_current_line_number($repeat_parser))); } xml_parser_free($repeat_parser); $i++; @@ -2700,11 +2700,11 @@ function PGVRFactsEHandler() { * The XML variable name and value is stored in the global variable $vars * @param array $attrs an array of key value pairs for the attributes */ -function PGVRSetVarSHandler($attrs) { +function SetVarSHandler($attrs) { global $vars, $gedrec, $fact, $desc, $type, $generation; if (empty($attrs["name"])) { - die("<strong>REPORT ERROR PGVRvar: </strong> The attribute \"name=\" is missing or not set in the XML file"); + die("<strong>REPORT ERROR var: </strong> The attribute \"name=\" is missing or not set in the XML file"); } $name = $attrs["name"]; @@ -2768,11 +2768,11 @@ function PGVRSetVarSHandler($attrs) { } /** -* XML <PGVRif > start element -* @see PGVRifEHandler() +* XML <if > start element +* @see ifEHandler() * @param array $attrs an array of key value pairs for the attributes */ -function PGVRifSHandler($attrs) { +function ifSHandler($attrs) { global $vars, $gedrec, $processIfs, $fact, $desc, $generation, $POSTAL_CODE; if ($processIfs>0) { @@ -2827,24 +2827,24 @@ function PGVRifSHandler($attrs) { } /** -* XML <PGVRif /> end element -* @see PGVRifSHandler() +* XML <if /> end element +* @see ifSHandler() */ -function PGVRifEHandler() { +function ifEHandler() { global $processIfs; if ($processIfs>0) $processIfs--; } /** -* XML <PGVRFootnote > start element +* XML <Footnote > start element * Collect the Footnote links * GEDCOM Records that are protected by Privacy setting will be ignore * * @param array $attrs an array of key value pairs for the attributes -* @see PGVRFootnoteEHandler() +* @see FootnoteEHandler() */ -function PGVRFootnoteSHandler($attrs) { - global $printData, $printDataStack, $currentElement, $footnoteElement, $processFootnote, $gedrec, $PGVReportRoot; +function FootnoteSHandler($attrs) { + global $printData, $printDataStack, $currentElement, $footnoteElement, $processFootnote, $gedrec, $ReportRoot; $match = array(); $id=""; @@ -2861,7 +2861,7 @@ function PGVRFootnoteSHandler($attrs) { $style=$attrs["style"]; } $footnoteElement = $currentElement; - $currentElement = $PGVReportRoot->createFootnote($style); + $currentElement = $ReportRoot->createFootnote($style); } else { $printData = false; $processFootnote = false; @@ -2869,21 +2869,21 @@ function PGVRFootnoteSHandler($attrs) { } /** -* XML <PGVRFootnote /> end element +* XML <Footnote /> end element * Print the collected Footnote data * -* @see PGVRFootnoteSHandler() +* @see FootnoteSHandler() */ -function PGVRFootnoteEHandler() { +function FootnoteEHandler() { // @deprecated -// global $printData, $printDataStack, $currentElement, $footnoteElement, $processFootnote, $gedrec, $pgvreport; - global $printData, $printDataStack, $currentElement, $footnoteElement, $processFootnote, $pgvreport; +// global $printData, $printDataStack, $currentElement, $footnoteElement, $processFootnote, $gedrec, $wt_report; + global $printData, $printDataStack, $currentElement, $footnoteElement, $processFootnote, $wt_report; if ($processFootnote) { $printData = array_pop($printDataStack); $temp = trim($currentElement->getValue()); if (strlen($temp)>3) { - $pgvreport->addElement($currentElement); + $wt_report->addElement($currentElement); } $currentElement = $footnoteElement; } else { @@ -2892,15 +2892,15 @@ function PGVRFootnoteEHandler() { } /** -* XML <PGVRFootnoteTexts /> element +* XML <FootnoteTexts /> element * * @param array $attrs an array of key value pairs for the attributes */ -function PGVRFootnoteTextsSHandler() { - global $pgvreport; +function FootnoteTextsSHandler() { + global $wt_report; $temp = "footnotetexts"; - $pgvreport->addElement($temp); + $wt_report->addElement($temp); } /** @@ -2926,8 +2926,8 @@ function spSHandler() { * @todo add info * @param array $attrs an array of key value pairs for the attributes */ -function PGVRHighlightedImageSHandler($attrs) { - global $gedrec, $pgvreport, $PGVReportRoot; +function HighlightedImageSHandler($attrs) { + global $gedrec, $wt_report, $ReportRoot; $id = ""; $match = array(); @@ -2988,8 +2988,8 @@ function PGVRHighlightedImageSHandler($attrs) { $width = $size[0]; $height = $size[1]; } - $image = $PGVReportRoot->createImage($media["file"], $left, $top, $width, $height, $align, $ln); - $pgvreport->addElement($image); + $image = $ReportRoot->createImage($media["file"], $left, $top, $width, $height, $align, $ln); + $wt_report->addElement($image); } } } @@ -3000,8 +3000,8 @@ function PGVRHighlightedImageSHandler($attrs) { * @todo add info * @param array $attrs an array of key value pairs for the attributes */ -function PGVRImageSHandler($attrs) { - global $gedrec, $pgvreport, $MEDIA_DIRECTORY, $PGVReportRoot; +function ImageSHandler($attrs) { + global $gedrec, $wt_report, $MEDIA_DIRECTORY, $ReportRoot; // mixed Position the top corner of this box on the page. the default is the current position $top = "."; @@ -3070,8 +3070,8 @@ function PGVRImageSHandler($attrs) { $width = $size[0]; $height = $size[1]; } - $image = $PGVReportRoot->createImage($filename, $left, $top, $width, $height, $align, $ln); - $pgvreport->addElement($image); + $image = $ReportRoot->createImage($filename, $left, $top, $width, $height, $align, $ln); + $wt_report->addElement($image); } } } @@ -3092,20 +3092,20 @@ function PGVRImageSHandler($attrs) { $width = $size[0]; $height = $size[1]; } - $image = $PGVReportRoot->createImage($filename, $left, $top, $width, $height, $align, $ln); - $pgvreport->addElement($image); + $image = $ReportRoot->createImage($filename, $left, $top, $width, $height, $align, $ln); + $wt_report->addElement($image); } } } } /** -* XML <PGVRLine> elemnt handler +* XML <Line> elemnt handler * * @param array $attrs an array of key value pairs for the attributes */ -function PGVRLineSHandler($attrs) { - global $pgvreport, $PGVReportRoot; +function LineSHandler($attrs) { + global $wt_report, $ReportRoot; // Start horizontal position, current position (default) $x1 = "."; @@ -3152,17 +3152,17 @@ function PGVRLineSHandler($attrs) { } } - $line = $PGVReportRoot->createLine($x1, $y1, $x2, $y2); - $pgvreport->addElement($line); + $line = $ReportRoot->createLine($x1, $y1, $x2, $y2); + $wt_report->addElement($line); } /** -* XML <PGVRList> start elemnt handler +* XML <List> start elemnt handler * -* @see PGVRListEHandler() +* @see ListEHandler() * @param array $attrs an array of key value pairs for the attributes */ -function PGVRListSHandler($attrs) { +function ListSHandler($attrs) { global $gedrec, $repeats, $repeatBytes, $list, $repeatsStack, $processRepeats, $parser, $vars, $sortby; global $GEDCOM, $TBLPREFIX; @@ -3492,10 +3492,10 @@ function PGVRListSHandler($attrs) { } /** -* XML <PGVRList> end elemnt handler -* @see PGVRListSHandler() +* XML <List> end elemnt handler +* @see ListSHandler() */ -function PGVRListEHandler() { +function ListEHandler() { global $list, $repeats, $repeatsStack, $repeatBytes, $parser, $parserStack, $report, $gedrec, $processRepeats, $list_total, $list_private; $processRepeats--; @@ -3513,7 +3513,7 @@ function PGVRListEHandler() { } //-- read the xml from the file $lines = file($report); - while((strpos($lines[$lineoffset + $repeatBytes], "<PGVRList")===false) && (($lineoffset + $repeatBytes) > 0)) { + while((strpos($lines[$lineoffset + $repeatBytes], "<List")===false) && (($lineoffset + $repeatBytes) > 0)) { $lineoffset--; } $lineoffset++; @@ -3522,9 +3522,9 @@ function PGVRListEHandler() { // List Level counter $count = 1; while(0 < $count) { - if (strpos($lines[$line_nr], "<PGVRList")!==false) { + if (strpos($lines[$line_nr], "<List")!==false) { $count++; - } elseif (strpos($lines[$line_nr], "</PGVRList")!==false) { + } elseif (strpos($lines[$line_nr], "</List")!==false) { $count--; } if (0 < $count) { @@ -3554,7 +3554,7 @@ function PGVRListEHandler() { //-- set the character data handler xml_set_character_data_handler($repeat_parser, "characterData"); if (!xml_parse($repeat_parser, $reportxml, true)) { - printf($reportxml."\nPGVRListEHandler XML error: %s at line %d", xml_error_string(xml_get_error_code($repeat_parser)), xml_get_current_line_number($repeat_parser)); + printf($reportxml."\nListEHandler XML error: %s at line %d", xml_error_string(xml_get_error_code($repeat_parser)), xml_get_current_line_number($repeat_parser)); print_r($repeatsStack); debug_print_backtrace(); exit; @@ -3574,14 +3574,14 @@ function PGVRListEHandler() { } /** -* XML <PGVRListTotal> elemnt handler +* XML <ListTotal> elemnt handler * * Prints the total number of records in a list * The total number is collected from -* PGVRList and PGVRRelatives +* List and Relatives * @param array $attrs an array of key value pairs for the attributes */ -function PGVRListTotalSHandler() { +function ListTotalSHandler() { global $list_total, $list_private, $currentElement; if (empty($list_total)) $list_total = 0; @@ -3596,9 +3596,9 @@ function PGVRListTotalSHandler() { /** * @todo add info * @param array $attrs an array of key value pairs for the attributes -* @see PGVRRelativesEHandler() +* @see RelativesEHandler() */ -function PGVRRelativesSHandler($attrs) { +function RelativesSHandler($attrs) { global $repeats, $repeatBytes, $list, $repeatsStack, $processRepeats, $parser, $vars, $sortby; $processRepeats++; @@ -3701,10 +3701,10 @@ function PGVRRelativesSHandler($attrs) { uasort($list, array("GedcomRecord", "CompareId")); break; case "BIRT:DATE": - uasort($list, array("PGVReportBase", "CompareBirthDate")); + uasort($list, array("ReportBase", "CompareBirthDate")); break; case "DEAT:DATE": - uasort($list, array("PGVReportBase", "CompareDeathDate")); + uasort($list, array("ReportBase", "CompareDeathDate")); break; case "generation": $newarray = array(); @@ -3730,11 +3730,11 @@ function PGVRRelativesSHandler($attrs) { } /** -* XML </ PGVRRelatives> end elemnt handler +* XML </ Relatives> end elemnt handler * -* @see PGVRRelativesSHandler() +* @see RelativesSHandler() */ -function PGVRRelativesEHandler() { +function RelativesEHandler() { global $list, $repeats, $repeatsStack, $repeatBytes, $parser, $parserStack, $report, $gedrec, $processRepeats, $list_total, $list_private, $generation; $processRepeats--; @@ -3753,7 +3753,7 @@ function PGVRRelativesEHandler() { } //-- read the xml from the file $lines = file($report); - while((strpos($lines[$lineoffset + $repeatBytes], "<PGVRRelatives")===false) && (($lineoffset + $repeatBytes) > 0)) { + while((strpos($lines[$lineoffset + $repeatBytes], "<Relatives")===false) && (($lineoffset + $repeatBytes) > 0)) { $lineoffset--; } $lineoffset++; @@ -3762,9 +3762,9 @@ function PGVRRelativesEHandler() { // Relatives Level counter $count = 1; while(0 < $count) { - if (strpos($lines[$line_nr], "<PGVRRelatives")!==false) { + if (strpos($lines[$line_nr], "<Relatives")!==false) { $count++; - } elseif (strpos($lines[$line_nr], "</PGVRRelatives")!==false) { + } elseif (strpos($lines[$line_nr], "</Relatives")!==false) { $count--; } if (0 < $count) { @@ -3801,7 +3801,7 @@ function PGVRRelativesEHandler() { xml_set_character_data_handler($repeat_parser, "characterData"); if (!xml_parse($repeat_parser, $reportxml, true)) { - printf($reportxml."\nPGVRRelativesEHandler XML error: %s at line %d", xml_error_string(xml_get_error_code($repeat_parser)), xml_get_current_line_number($repeat_parser)); + printf($reportxml."\nRelativesEHandler XML error: %s at line %d", xml_error_string(xml_get_error_code($repeat_parser)), xml_get_current_line_number($repeat_parser)); print_r($repeatsStack); debug_print_backtrace(); exit; @@ -3819,13 +3819,13 @@ function PGVRRelativesEHandler() { } /** -* XML <PGVRGeneration /> elemnt handler +* XML <Generation /> elemnt handler * * Prints the number of generations * @todo no info on wiki -* @see PGVRElement::addText() +* @see Element::addText() */ -function PGVRGenerationSHandler() { +function GenerationSHandler() { global $generation, $currentElement; if (empty($generation)) $generation = 1; @@ -3834,17 +3834,17 @@ function PGVRGenerationSHandler() { } /** -* XML <PGVRNewPage /> elemnt handler +* XML <NewPage /> elemnt handler * * Has to be placed in an element (header, pageheader, body or footer) * @final * @todo update wiki, this element is missing */ -function PGVRNewPageSHandler() { - global $pgvreport; +function NewPageSHandler() { + global $wt_report; $temp = "addpage"; - $pgvreport->addElement($temp); + $wt_report->addElement($temp); } /** @@ -3853,15 +3853,15 @@ function PGVRNewPageSHandler() { * @param array $attrs an array of key value pairs for the attributes * @param string $tag HTML tag name * @see HTMLEHandler() -* @see PGVReportBase::createHTML() +* @see ReportBase::createHTML() */ function HTMLSHandler($tag, $attrs) { - global $printData, $printDataStack, $pgvreportStack, $pgvreport, $currentElement, $PGVReportRoot; + global $printData, $printDataStack, $wt_reportStack, $wt_report, $currentElement, $ReportRoot; if ($tag=="tempdoc") return; - array_push($pgvreportStack, $pgvreport); - $pgvreport = $PGVReportRoot->createHTML($tag, $attrs); - $currentElement = $pgvreport; + array_push($wt_reportStack, $wt_report); + $wt_report = $ReportRoot->createHTML($tag, $attrs); + $currentElement = $wt_report; array_push($printDataStack, $printData); $printData = true; @@ -3873,58 +3873,58 @@ function HTMLSHandler($tag, $attrs) { * @see HTMLSHandler() */ function HTMLEHandler($tag) { - global $printData, $printDataStack, $pgvreport, $currentElement, $pgvreportStack; + global $printData, $printDataStack, $wt_report, $currentElement, $wt_reportStack; if ($tag=="tempdoc") return; $printData = array_pop($printDataStack); - $currentElement = $pgvreport; - $pgvreport = array_pop($pgvreportStack); - if (!is_null($pgvreport)) $pgvreport->addElement($currentElement); - else $pgvreport = $currentElement; + $currentElement = $wt_report; + $wt_report = array_pop($wt_reportStack); + if (!is_null($wt_report)) $wt_report->addElement($currentElement); + else $wt_report = $currentElement; } /** -* XML <PGVRTitleSHandler> start elemnt handler +* XML <TitleSHandler> start elemnt handler * * @todo add to wiki -* @see PGVRTitleEHandler() +* @see TitleEHandler() * @final */ -function PGVRTitleSHandler() { +function TitleSHandler() { global $reportTitle; $reportTitle = true; } /** -* XML </PGVRTitleEHandler> end elemnt handler +* XML </TitleEHandler> end elemnt handler * -* @see PGVRTitleSHandler() +* @see TitleSHandler() * @final */ -function PGVRTitleEHandler() { +function TitleEHandler() { global $reportTitle; $reportTitle = false; } /** -* XML <PGVRDescriptionSHandler> start elemnt handler +* XML <DescriptionSHandler> start elemnt handler * * @todo add to wiki -* @see PGVRDescriptionEHandler() +* @see DescriptionEHandler() * @final */ -function PGVRDescriptionSHandler() { +function DescriptionSHandler() { global $reportDescription; $reportDescription = true; } /** -* XML </PGVRDescriptionEHandler> end elemnt handler +* XML </DescriptionEHandler> end elemnt handler * -* @see PGVRDescriptionSHandler() +* @see DescriptionSHandler() * @final */ -function PGVRDescriptionEHandler() { +function DescriptionEHandler() { global $reportDescription; $reportDescription = false; } |
