Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /* * *************************************************************************..
Decoded Output download
<?php
/* * *******************************************************************************
* The content of this file is subject to the PDF Maker license.
* ("License"); You may not use this file except in compliance with the License
* The Initial Developer of the Original Code is IT-Solutions4You s.r.o.
* Portions created by IT-Solutions4You s.r.o. are Copyright(C) IT-Solutions4You s.r.o.
* All Rights Reserved.
* ****************************************************************************** */
$memory_limit = substr(ini_get("memory_limit"), 0, -1);
if ($memory_limit < 256) {
ini_set("memory_limit", "256M");
}
global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196;
$x175="array_keys"; $x176="array_push"; $x177="array_merge"; $x178="array_sum"; $x179="call_user_func_array"; $x17a="count"; $x17b="date"; $x17c="explode"; $x17d="file_exists"; $x17e="glob"; $x17f="html_entity_decode"; $x180="htmlentities"; $x181="iconv"; $x182="implode"; $x183="in_array"; $x184="is_numeric"; $x185="is_object"; $x186="md5"; $x187="nl2br"; $x188="number_format"; $x189="preg_match_all"; $x18a="round"; $x18b="rtrim"; $x18c="sprintf"; $x18d="str_replace"; $x18e="str_ireplace"; $x18f="strlen"; $x190="strip_tags"; $x191="strtoupper"; $x192="strpos"; $x193="strtolower"; $x194="strstr"; $x195="substr"; $x196="trim";
class PDFMaker_PDFContent_Model extends Vtiger_Base_Model {private static $x0b;private static $x0c;private static $x0d;private static $x0e;private static $x0f;private static $x10;private static $x11;private static $x12;private static $x13;private static $x14;private static $x15;public static $x16;private static $x17;private static $x18 = array();private static $x19;private static $x1a;private static $x1b;private static $x1c;private static $x1d;private static $x1e;private static $x1f;private static $x20 = "&#%ITS%%%@@@%%%ITS%#&";private static $x21;private static $x22 = Array("PurchaseOrder" => "vtiger_purchaseorder","SalesOrder" => "vtiger_salesorder","Quotes" => "vtiger_quotes","Invoice" => "vtiger_invoice","Issuecards" => "vtiger_issuecards","Receiptcards" => "vtiger_receiptcards","Creditnote" => "vtiger_creditnote","StornoInvoice" => "vtiger_stornoinvoice");private static $x23 = Array("PurchaseOrder" => "purchaseorderid","SalesOrder" => "salesorderid","Quotes" => "quoteid","Invoice" => "invoiceid","Issuecards" => "issuecardid","Receiptcards" => "receiptcardid","Creditnote" => "creditnote_id","StornoInvoice" => "stornoinvoice_id");private static $x24 = array("organizationname" => "COMPANY_NAME","address" => "COMPANY_ADDRESS","city" => "COMPANY_CITY","state" => "COMPANY_STATE","code" => "COMPANY_ZIP","country" => "COMPANY_COUNTRY","phone" => "COMPANY_PHONE","fax" => "COMPANY_FAX","website" => "COMPANY_WEBSITE","logo" => "COMPANY_LOGO",);public static $x25 = array();private static $x26 = array();function __construct($x27, $x28, $x29, $x2a) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x2b = "vtiger_current_version";$x2c = vglobal($x2b);$x2d = "site_URL";$x2e = vglobal($x2d);$x2f = "default_charset";$x30 = vglobal($x2f);self::$x0f = PearDatabase::getInstance();self::$x11 = $x30;self::$x0b = $x27;$x31 = vglobal("PDFMaker_template_id",self::$x0b);self::$x0c = $x28;self::$x0e = $x29;self::$x0d = $x2a;$x32 = Vtiger_Language_Handler::getModuleStringsFromFile(self::$x0d, self::$x0c);self::$x10 = $x32['languageStrings'];$x33 = self::$x0f->query("SELECT license FROM vtiger_pdfmaker_version WHERE version='" . $x2c . "'");if (self::$x0f->query_result($x33, 0, "license") == "P".$this->x2a("professional/".$x2e."t6")) {self::$x1f = "professional";} elseif (self::$x0f->query_result($x33, 0, "license") == "P".$this->x2a("basic/". $x2e."t6") && ($x0c == "PurchaseOrder" || $x0c == "SalesOrder" || $x0c == "Quotes" || $x0c == "Invoice")) {self::$x1f = "basic";} else {self::$x1f = "invalid";}$this->x16();$this->x17();self::$x25["record"] = self::$x0e->id;self::$x25["templateid"] = self::$x0b;self::$x17 = "<rowbreak />";}public function getContent() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("modules/PDFMaker/resources/classes/simple_html_dom.php");$x2b = "vtiger_current_version";$x2c = vglobal($x2b);$x34 = "img_root_directory";$x35 = vglobal($x34); if (self::$x0c == 'Calendar')self::$x21 = Array();if (self::$x1f == "professional" || self::$x1f == "basic") {self::$x1c = self::$x1b;self::$x1c = self::$x19 . self::$x20;self::$x1c .= self::$x1b . self::$x20;self::$x1c .= self::$x1a;self::$x21[" "] = " ";self::$x21["##PAGE##"] = "{PAGENO}";self::$x21["##PAGES##"] = "{nb}";self::$x21["##DD-MM-YYYY##"] = $x17b("d-m-Y");self::$x21["##DD.MM.YYYY##"] = $x17b("d.m.Y");self::$x21["##MM-DD-YYYY##"] = $x17b("m-d-Y");self::$x21["##YYYY-MM-DD##"] = $x17b("Y-m-d");self::$x21["src='"] = "src='" . $x35;self::$x21["$" . $x191(self::$x0c) . "_CRMID$"] = self::$x0e->id;if ($x2c == '5.2.1') {$x36 = getDisplayDate(self::$x0e->column_fields['createdtime']);$x37 = getDisplayDate(self::$x0e->column_fields['modifiedtime']);} else {$x38 = new DateTimeField(self::$x0e->column_fields['createdtime']);$x36 = $x38->getDisplayDateTimeValue();$x39 = new DateTimeField(self::$x0e->column_fields['modifiedtime']);$x37 = $x39->getDisplayDateTimeValue();}self::$x21["$" . $x191(self::$x0c) . "_CREATEDTIME_DATETIME$"] = $x36;self::$x21["$" . $x191(self::$x0c) . "_MODIFIEDTIME_DATETIME$"] = $x37; $this->x36(); $this->x15();self::$x1c = $x17f(self::$x1c, ENT_QUOTES, self::$x11); $x3a = str_get_html(self::$x1c); foreach ($x3a->find("div[style^=page-break-after]") as $x3b) {$x3b->outertext = self::$x16;self::$x1c = $x3a->save();} foreach ($x3a->find("div[style^=PAGE-BREAK-AFTER]") as $x3b) {$x3b->outertext = self::$x16;self::$x1c = $x3a->save();}$this->x2f();$this->x30(); $this->x0b();$this->x2b();$this->x10(self::$x0c, self::$x0e);$this->x0d();if ($this->focus->column_fields["assigned_user_id"] == "") {$this->focus->column_fields["assigned_user_id"] = self::$x0f->query_result(self::$x0f->query("SELECT smownerid FROM vtiger_crmentity WHERE crmid=" . self::$x0e->id), 0, "smownerid");}$this->x2d(); $this->x0e();$this->x11();$this->x12();$this->x13();$this->x14();$this->x35(); if ($x191(self::$x11) != "UTF-8") {self::$x1c = $x181(self::$x11, "UTF-8//TRANSLIT", self::$x1c);}if (self::$x1f == "professional")$this->x28();$x3c = array();list($x3c["header"], $x3c["body"], $x3c["footer"]) = $x17c(self::$x20, self::$x1c);} else {$x3d = "Invalid license key! Please contact the vendor of PDF Maker.";$x3c = array("header" => "<center>ERROR</center>", "body" => $x3d, "footer" => "");}return $x3c;}public function getSettings() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3e = "SELECT (margin_top * 10) AS margin_top,
(margin_bottom * 10) AS margin_bottom,
(margin_left * 10) AS margin_left,
(margin_right*10) AS margin_right,
format,
orientation,
encoding,
disp_header, disp_footer
FROM vtiger_pdfmaker_settings WHERE templateid = '" . self::$x0b . "'";$x33 = self::$x0f->query($x3e);$x3f = self::$x0f->fetchByAssoc($x33, 1);return $x3f;}private function x0b() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x2b = "vtiger_current_version";$x2c = vglobal($x2b);$x40 = "_fieldinfo_cache"; $x3e = "SELECT fieldid, relmodule FROM vtiger_fieldmodulerel";$x33 = self::$x0f->query($x3e);$x41 = array();while ($x42 = self::$x0f->fetchByAssoc($x33)) {$x41[$x42["fieldid"]][] = $x42["relmodule"];}$x3e = "SELECT fieldid, fieldname, uitype, columnname
FROM vtiger_field
WHERE tabid=" . getTabId(self::$x0c) . " AND (displaytype != 3 OR fieldid = 64)";$x33 = self::$x0f->query($x3e);$x43 = self::$x0f->num_rows($x33);if ($x43 > 0) {$x44 = array();$x45 = $x184(getTabId("Tac4you"));if ($x45 == true) {$x46 = "SELECT tac4you_module FROM vtiger_tac4you_module WHERE presence = 1";$x47 = self::$x0f->query($x46);while ($x48 = self::$x0f->fetchByAssoc($x47))$x44[$x48["tac4you_module"]] = $x48["tac4you_module"];}$x49 = array();$x4a = $x184(getTabId("Descriptions4you"));if ($x4a == true) {$x4b = "SELECT b.name FROM vtiger_links AS a
INNER JOIN vtiger_tab AS b USING (tabid)
WHERE linktype = 'DETAILVIEWWIDGET'
AND linkurl = 'block://ModDescriptions4you:modules/Descriptions4you/ModDescriptions4you.php'";$x4c = self::$x0f->query($x4b);while ($x4d = self::$x0f->fetchByAssoc($x4c))$x49[$x4d["name"]] = $x4d["name"];}while ($x42 = self::$x0f->fetch_array($x33)) {$x4e = "";$x4f = $x42["columnname"];$x50 = self::$x0e->column_fields[$x42["fieldname"]];switch ($x42["uitype"]) {case "51": $x4e = "Accounts";break;case "57": $x4e = "Contacts";break;case "58": $x4e = "Campaigns";break;case "59": $x4e = "Products";break;case "73": $x4e = "Accounts";break;case "75": $x4e = "Vendors";break;case "81": $x4e = "Vendors";break;case "76": $x4e = "Potentials";break;case "78": $x4e = "Quotes";break;case "80": $x4e = "SalesOrder";break;case "68":case "10": $x4e = getSalesEntityType($x50);break;}if ($x4e != "") {$x51 = getTabId($x4e);$x52 = &VTCacheUtils::$$x40;unset($x52[$x51]);$x53 = CRMEntity::getInstance($x4e);if ($x50 != "" && $x50 != "0") {$x54 = self::$x0f->query("SELECT deleted FROM vtiger_crmentity WHERE crmid='" . $x50 . "' AND deleted=0");if (self::$x0f->num_rows($x54) > 0) {$x53->retrieve_entity_info($x50, $x4e);$x53->id = $x50;}}self::$x21["$" . "R_" . $x191($x4e) . "_CRMID$"] = $x53->id;self::$x21["$" . "R_" . $x191($x4f) . "_CRMID$"] = $x53->id;if ($x2c == '5.2.1') {$x36 = getDisplayDate($x53->column_fields['createdtime']);$x37 = getDisplayDate($x53->column_fields['modifiedtime']);} else {$x38 = new DateTimeField($x53->column_fields['createdtime']);$x36 = $x38->getDisplayDateTimeValue();$x39 = new DateTimeField($x53->column_fields['modifiedtime']);$x37 = $x39->getDisplayDateTimeValue();}self::$x21["$" . "R_" . $x191($x4e) . "_CREATEDTIME_DATETIME$"] = $x36;self::$x21["$" . "R_" . $x191($x4f) . "_CREATEDTIME_DATETIME$"] = $x36;self::$x21["$" . "R_" . $x191($x4e) . "_MODIFIEDTIME_DATETIME$"] = $x37;self::$x21["$" . "R_" . $x191($x4f) . "_MODIFIEDTIME_DATETIME$"] = $x37; if (isset($x4e)) {$x55 = "";switch ($x4e) {case "Contacts":$x55 = $this->x1b($x53->id);break;case "Products":$x55 = $this->x1d($x53->id);break;}self::$x21['$x56' . $x191($x4e) . '_IMAGENAME$'] = $x55;self::$x21['$x56' . $x191($x4f) . '_IMAGENAME$'] = $x55;}if (isset($x44[$x4e])) {$x46 = "SELECT text FROM vtiger_tac4you_texts WHERE id=?";$x47 = self::$x0f->pquery($x46, array($x53->id));$x57 = self::$x0f->query_result($x47, 0, "text");$x57 = $x17f($x57, ENT_QUOTES, self::$x11);self::$x21["$" . "R_" . $x191($x4e) . "_TAC4YOU$"] = $x57;self::$x21["$" . "R_" . $x191($x4f) . "_TAC4YOU$"] = $x57;}if (isset($x49[$x4e])) {$x4b = "SELECT text FROM vtiger_descriptions4you_texts WHERE id=?";$x4c = self::$x0f->pquery($x4b, array($x53->id));$x58 = self::$x0f->query_result($x4c, 0, "text");$x58 = $x17f($x58, ENT_QUOTES, self::$x11);self::$x21["$" . "R_" . $x191($x4e) . "_DESC4YOU$"] = $x58;self::$x21["$" . "R_" . $x191($x4f) . "_DESC4YOU$"] = $x58;}if (isset($x59[$x4e])) {$x5a = $this->x32($x53->id);$x5a = $x17f($x5a, ENT_QUOTES, self::$x11);self::$x21["$" . "R_" . $x191($x4f) . "_MODCOMMENTS$"] = $x5a;} $this->x15();$this->x10($x4e, $x53, true);$this->x10($x4e, $x53, $x4f); $this->x34($x4e, $x53, $x4f);unset($x53);} if ($x42["uitype"] == "68") {$x41[$x42["fieldid"]][] = "Contacts";$x41[$x42["fieldid"]][] = "Accounts";}if (isset($x41[$x42["fieldid"]])) {foreach ($x41[$x42["fieldid"]] as $x5b => $x5c) { if ($x5c == $x4e)continue;$x5d = getTabId($x5c);$x52 = &VTCacheUtils::$$x40;unset($x52[$x5d]);if ($x17d("modules/".$x5c."/".$x5c.".php")){$x5e = CRMEntity::getInstance($x5c);self::$x21["$" . "R_" . $x191($x5c) . "_CRMID$"] = $x5e->id;self::$x21["$" . "R_" . $x191($x4f) . "_CRMID$"] = $x5e->id;if ($x2c == '5.2.1') {$x36 = getDisplayDate($x5e->column_fields['createdtime']);$x37 = getDisplayDate($x5e->column_fields['modifiedtime']);} else {$x38 = new DateTimeField($x5e->column_fields['createdtime']);$x36 = $x38->getDisplayDateTimeValue();$x39 = new DateTimeField($x5e->column_fields['modifiedtime']);$x37 = $x39->getDisplayDateTimeValue();}self::$x21["$" . "R_" . $x191($x5c) . "_CREATEDTIME_DATETIME$"] = $x36;self::$x21["$" . "R_" . $x191($x4f) . "_CREATEDTIME_DATETIME$"] = $x36;self::$x21["$" . "R_" . $x191($x5c) . "_MODIFIEDTIME_DATETIME$"] = $x37;self::$x21["$" . "R_" . $x191($x4f) . "_MODIFIEDTIME_DATETIME$"] = $x37;$this->x10($x5c, $x5e, true);$this->x10($x5c, $x5e, $x4f); $this->x34($x5c, $x5e, $x4f);unset($x5e);}}}}}}private function x0c() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("modules/PDFMaker/resources/classes/simple_html_dom.php");$x3a = str_get_html(self::$x1c);$x5f = false;foreach ($x3a->find("td") as $x60) {if ($x196($x60->plaintext) == "#PRODUCTBLOC_START#") { $x60->parent->outertext = "#PRODUCTBLOC_START#"; $x61 = $x60->parent;while ($x61->tag != "table")$x61 = $x61->parent; list($x62) = $x17c(">", $x61->outertext, 2); $x19 = $x61->first_child();if ($x19->tag != "tr")$x19 = $x19->children(0);if ($x185($x60->parent->prev_sibling()->children[0])) {$x63 = $x60->parent->prev_sibling()->children[0]->getAttribute("style");} else {$x63 = '';}$x64 = "<tr>";if (isset($x63)) {$x65 = $x17c(";", $x63); if (isset($x65)) {foreach ($x65 as $x66) {if ($x192($x66, "border-top") == TRUE) {$x64.="<td colspan='" . $x60->getAttribute("colspan") . "' style='" . $x66 . "'> </td>";}}}} else {$x64.="<td colspan='" . $x60->getAttribute("colspan") . "' style='border-top:1px solid #000000;'> </td>";}$x64.="</tr>"; $x67 = $x60->parent->next_sibling()->last_child()->plaintext;$x68 = ""; if ($x192($x67, "TOTAL") !== false) { if ($x185($x60)) {$x69 = $x60->getAttribute("style");}if (isset($x60->innertext)) {list($x6a, $x6b) = $x17c("#PRODUCTBLOC_START#", $x60->innertext);} else {$x6a = "";$x6b = "";} if (isset($x69)) {$x6c = $x17c(";", $x69);if (isset($x6c)) {foreach ($x6c as $x6d) {if ($x192($x6d, "border-top") == TRUE) {$x62.=" style='" . $x6d . "'";break;}}}} else {$x69 = "";}$x68 = "<tr>";$x68.="<td colspan='" . ($x60->getAttribute("colspan") - 1) . "' style='" . $x69 . ";border-right:none'>" . $x6a . "%G_Subtotal%" . $x6b . "</td>";$x68.="<td align='right' nowrap='nowrap' style='" . $x69 . "'>" . $x6a . "" . $x18b($x67, "$") . "_SUBTOTAL$" . $x6b . "</td>";$x68.="</tr>";}$x62.=">";$x5f["tag"] = $x62;$x5f["header"] = $x19->outertext;$x5f["footer"] = $x64;$x5f["subtotal"] = $x68;}if ($x196($x60->plaintext) == "#PRODUCTBLOC_END#")$x60->parent->outertext = "#PRODUCTBLOC_END#";}self::$x1c = $x3a->save();return $x5f;}private function x0d() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x6e = "select * from vtiger_inventoryproductrel where id=?";$x33 = self::$x0f->pquery($x6e, array(self::$x0e->id));$x43 = self::$x0f->num_rows($x33);if ($x43 > 0) { $x6f = $this->x34(self::$x0c, self::$x0e); $x70 = array();if ($x192(self::$x1c, "#PRODUCTBLOC_START#") !== false && $x192(self::$x1c, "#PRODUCTBLOC_END#") !== false) {$x71 = $this->x0c();$x72 = $this->x19();$x73 = $x72["products"];$x74 = $x72["show_header"];$x75 = $x72["show_subtotal"];$x76 = "";if ($x17a($x73) > 0) {if ($x71 !== false) {$x76 = "</table>" . self::$x16 . $x71["tag"];if ($x74 == 1)$x76.=$x71["header"];if ($x75 == 1) {$x76 = $x71["subtotal"] . $x76;} else {$x76 = $x71["footer"] . $x76;}} else {$x76 = self::$x16;}}$x77 = array();$x78 = $x17c("#PRODUCTBLOC_START#", self::$x1c);$x77[] = $x78[0];for ($x79 = 1; $x79 < $x17a($x78); $x79++) {$x7a = $x17c("#PRODUCTBLOC_END#", $x78[$x79]);foreach ($x7a as $x7b)$x77[] = $x7b;$x7c = $x79 * 2 - 1;$x7d[$x7c] = $x77[$x7c];$x77[$x7c] = '';}if ($x6f["P"]) {foreach ($x6f["P"] AS $x7e) {foreach ($x7d as $x7f => $x80) {$x81 = "";if ($x76 != "" && isset($x73[$x7e["SERVICES_RECORD_ID"] . "_" . $x7e["PRODUCTSEQUENCE"]]) || isset($x73[$x7e["PRODUCTS_RECORD_ID"] . "_" . $x7e["PRODUCTSEQUENCE"]])) {$x81 = $x76;}$x80.=$x81;foreach ($x7e AS $x82 => $x83) {$x80 = $x18d("$" . $x191($x82) . "$", $x83, $x80);}$x77[$x7f].=$x80;}}}self::$x1c = $x182('', $x77);}}}private function x0e() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3a = str_get_html(self::$x1c);$x84 = 0;foreach ($x3a->find("rowbreak") as $x85) {if ($x85->outertext == self::$x17) {$x86 = $x85;while ($x86 != null && $x86->tag != "td") {$x86 = $x86->parent();}if ($x86->tag == "td") { if ($x84 > 0) {$x84--;continue;} $x87 = $x86->prev_sibling();$x88 = array();while ($x87 != null) {$x88[] = $this->x0f($x87);$x87 = $x87->prev_sibling();} $x89 = $x86->next_sibling();$x8a = array();while ($x89 != null) {$x8a[] = $this->x0f($x89);$x89 = $x89->next_sibling();}$x8b = $x17c(self::$x17, $x86->innertext);for ($x2d = 0; $x2d < ($x17a($x8b) - 1); $x2d++) {$x86->innertext = $x8b[$x2d];$x8c = '<tr>';for ($x8d = 0; $x8d < $x17a($x88); $x8d++) {$x8c.='<td ' . $x88[$x8d] . '> </td>';}$x8c.='<td style="' . $x86->getAttribute("style") . '">' . $x8b[$x2d + 1] . '</td>';for ($x8d = 0; $x8d < $x17a($x8a); $x8d++) {$x8c.='<td ' . $x8a[$x8d] . '> </td>';}$x8c .= '</tr>';$x86->parent()->outertext = $x86->parent()->outertext . $x8c;} $x84 = $x17a($x8b) - 2;}}}self::$x1c = $x3a->save();}private function x0f($x8e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x8f = "";if ($x8e != null) {foreach ($x8e->attr as $x90 => $x91) {$x8f .= $x90 . '="' . $x91 . '" ';}}return $x8f;}private function x10($x92, $x93, $x94 = false, $x95 = false) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x96 = Users_Record_Model::getCurrentUserModel();$x97 = array("related_to","relatedto","parent_id","parentid","product_id","productid","service_id","serviceid","vendor_id","product","account","invoiceid","linktoaccountscontacts","projectid","sc_related_to");if ($x95 !== false)$x98 = array();$x51 = getTabid($x92);$x99 = $x92;if ($x94 === false) {$x9a = "";} else {$x9a = "R_";if ($x94 !== true)$x99 = $x94; }$x9b = array();$x9c = array();$x9d = array();$x9e = array();$x9f = array();$xa0 = array();$xa1 = array();if ($x51 == '9') {$x3e = "SELECT fieldname, uitype FROM vtiger_field WHERE tabid IN (9,16)";} else {$x3e = "SELECT fieldname, uitype FROM vtiger_field WHERE tabid = '" . $x51 . "'";}$x33 = self::$x0f->query($x3e);while ($x42 = self::$x0f->fetchByAssoc($x33)) {switch ($x42['uitype']) {case '19':case '20':case '21':case '24':$x9d[] = $x42['fieldname'];break;case '5':case '6':case '23':case '70':$x9e[] = $x42['fieldname'];break;case '15':$x9c[] = $x42['fieldname'];break;case '56':$x9b[] = $x42['fieldname'];break;case '33':$x9f[] = $x42['fieldname'];break;case '71':$xa0[] = $x42['fieldname'];break;case '9':$xa1[] = $x42['fieldname'];break;}if ($x42["fieldname"] == "salutationtype")$x9c[] = $x42["fieldname"];}foreach ($x93->column_fields as $xa2 => $x83) {if ($xa2 == "assigned_user_id")$x83 = $this->x1e($x83);elseif ($xa2 == "account_id") { $x83 = getAccountName($x83);} elseif ($xa2 == "potential_id")$x83 = getPotentialName($x83);elseif ($xa2 == "contact_id")$x83 = getContactName($x83);elseif ($xa2 == "quote_id")$x83 = getQuoteName($x83);elseif ($xa2 == "salesorder_id")$x83 = getSoName($x83);elseif ($xa2 == "campaignid")$x83 = getCampaignName($x83);elseif ($xa2 == "terms_conditions")$x83 = $this->x25($x83);elseif ($xa2 == "comments")$x83 = $this->x26($x93);elseif ($xa2 == "folderid")$x83 = $this->x27($x83);elseif ($xa2 == "time_start" || $xa2 == "time_end") {$xa3 = DateTimeField::convertToUserTimeZone($x83);$x83 = $xa3->format('H:i');} elseif ($x183($xa2, $x97)) {if ($x83 != "") {$xa4 = getSalesEntityType($x83);$xa5 = getEntityName($xa4, $x83);if (!empty($xa5)) {foreach ($xa5 as $xa6) {$x83 = $xa6;}}if ($xa2 == "invoiceid" && $x83 == "0")$x83 = "";}}if ($x183($xa2, $x9e)) {if ($x92 == "Events" || $x92 == "Calendar") {if ($xa2 == "date_start" && $x93->column_fields["time_start"] != "") {$xa3 = $x93->column_fields['time_start'];$x83 = $x83 . ' ' . $xa3;} elseif ($xa2 == "due_date" && $x93->column_fields["time_end"] != "") {$xa3 = $x93->column_fields['time_end'];$x83 = $x83 . ' ' . $xa3;}}if ($x83 != "")$x83 = getValidDisplayDate($x83);}elseif ($x183($xa2, $x9c)) {if (!$x183($x196($x83), self::$x18)) {$x83 = $this->x20($x83, $x92);} else {$x83 = "";}} elseif ($x183($xa2, $x9b)) {if ($x83 == 1) {$x83 = vtranslate('LBL_YES');} else {$x83 = vtranslate('LBL_NO');}} elseif ($x183($xa2, $x9d)) {$x83 = $x187($x83);$x83 = $x17f($x83, ENT_QUOTES, self::$x11);} elseif ($x183($xa2, $x9f))$x83 = $x18e(' |##| ', ', ', $x83);elseif ($x183($xa2, $xa0)) {if ($x184($x83)) {if ($x95 === false) {$xa7 = getCurrencySymbolandCRate($x96->currency_id);$xa8 = $xa7["rate"];} else {$xa8 = $x95["conversion_rate"];}$x83 = $x83 * $xa8;}$x83 = $this->x23($x83);} elseif ($x183($xa2, $xa1)) {$x83 = $this->x23($x83);}if ($x95 !== false) {$x98[$x191($x92 . "_" . $xa2)] = $x83;} else {self::$x21["$" . $x9a . $x191($x99 . "_" . $xa2) . "$"] = $x83;}}if ($x95 !== false) {return $x98;} else {$this->x15();}}private function x11() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $xa9 = "root_directory";$xaa = vglobal($xa9);$x96 = Users_Record_Model::getCurrentUserModel(); $x3e = "SELECT * FROM vtiger_organizationdetails";$x33 = self::$x0f->query($x3e);$xab = self::$x0f->fetchByAssoc($x33, 1);foreach ($xab AS $x82 => $x83) {if ($x82 == "logo")$x83 = '<img src="' . $xaa . 'test/logo/' . $xab["logoname"] . '">';self::$x21["$" . self::$x24[$x82] . "$"] = $x83;} $x3e = "SELECT tandc FROM vtiger_inventory_tandc WHERE type = 'Inventory'";$xac = self::$x0f->query_result(self::$x0f->query($x3e), 0, "tandc");self::$x21["$" . "TERMS_AND_CONDITIONS$"] = $x187($xac); $xad = "SELECT *
FROM vtiger_users WHERE id=" . self::$x0e->column_fields["assigned_user_id"];$xae = self::$x0f->query($xad);$xaf = self::$x0f->fetchByAssoc($xae);self::$x21["$" . "USER_CRMID$"] = $xaf["id"];self::$x21["$" . "USER_USERNAME$"] = $xaf["user_name"];self::$x21["$" . "USER_FIRSTNAME$"] = $xaf["first_name"];self::$x21["$" . "USER_LASTNAME$"] = $xaf["last_name"];self::$x21["$" . "USER_EMAIL$"] = $xaf["email1"];self::$x21["$" . "USER_TITLE$"] = $xaf["title"];self::$x21["$" . "USER_FAX$"] = $xaf["phone_fax"];self::$x21["$" . "USER_DEPARTMENT$"] = $xaf["department"];self::$x21["$" . "USER_OTHER_EMAIL$"] = $xaf["email2"];self::$x21["$" . "USER_PHONE$"] = $xaf["phone_work"];self::$x21["$" . "USER_YAHOOID$"] = $xaf["yahoo_id"];self::$x21["$" . "USER_MOBILE$"] = $xaf["phone_mobile"];self::$x21["$" . "USER_HOME_PHONE$"] = $xaf["phone_home"];self::$x21["$" . "USER_OTHER_PHONE$"] = $xaf["phone_other"];self::$x21["$" . "USER_SIGHNATURE$"] = $xaf["signature"];self::$x21["$" . "USER_NOTES$"] = $xaf["description"];self::$x21["$" . "USER_ADDRESS$"] = $xaf["address_street"];self::$x21["$" . "USER_COUNTRY$"] = $xaf["address_country"];self::$x21["$" . "USER_CITY$"] = $xaf["address_city"];self::$x21["$" . "USER_ZIP$"] = $xaf["address_postalcode"];self::$x21["$" . "USER_STATE$"] = $xaf["address_state"]; self::$x21["$" . "L_USER_CRMID$"] = $x96->id;self::$x21["$" . "L_USER_USERNAME$"] = $x96->column_fields["user_name"];self::$x21["$" . "L_USER_FIRSTNAME$"] = $x96->column_fields["first_name"];self::$x21["$" . "L_USER_LASTNAME$"] = $x96->column_fields["last_name"];self::$x21["$" . "L_USER_EMAIL$"] = $x96->column_fields["email1"];self::$x21["$" . "L_USER_TITLE$"] = $x96->column_fields["title"];self::$x21["$" . "L_USER_FAX$"] = $x96->column_fields["phone_fax"];self::$x21["$" . "L_USER_DEPARTMENT$"] = $x96->column_fields["department"];self::$x21["$" . "L_USER_OTHER_EMAIL$"] = $x96->column_fields["email2"];self::$x21["$" . "L_USER_PHONE$"] = $x96->column_fields["phone_work"];self::$x21["$" . "L_USER_YAHOOID$"] = $x96->column_fields["yahoo_id"];self::$x21["$" . "L_USER_MOBILE$"] = $x96->column_fields["phone_mobile"];self::$x21["$" . "L_USER_HOME_PHONE$"] = $x96->column_fields["phone_home"];self::$x21["$" . "L_USER_OTHER_PHONE$"] = $x96->column_fields["phone_other"];self::$x21["$" . "L_USER_SIGHNATURE$"] = $x96->column_fields["signature"];self::$x21["$" . "L_USER_NOTES$"] = $x96->column_fields["description"];self::$x21["$" . "L_USER_ADDRESS$"] = $x96->column_fields["address_street"];self::$x21["$" . "L_USER_COUNTRY$"] = $x96->column_fields["address_country"];self::$x21["$" . "L_USER_CITY$"] = $x96->column_fields["address_city"];self::$x21["$" . "L_USER_ZIP$"] = $x96->column_fields["address_postalcode"];self::$x21["$" . "L_USER_STATE$"] = $x96->column_fields["address_state"];$this->x15(); $xb0 = CRMEntity::getInstance("Users");$xb0->id = self::$x0e->column_fields["assigned_user_id"];$this->x24($xb0, $xb0->id, "Users");$this->x10("Users", $xb0, false); $xb1 = CRMEntity::getInstance("Users");$xb1->id = $x96->id;$this->x24($xb1, $xb1->id, "Users");$this->x10("Users", $xb1, true); self::$x21["$" . "USERS_CRMID$"] = $xb0->id;self::$x21["$" . "R_USERS_CRMID$"] = $xb1->id;$this->x15();}private function x12() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $xb2 = new PDFMaker_PDFMaker_Model();$xb3 = Vtiger_Language_Handler::getModuleStringsFromFile(self::$x0d);$xb4 = Vtiger_Language_Handler::getModuleStringsFromFile(self::$x0d, self::$x0c);$xb5 = $xb3["languageStrings"];$xb6 = $xb4["languageStrings"];list($xb7, $xb8) = $xb2->GetCustomLabels();$xb9 = "";foreach ($xb8 as $xba => $xbb) {if ($xbb["prefix"] == self::$x0d) {$xb9 = $xba;break;}} self::$x21["%G_Qty%"] = $xb5["Quantity"];self::$x21["%G_Subtotal%"] = $xb5["Sub Total"];self::$x21["%M_LBL_VENDOR_NAME_TITLE%"] = $xb5["Vendor Name"];$this->x15();if ($x192(self::$x1c, "%G_") !== false) {foreach ($xb5 as $xbc => $x83) {self::$x21["%G_" . $xbc . "%"] = $x83;}$this->x15();} if ($x192(self::$x1c, "%M_") !== false) {foreach ($xb6 as $xbc => $x83) {self::$x21["%M_" . $xbc . "%"] = $x83;}$this->x15();foreach ($xb5 as $xbc => $x83) {self::$x21["%M_" . $xbc . "%"] = $x83;}if (self::$x0c == "SalesOrder") self::$x21["%G_SO Number%"] = $xb6["SalesOrder No"];if (self::$x0c == "Invoice") self::$x21["%G_Invoice No%"] = $xb6["Invoice No"];$this->x15();} if ($x192(self::$x1c, "%C_") !== false) {foreach ($xb7 as $xbc => $x83) {self::$x21["%" . $x83->GetKey() . "%"] = $x83->GetLangValue($xb9);}$this->x15();} if ($x17a(self::$x26) > 0) {$xbd = return_specified_module_language(self::$x0d, "Services");$xbe = return_specified_module_language(self::$x0d, "Contacts");foreach (self::$x26 as $xbf) {if ($xbf != "") {$xc0 = return_specified_module_language(self::$x0d, $xbf); self::$x21["%R_" . $x191($xbf) . "_Service Name%"] = $xbd["Service Name"];self::$x21["%R_" . $x191($xbf) . "_Secondary Email%"] = $xbe["Secondary Email"];self::$x21["%R_" . $x191($xbf) . "_Last Modified By%"] = $xb5["Last Modified"];self::$x21["%R_" . $x191($xbf) . "_Conversion Rate%"] = $xb5["LBL_CONVERSION_RATE"];self::$x21["%R_" . $x191($xbf) . "_List Price%"] = $xb5["LBL_LIST_PRICE"];self::$x21["%R_" . $x191($xbf) . "_Discount%"] = $xb5["LBL_DISCOUNT"];self::$x21["%R_" . $x191($xbf) . "_Quantity%"] = $xb5["LBL_QUANTITY"];self::$x21["%R_" . $x191($xbf) . "_Comments%"] = $xb5["LBL_COMMENTS"];self::$x21["%R_" . $x191($xbf) . "_Currency%"] = $xb5["LBL_CURRENCY"];self::$x21["%R_" . $x191($xbf) . "_Due Date%"] = $xb5["LBL_DUE_DATE"];self::$x21["%R_" . $x191($xbf) . "_End Time%"] = $xb5["End Time"];self::$x21["%R_" . $x191($xbf) . "_Related to%"] = $xb5["LBL_RELATED_TO"];self::$x21["%R_" . $x191($xbf) . "_Assigned To%"] = $xb5["Assigned To"];self::$x21["%R_" . $x191($xbf) . "_Created Time%"] = $xb5["Created Time"];self::$x21["%R_" . $x191($xbf) . "_Modified Time%"] = $xb5["Modified Time"];foreach ($xc0 as $xbc => $x83) {self::$x21["%R_" . $x191($xbf) . "_" . $x180($xbc, ENT_QUOTES, self::$x11) . "%"] = $x83;}$this->x15();foreach ($xb5 as $xbc => $x83) {self::$x21["%R_" . $x191($xbf) . "_" . $x180($xbc, ENT_QUOTES, self::$x11) . "%"] = $x83;}$this->x15();}}}}private function x13() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("modules/PDFMaker/resources/classes/simple_html_dom.php");self::$x21["[BARCODE|"] = "<barcode>";self::$x21["|BARCODE]"] = "</barcode>";$this->x15();$x3a = str_get_html(self::$x1c);foreach ($x3a->find("barcode") as $xc1) {$xc2 = $x17c("|", $xc1->plaintext);list($x1f, $xc3) = $x17c("=", $xc2[0], 2);$xc4 = 'code="' . $xc3 . '" type="' . $x1f . '" ';for ($x2d = 1; $x2d < $x17a($xc2); $x2d++) {list($x90, $x91) = $x17c("=", $xc2[$x2d], 2);$xc4 .= $x193($x90) . '="' . $x91 . '" ';}$xc1->outertext = '<barcode ' . $xc4 . '/>';}self::$x1c = $x3a->save();}private function x14() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x2d = "site_URL";$xc5 = vglobal($x2d);require_once("modules/PDFMaker/resources/classes/simple_html_dom.php");$x3a = str_get_html(self::$x1c);foreach ($x3a->find("img") as $xc6) {if ($xc5[$x18f($xc5) - 1] != "/")$xc5 = $xc5 . "/";if ($x192($xc6->src, $xc5) === 0) {$xc7 = $x18d($xc5, "", $xc6->src);if ($x17d($xc7))$xc6->src = $xc7;}}self::$x1c = $x3a->save();}private function x15() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (!empty(self::$x21)) {self::$x1c = $x18d($x175(self::$x21), self::$x21, self::$x1c);self::$x21 = array();}} private function x16() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x2d = "site_URL";$x2e = vglobal($x2d);self::$x12 = $x196($x2e, "/");$x3e = "SELECT vtiger_pdfmaker.*, vtiger_pdfmaker_settings.*
FROM vtiger_pdfmaker
LEFT JOIN vtiger_pdfmaker_settings
ON vtiger_pdfmaker_settings.templateid = vtiger_pdfmaker.templateid
WHERE vtiger_pdfmaker.templateid=?";$x33 = self::$x0f->pquery($x3e, array(self::$x0b));$xc8 = self::$x0f->fetch_array($x33);self::$x13 = $x17f($xc8["decimal_point"], ENT_QUOTES);self::$x14 = $x17f(($xc8["thousands_separator"] != "sp" ? $xc8["thousands_separator"] : " "), ENT_QUOTES);self::$x15 = $xc8["decimals"];self::$x19 = $xc8["header"];self::$x1a = $xc8["footer"];self::$x1b = $xc8["body"];self::$x1d = $xc8["file_name"];self::$x1e = $xc8["filename"]; $xc9 = $xc8["format"];if ($x192($xc9, ";") > 0) {$xca = $x17c(";", $xc9);$xc9 = $xca[0] . "mm " . $xca[1] . "mm";} elseif ($xc8["orientation"] == "landscape") {$xc9 .= "-L";}self::$x16 = '<pagebreak sheet-size="' . $xc9 . '" orientation="' . $xc8["orientation"] . '" margin-left="' . ($xc8["margin_left"] * 10) . 'mm" margin-right="' . ($xc8["margin_right"] * 10) . 'mm" margin-top="0mm" margin-bottom="0mm" margin-header="' . ($xc8["margin_top"] * 10) . 'mm" margin-footer="' . ($xc8["margin_bottom"] * 10) . 'mm" />'; }private function x17() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3e = "SELECT value FROM vtiger_pdfmaker_ignorepicklistvalues";$x33 = self::$x0f->query($x3e);while ($x42 = self::$x0f->fetchByAssoc($x33)) {self::$x18[] = $x42["value"];}}private function x18($x0c, $x0e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $xcb = $this->x22($x0c, $x0e);$x6e = "select case when vtiger_products.productid != '' then vtiger_products.productname else vtiger_service.servicename end as productname," ." case when vtiger_products.productid != '' then vtiger_products.productid else vtiger_service.serviceid end as psid," ." case when vtiger_products.productid != '' then vtiger_products.product_no else vtiger_service.service_no end as psno," ." case when vtiger_products.productid != '' then 'Products' else 'Services' end as entitytype," ." case when vtiger_products.productid != '' then vtiger_products.unit_price else vtiger_service.unit_price end as unit_price," ." case when vtiger_products.productid != '' then vtiger_products.usageunit else vtiger_service.service_usageunit end as usageunit," ." case when vtiger_products.productid != '' then vtiger_products.qty_per_unit else vtiger_service.qty_per_unit end as qty_per_unit," ." case when vtiger_products.productid != '' then vtiger_products.qtyinstock else 'NA' end as qtyinstock," ." case when vtiger_products.productid != '' then c1.description else c2.description end as psdescription, vtiger_inventoryproductrel.* " ." from vtiger_inventoryproductrel" ." left join vtiger_products on vtiger_products.productid=vtiger_inventoryproductrel.productid " ." left join vtiger_crmentity as c1 on c1.crmid = vtiger_products.productid " ." left join vtiger_service on vtiger_service.serviceid=vtiger_inventoryproductrel.productid " ." left join vtiger_crmentity as c2 on c2.crmid = vtiger_service.serviceid " ." where id=? ORDER BY sequence_no";$x33 = self::$x0f->pquery($x6e, array($x0e->id));$x43 = self::$x0f->num_rows($x33);$xcc = "0.00"; $xcd = 0;$xce = 0;$xcf = 0; list($xd0, $xd1) = $this->x1a($x0e->id); $xd2 = array();$xd3 = array();for ($x2d = 1; $x2d <= $x43; $x2d++) {$xd4 = self::$x0f->pquery("SELECT productid from vtiger_inventorysubproductrel WHERE id=? AND sequence_no=?", array($x0e->id, $x2d));$xd5 = '';if (self::$x0f->num_rows($xd4) > 0) {for ($x8d = 0; $x8d < self::$x0f->num_rows($xd4); $x8d++) {$xd6 = self::$x0f->query_result($xd4, $x8d, "productid");$xd7 = getProductName($xd6);$xd8 = "";if ($x8d > 0)$xd8 = ":";$xd5 .= $xd8 . " - " . $xd7;}}$xd5 = $x18d(":", "<br>", $xd5);$xd9 = self::$x0f->query_result($x33, $x2d - 1, "psid");$xda = self::$x0f->query_result($x33, $x2d - 1, "psno");$xdb = self::$x0f->query_result($x33, $x2d - 1, "productid");$xdc = self::$x0f->query_result($x33, $x2d - 1, "entitytype");$xdd = $xde = self::$x0f->query_result($x33, $x2d - 1, "productname");if ($xd5 != "")$xde .= "<br/><span style='color:#C0C0C0;font-style:italic;'>" . $xd5 . "</span>";$xdf = self::$x0f->query_result($x33, $x2d - 1, "comment");$xe0 = self::$x0f->query_result($x33, $x2d - 1, "psdescription");$xe1 = self::$x0f->query_result($x33, $x2d - 1, "description");$xe2 = self::$x0f->query_result($x33, $x2d - 1, "qtyinstock");$xe3 = self::$x0f->query_result($x33, $x2d - 1, "quantity");$xe4 = self::$x0f->query_result($x33, $x2d - 1, "qty_per_unit");$xe5 = self::$x0f->query_result($x33, $x2d - 1, "usageunit");$xe6 = self::$x0f->query_result($x33, $x2d - 1, "unit_price");$xe7 = self::$x0f->query_result($x33, $x2d - 1, "listprice");$xe8 = $xe3 * $xe7; $xe9 = self::$x0f->query_result($x33, $x2d - 1, "discount_percent");$xea = self::$x0f->query_result($x33, $x2d - 1, "discount_amount");$xeb = $xe8;$xec = "0.00";$xed = "";if ($xe9 != "NULL" && $xe9 != "") {$xec = $xe8 * $xe9 / 100;$xeb = $xe8 - $xec; $xed = $xe9;} elseif ($xea != "NULL" && $xea != "") {$xec = $xea;$xeb = $xe8 - $xec;} $xee = $xeb; if ($xcb == "individual") {$xef = "0.00";$xf0 = $x10["LBL_TOTAL_AFTER_DISCOUNT"] . " = $xeb \n";$xf1 = getTaxDetailsForProduct($xdb, "all");$xf2 = array();for ($xf3 = 0; $xf3 < $x17a($xf1); $xf3++) {$xf4 = $xf1[$xf3]["taxname"];$xf5 = $xf1[$xf3]["taxlabel"];$xf6 = getInventoryProductTaxValue($x0e->id, $xdb, $xf4);$xf7 = $xeb * $xf6 / 100;$xef = $xef + $xf7;if ($xf4 != "" && $xf6 > 0) {$xf8[$xf4 . "-" . $xf6]["label"] = $xf5;$xf8[$xf4 . "-" . $xf6]["netto"] += $xeb;$xf8[$xf4 . "-" . $xf6]["vat"] += $x18a($xf7, self::$x15);$xf8[$xf4 . "-" . $xf6]["value"] = $xf6;$x176($xf2, $xf6);$x176($xd3, $xf6);}}$xee = $xee + $xef; if ($x17a($xf2) > 0) {$xf9 = $x178($xf2);} else {$xf9 = "0.00";}$xfa["P"][$x2d]["PRODUCTVATPERCENT"] = $this->x23($xf9);$xfa["P"][$x2d]["PRODUCTVATSUM"] = $this->x23($xef);}if ($xdc == "Products") {$xfa["P"][$x2d]["PRODUCTS_CRMID"] = $xd9;$xfa["P"][$x2d]["SERVICES_CRMID"] = "";} else {$xfa["P"][$x2d]["PRODUCTS_CRMID"] = "";$xfa["P"][$x2d]["SERVICES_CRMID"] = $xd9;}$xfa["P"][$x2d]["PS_CRMID"] = $xd9;$xfa["P"][$x2d]["PS_NO"] = $xda;if ($xdf != "") {$xdf = $x18d("\n", "<br>", $x187($xdf));$xdf = $x17f($xdf, ENT_QUOTES, self::$x11);$xde .= "<br /><small>" . $xdf . "</small>";}$xfa["P"][$x2d]["PRODUCTNAME"] = $xde;$xfa["P"][$x2d]["PRODUCTTITLE"] = $xdd;$xe0 = $x18d("\n", "<br>", $x187($xe0));$xfa["P"][$x2d]["PRODUCTDESCRIPTION"] = $x17f($xe0, ENT_QUOTES, self::$x11);$xfa["P"][$x2d]["PRODUCTEDITDESCRIPTION"] = $xdf;$xe1 = $x18d("\n", "<br>", $x187($xe1));$xfa["P"][$x2d]["CRMNOWPRODUCTDESCRIPTION"] = $x17f($xe1, ENT_QUOTES, self::$x11);$xfa["P"][$x2d]["PRODUCTLISTPRICE"] = $this->x23($xe7);$xfa["P"][$x2d]["PRODUCTTOTAL"] = $this->x23($xe8);$xfa["P"][$x2d]["PRODUCTQUANTITY"] = $this->x23($xe3);$xfa["P"][$x2d]["PRODUCTQINSTOCK"] = $this->x23($xe2); $xfa["P"][$x2d]["PRODUCTPRICE"] = $this->x23($xe6); $xfa["P"][$x2d]["PRODUCTPOSITION"] = $x2d;$xfa["P"][$x2d]["PRODUCTQTYPERUNIT"] = $this->x23($xe4); $x83 = $xe5;if (!$x183($x196($x83), self::$x18)) {$x83 = $this->x20($x83, "Products/Services");} else {$x83 = "";}$xfa["P"][$x2d]["PRODUCTUSAGEUNIT"] = $x83;$xfa["P"][$x2d]["PRODUCTDISCOUNT"] = $this->x23($xec);$xfa["P"][$x2d]["PRODUCTDISCOUNTPERCENT"] = $this->x23($xed);$xfa["P"][$x2d]["PRODUCTSTOTALAFTERDISCOUNTSUM"] = $xeb; $xfa["P"][$x2d]["PRODUCTSTOTALAFTERDISCOUNT"] = $this->x23($xeb);$xfa["P"][$x2d]["PRODUCTTOTALSUM"] = $this->x23($xeb + $xef); $xcd += $xeb;$xce += $xe8;$xcf+= $xeb + $xef;$xfa["P"][$x2d]["PRODUCTSTOTALAFTERDISCOUNT_SUBTOTAL"] = $this->x23($xcd);$xfa["P"][$x2d]["PRODUCTTOTAL_SUBTOTAL"] = $this->x23($xce);$xfa["P"][$x2d]["PRODUCTTOTALSUM_SUBTOTAL"] = $this->x23($xcf); $xd2[$x2d]["$" . "TOTALAFTERDISCOUNT_SUBTOTAL$"] = $xfa["P"][$x2d]["PRODUCTSTOTALAFTERDISCOUNT_SUBTOTAL"];$xd2[$x2d]["$" . "TOTAL_SUBTOTAL$"] = $xfa["P"][$x2d]["PRODUCTTOTAL_SUBTOTAL"];$xd2[$x2d]["$" . "TOTALSUM_SUBTOTAL$"] = $xfa["P"][$x2d]["PRODUCTTOTALSUM_SUBTOTAL"]; $xfb = self::$x0f->query_result($x33, $x2d - 1, "sequence_no");$xfa["P"][$x2d]["PRODUCTSEQUENCE"] = $xfb;if (isset($xd0[$xdb . "_" . $xfb])) {$xfc = "";$xfd = "";if ($xd0[$xdb . "_" . $xfb]["width"] > 0)$xfc = " width='" . $xd0[$xdb . "_" . $xfb]["width"] . "' ";if ($xd0[$xdb . "_" . $xfb]["height"] > 0)$xfd = " height='" . $xd0[$xdb . "_" . $xfb]["height"] . "' ";$xfa["P"][$x2d]["PRODUCTS_IMAGENAME"] = "<img src='" . self::$x12 . "/" . $xd0[$xdb . "_" . $xfb]["src"] . "' " . $xfc . $xfd . "/>";}elseif (isset($xd1[$xdb . "_" . $xfb])) {$xfa["P"][$x2d]["PRODUCTS_IMAGENAME"] = "<img src='" . self::$x12 . "/" . $xd1[$xdb . "_" . $xfb]["src"] . "' width='83' />";} $xfe = CRMEntity::getInstance("Products");if ($xdc == "Products" && $xd9 != "") {$xfe->id = $xd9;$this->x24($xfe, $xd9, "Products"); }$xff = $this->x21($x0c, $x0e);$x100 = $this->x10("Products", $xfe, false, $xff);$xfa["P"][$x2d] = $x177($x100, $xfa["P"][$x2d]);unset($xfe);$x101 = CRMEntity::getInstance("Services");if ($xdc == "Services" && $xd9 != "") {$x101->id = $xd9;$this->x24($x101, $xd9, "Services"); }$x102 = $this->x10("Services", $x101, false, $xff);$xfa["P"][$x2d] = $x177($x102, $xfa["P"][$x2d]);unset($x101); $x103 += $xeb;$xcc = $xcc + $xee;} if (self::$x0c == $x0c)self::$x25["subtotalsArray"] = $xd2; $x104 = "0.00";$x105 = "0";$x106 = ""; if ($x0e->column_fields["hdnDiscountPercent"] != "0") {$x104 = ($xcc * $x0e->column_fields["hdnDiscountPercent"] / 100);$x106 = $x0e->column_fields["hdnDiscountPercent"];} elseif ($x0e->column_fields["hdnDiscountAmount"] != "0") {$x104 = $x0e->column_fields["hdnDiscountAmount"];} $xef = "0.00";if ($xcb == "group") {$x107 = $xcc - $x104;$xf1 = getAllTaxes("available", "", "edit", $x0e->id);for ($xf3 = 0; $xf3 < $x17a($xf1); $xf3++) {$xf4 = $xf1[$xf3]["taxname"];$xf5 = $xf1[$xf3]["taxlabel"];$xf6 = self::$x0f->query_result($x33, 0, $xf4);if ($xf6 == "" || $xf6 == "NULL")$xf6 = "0.00";$x108 = ($xcc - $x104) * $xf6 / 100;$xef = $xef + $x108;if ($xf4 != "" && $xf6 > 0) {$xf8[$xf4]["label"] = $xf5;$xf8[$xf4]["netto"] = $x107;$xf8[$xf4]["vat"] += $x108;$xf8[$xf4]["value"] = $xf6; } $x109 += $xf6;}$x10a = $xef; foreach ($xfa["P"] as $x10b => $x10c) {$x10d = ($xfa["P"][$x10b]["PRODUCTSTOTALAFTERDISCOUNTSUM"] * $x109) / 100;$x10e = $xfa["P"][$x10b]["PRODUCTSTOTALAFTERDISCOUNTSUM"] + $x10d;$xfa["P"][$x10b]["PRODUCTVATPERCENT"] = $this->x23($x109);$xfa["P"][$x10b]["PRODUCTVATSUM"] = $this->x23($x10d);$xfa["P"][$x10b]["PRODUCTTOTALSUM"] = $this->x23($x10e);} } else {if ($x17a($xf8) > 0) {foreach ($xf8 as $x10f => $x110)$x10a += $x110["vat"];} else {$x10a = "0.00";}} $x111 = ($x0e->column_fields["hdnS_H_Amount"] != "") ? $x0e->column_fields["hdnS_H_Amount"] : "0.00";$x112 = "0.00";$x113 = getAllTaxes("available", "sh", "edit", $x0e->id);for ($x114 = 0; $x114 < $x17a($x113); $x114++) {$x115 = $x113[$x114]["taxname"];$x116 = $x113[$x114]["taxlabel"];$x117 = getInventorySHTaxPercent($x0e->id, $x115);$x118 = $x111 * $x117 / 100;$x112 = $x112 + $x118;}$x119 = $x103 - $x104;$x11a = ($x103 - $x104) + $x10a;$xfa["TOTAL"]["NETTOTAL"] = $this->x23($xcc);$xfa["TOTAL"]["TOTALWITHOUTVAT"] = $this->x23($x103);$xfa["TOTAL"]["FINALDISCOUNT"] = $this->x23($x104);$xfa["TOTAL"]["FINALDISCOUNTPERCENT"] = $this->x23($x106);$xfa["TOTAL"]["TOTALAFTERDISCOUNT"] = $this->x23($x119);$xfa["TOTAL"]["TAXTOTAL"] = $this->x23($x10a);$xfa["TOTAL"]["TAXTOTALPERCENT"] = $this->x23($x109); $xfa["TOTAL"]["TOTALWITHVAT"] = $this->x23($x11a);$xfa["TOTAL"]["SHTAXAMOUNT"] = $this->x23($x111);$xfa["TOTAL"]["SHTAXTOTAL"] = $this->x23($x112);$xfa["TOTAL"]["VATBLOCK"] = $xf8;return $xfa;}private function x19() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3e = "SELECT productid, sequence, show_header, show_subtotal FROM vtiger_pdfmaker_breakline WHERE crmid=?";$x11b = self::$x0f->pquery($x3e, array(self::$x0e->id));$x11c = array();$x74 = 0;$x75 = 0;while ($x42 = self::$x0f->fetchByAssoc($x11b)) {$x11c[$x42["productid"] . "_" . $x42["sequence"]] = $x42["sequence"];$x74 = $x42["show_header"];$x75 = $x42["show_subtotal"];}$x11d["products"] = $x11c;$x11d["show_header"] = $x74;$x11d["show_subtotal"] = $x75;return $x11d;}private function x1a($x11e, $x11f = false) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x11f === false) {$x3e = "SELECT vtiger_inventoryproductrel.productid, vtiger_inventoryproductrel.sequence_no, vtiger_attachments.attachmentsid, name, path
FROM vtiger_inventoryproductrel
LEFT JOIN vtiger_seattachmentsrel
ON vtiger_seattachmentsrel.crmid=vtiger_inventoryproductrel.productid
LEFT JOIN vtiger_attachments
ON vtiger_attachments.attachmentsid=vtiger_seattachmentsrel.attachmentsid
INNER JOIN vtiger_crmentity
ON vtiger_attachments.attachmentsid=vtiger_crmentity.crmid
WHERE vtiger_crmentity.deleted=0 AND vtiger_inventoryproductrel.id=?
ORDER BY vtiger_inventoryproductrel.sequence_no";} else {$x3e = "SELECT vtiger_products.productid, '1' AS sequence_no,
vtiger_attachments.attachmentsid, name, path
FROM vtiger_products
LEFT JOIN vtiger_seattachmentsrel
ON vtiger_seattachmentsrel.crmid=vtiger_products.productid
LEFT JOIN vtiger_attachments
ON vtiger_attachments.attachmentsid=vtiger_seattachmentsrel.attachmentsid
INNER JOIN vtiger_crmentity
ON vtiger_attachments.attachmentsid=vtiger_crmentity.crmid
WHERE vtiger_crmentity.deleted=0 AND vtiger_products.productid=? ORDER BY vtiger_attachments.attachmentsid";}$x120 = array();$xd1 = array();$x11b = self::$x0f->pquery($x3e, array($x11e));$x11c = array();while ($x42 = self::$x0f->fetchByAssoc($x11b)) {$x11c[$x42["productid"] . "#_#" . $x42["sequence_no"]][$x42["attachmentsid"]]["path"] = $x42["path"];$x11c[$x42["productid"] . "#_#" . $x42["sequence_no"]][$x42["attachmentsid"]]["name"] = $x42["name"];}$x121 = "SELECT productid, sequence, attachmentid, width, height FROM vtiger_pdfmaker_images WHERE crmid=?";$x122 = self::$x0f->pquery($x121, array($x11e));$x123 = array();$x124 = array();while ($x125 = self::$x0f->fetchByAssoc($x122)) {$x123[$x125["productid"] . "_" . $x125["sequence"]] = $x125["attachmentid"];$x124[$x125["productid"] . "_" . $x125["sequence"]]["width"] = ($x125["width"] > 0 ? $x125["width"] : "");$x124[$x125["productid"] . "_" . $x125["sequence"]]["height"] = ($x125["height"] > 0 ? $x125["height"] : "");}foreach ($x11c as $x126 => $xc8) {list($xdb, $x127) = $x17c("#_#", $x126, 2);foreach ($xc8 as $x128 => $xd0) {if ($x128 != "") {if (isset($x123[$xdb . "_" . $x127])) {if ($x123[$xdb . "_" . $x127] == $x128) {$xfc = $x124[$xdb . "_" . $x127]["width"];$xfd = $x124[$xdb . "_" . $x127]["height"];$x120[$xdb . "_" . $x127]["src"] = $xd0["path"] . $x128 . '_' . $xd0["name"];$x120[$xdb . "_" . $x127]["width"] = $xfc;$x120[$xdb . "_" . $x127]["height"] = $xfd;}} elseif (!isset($xd1[$xdb . "_" . $x127])) { $xd1[$xdb . "_" . $x127]["src"] = $xd0["path"] . $x128 . '_' . $xd0["name"];}}}}return array($x120, $xd1);}private function x1b($x11e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (isset($x11e) AND $x11e != "") {$x6e = "SELECT vtiger_attachments.path, vtiger_attachments.name, vtiger_attachments.attachmentsid
FROM vtiger_contactdetails
INNER JOIN vtiger_seattachmentsrel
ON vtiger_contactdetails.contactid=vtiger_seattachmentsrel.crmid
INNER JOIN vtiger_attachments
ON vtiger_attachments.attachmentsid=vtiger_seattachmentsrel.attachmentsid
INNER JOIN vtiger_crmentity
ON vtiger_attachments.attachmentsid=vtiger_crmentity.crmid
WHERE deleted=0 AND vtiger_contactdetails.contactid=?";$x33 = self::$x0f->pquery($x6e, array($x11e));$x43 = self::$x0f->num_rows($x33);if ($x43 > 0) {$x129 = self::$x0f->query_result($x33, 0, "path") . self::$x0f->query_result($x33, 0, "attachmentsid") . "_" . self::$x0f->query_result($x33, 0, "name");$x12a = "<img src='" . self::$x12 . "/" . $x129 . "'/>";return $x12a;}} else {return "";}}private function x1c($x11e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (isset($x11e) AND $x11e != "") {$x3e = "select vtiger_attachments.* from vtiger_attachments left join vtiger_salesmanattachmentsrel on vtiger_salesmanattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid where vtiger_salesmanattachmentsrel.smid=?";$x12b = self::$x0f->pquery($x3e, array($x11e));$x12c = self::$x0f->query_result($x12b, 0, 'attachmentsid');$x12d = self::$x0f->query_result($x12b, 0, 'path');$x12e = self::$x0f->query_result($x12b, 0, 'name');$x12f = $x12d . $x12c . "_" . $x12e;if ($x12e != '') { $x12a = '<img src="' . $x12f . '" width="250px" border="0">';} else {$x12a = '';}return $x12a;} else {return "";}}private function x1d($x11e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $xdb = $x11e;list($xd0, $xd1) = $this->x1a($xdb, true);$xfb = "1";$x130 = "";if (isset($xd0[$xdb . "_" . $xfb])) {$xfc = "";$xfd = "";if ($xd0[$xdb . "_" . $xfb]["width"] > 0)$xfc = " width='" . $xd0[$xdb . "_" . $xfb]["width"] . "' ";if ($xd0[$xdb . "_" . $xfb]["height"] > 0)$xfd = " height='" . $xd0[$xdb . "_" . $xfb]["height"] . "' ";$x130 = "A<img src='" . self::$x12 . "/" . $xd0[$xdb . "_" . $xfb]["src"] . "' " . $xfc . $xfd . "/>";}elseif (isset($xd1[$xdb . "_" . $xfb])) {$x130 = "B<img src='" . self::$x12 . "/" . $xd1[$xdb . "_" . $xfb]["src"] . "' width='83' />";}return $x130;} private function x1e($x11e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x11e != "") {$x3e = "SELECT user_name FROM vtiger_users WHERE id=?";$x33 = self::$x0f->pquery($x3e, array($x11e));$x131 = self::$x0f->query_result($x33, 0, "user_name");}if ($x131 == "") {$x3e = "SELECT groupname FROM vtiger_groups WHERE groupid=?";$x33 = self::$x0f->pquery($x3e, array($x11e));$x131 = self::$x0f->query_result($x33, 0, "groupname");} else {$x131 = getUserFullName($x11e);}return $x131;}private function x1f($x132) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x133 = "";if ($x132 != '') {$x3e = "SELECT account_no FROM vtiger_account WHERE accountid=?";$x33 = self::$x0f->pquery($x3e, array($x132));$x133 = self::$x0f->query_result($x33, 0, "account_no");}return $x133;}private function x20($x134, $x92) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x92 != "Products/Services") {$xb5 = return_application_language(self::$x0d);$xb6 = return_specified_module_language(self::$x0d, $x92);} else {$xb5 = return_specified_module_language(self::$x0d, "Services");$xb6 = return_specified_module_language(self::$x0d, "Products");}$x135 = ($xb6[$x134] != '') ? $xb6[$x134] : (($xb5[$x134] != '') ? $xb5[$x134] : $x134);return $x135;}private function x21($x0c, $x0e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x136 = self::$x22[$x0c];$x137 = self::$x23[$x0c];$x11b = self::$x0f->pquery("SELECT currency_id, " . $x136 . ".conversion_rate AS conv_rate, vtiger_currency_info.*
FROM " . $x136 . "
INNER JOIN vtiger_currency_info ON " . $x136 . ".currency_id = vtiger_currency_info.id
WHERE " . $x137 . "=?", array($x0e->id));$x138 = array();$x138["currency_id"] = self::$x0f->query_result($x11b, 0, "currency_id");$x138["conversion_rate"] = self::$x0f->query_result($x11b, 0, "conv_rate");$x138["currency_name"] = self::$x0f->query_result($x11b, 0, "currency_name");$x138["currency_code"] = self::$x0f->query_result($x11b, 0, "currency_code");$x138["currency_symbol"] = self::$x0f->query_result($x11b, 0, "currency_symbol");return $x138;}private function x22($x0c, $x0e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x11b = self::$x0f->pquery("SELECT taxtype FROM " . self::$x22[$x0c] . " WHERE " . self::$x23[$x0c] . "=?", array($x0e->id));$xcb = self::$x0f->query_result($x11b, 0, 'taxtype');return $xcb;}private function x23($x83) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x184($x83)) {$x139 = $x188($x83, self::$x15, self::$x13, self::$x14);} else {$x139 = "";}return $x139;}private function x24(&$x0e, $x13a, $x0c) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x33 = Array();foreach ($x0e->tab_name_index as $x13b => $x13c)$x33[$x13b] = self::$x0f->pquery("SELECT * FROM " . $x13b . " WHERE " . $x13c . "=?", array($x13a));$x51 = getTabid($x0c);$x13d = "SELECT fieldname, fieldid, fieldlabel, columnname, tablename, uitype, typeofdata, presence
FROM vtiger_field WHERE tabid=?";$x13e = self::$x0f->pquery($x13d, array($x51));$x13f = self::$x0f->num_rows($x13e);if ($x13f) {while ($x140 = self::$x0f->fetch_array($x13e)) {$x141 = $x140["columnname"];$x142 = $x140["tablename"];$xa2 = $x140["fieldname"];$x143 = "";if (isset($x33[$x142]))$x143 = self::$x0f->query_result($x33[$x142], 0, $x141);$x0e->column_fields[$xa2] = $x143;}}$x0e->column_fields["record_id"] = $x13a;$x0e->column_fields["record_module"] = $x0c;}private function x25($x83) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x17d("modules/Settings/EditTermDetails.php")) {$x3e = "SELECT tandc FROM vtiger_inventory_tandc WHERE id='" . $x83 . "'";$x11b = self::$x0f->query($x3e);$x144 = self::$x0f->num_rows($x11b);if ($x144 > 0) {$xac = self::$x0f->query_result($x11b, 0, "tandc");} else {$xac = $x83;}} else {$xac = $x83;}return $xac;}private function x26($x93) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x145 = "";$x146 = "";if ($x93->column_fields["record_module"] == "HelpDesk") {$x146 = "ticket";} elseif ($x93->column_fields["record_module"] == "Faq") {$x146 = "faq";}if ($x146 != "") {$xb6 = return_specified_module_language(self::$x0d, $x93->column_fields["record_module"]);$x3e = "SELECT * FROM vtiger_" . $x146 . "comments WHERE " . $x146 . "id=" . $x93->id;$x33 = self::$x0f->query($x3e);while ($x42 = self::$x0f->fetchByAssoc($x33)) {$xdf = $x42["comments"];$x147 = getValidDisplayDate($x42["createdtime"]);$x1b = "";if ($x146 == "ticket") {$x148 = $this->x1e($x42["ownerid"]);$x1b = $xdf . "<br />" . $xb6["LBL_AUTHOR"] . ": " . $x148 . "<br />" . $xb6["Created Time"] . ": " . $x147 . "<br /><br />";} else {$x1b = $xdf . "<br />" . $xb6["Created Time"] . ": " . $x147 . "<br /><br />";}$x145.=$x1b;}}return $x145;}private function x27($x149) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3e = "SELECT foldername FROM vtiger_attachmentsfolder WHERE folderid=" . $x149;return $x14a = self::$x0f->query_result(self::$x0f->query($x3e), 0, "foldername");}private function x28() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x184($x192(self::$x1c, '[CUSTOMFUNCTION|'))) {require_once("modules/PDFMaker/resources/classes/simple_html_dom.php");foreach ($x17e('modules/PDFMaker/resources/functions/*.php') as $x14b) {include_once $x14b;}self::$x21["[CUSTOMFUNCTION|"] = "<customfunction>";self::$x21["|CUSTOMFUNCTION]"] = "</customfunction>";$this->x15();$x3a = str_get_html(self::$x1c);foreach ($x3a->find("customfunction") as $x14c) { $x14d = $this->x29($x196($x14c->plaintext));$x14e = $x14d[0];unset($x14d[0]);$x14f = $x179($x14e, $x14d);$x14c->outertext = $x14f;}self::$x1c = $x3a->save();}}private function x29($x150) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x14d = array();$x151 = false;do {if ($x194($x150, '|')) {if ($x150[0] == '"') {$x152 = '"|';$x150 = $x195($x150, 1);} elseif ($x195($x150, 0, 6) == '"') {$x152 = '"|';$x150 = $x195($x150, 6);} else {$x152 = '|';}list($x14d[], $x150) = $x17c($x152, $x150, 2);} else {$x14d[] = $x150;$x151 = true;}} while (!$x151);return $x14d;}public function getFilename() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; self::$x1c = self::$x1d;self::$x21["$#TEMPLATE_NAME#$"] = self::$x1e;self::$x21["$#DD-MM-YYYY#$"] = $x17b("d-m-Y");self::$x21["$#MM-DD-YYYY#$"] = $x17b("m-d-Y");self::$x21["$#YYYY-MM-DD#$"] = $x17b("Y-m-d");self::$x21["$" . $x191(self::$x0c) . "_CRMID$"] = self::$x0e->id;$this->x10(self::$x0c, self::$x0e);self::$x21 = array();self::$x21["
"] = "";self::$x21["
"] = "";self::$x21["
"] = "";self::$x21["
"] = "";$this->x15();return $x18d(" ", "_", $x195($x190($x17f(self::$x1c, ENT_QUOTES, self::$x11)), 0, 255));}private function x2a($x150) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; return $x186($x150);}private function x2b() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; include_once("modules/PDFMaker/resources/RelBlockRun.php");if ($x192(self::$x1c, "#RELBLOCK") !== false) {$x189("|#RELBLOCK([0-9]+)_START#|U", self::$x1c, $x153, PREG_PATTERN_ORDER);if ($x17a($x153[1]) > 0) {$x154 = array();foreach ($x153[1] as $x155) {if (!$x183($x155, $x154)) {$x156 = "SELECT secmodule FROM vtiger_pdfmaker_relblocks WHERE relblockid = '" . $x155 . "'";$x157 = self::$x0f->query_result(self::$x0f->query($x156), 0, "secmodule");if ($x192(self::$x1c, "#RELBLOCK" . $x155 . "_START#") !== false) {if ($x192(self::$x1c, "#RELBLOCK" . $x155 . "_END#") !== false) {$x5f = $this->x2c($x155);$x158 = new RelBlockRun(self::$x0e->id, $x155, self::$x0c, $x157);$x158->SetPDFLanguage(self::$x0d);$x159 = $x158->GenerateReport();$x77 = array();$x78 = $x17c("#RELBLOCK" . $x155 . "_START#", self::$x1c);$x77[] = $x78[0];for ($x79 = 1; $x79 < $x17a($x78); $x79++) {$x7a = $x17c("#RELBLOCK" . $x155 . "_END#", $x78[$x79]);foreach ($x7a as $x7b)$x77[] = $x7b;$x7c = $x79 * 2 - 1;$x7d[$x7c] = $x77[$x7c];$x77[$x7c] = '';}if ($x17a($x159) > 0) { self::$x26[$x155] = $x157;foreach ($x159 as $x15a) {foreach ($x7d as $x7f => $x80) {$x15b = false;foreach ($x15a AS $x82 => $x83) { if ($x196($x83) != "-" && $x82 != "listprice") {$x15b = true;} $x80 = $x18e("$" . $x82 . "$", $x83, $x80);}if ($x15b)$x77[$x7f].=$x80;}}}self::$x1c = $x182('', $x77);}}$x154[] = $x155;}}}}}private function x2c($x155) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("modules/PDFMaker/resources/classes/simple_html_dom.php");$x3a = str_get_html(self::$x1c);$x5f = false;foreach ($x3a->find("td") as $x60) {if ($x196($x60->plaintext) == "#RELBLOCK" . $x155 . "_START#") {$x60->parent->outertext = "#RELBLOCK" . $x155 . "_START#";}if ($x196($x60->plaintext) == "#RELBLOCK" . $x155 . "_END#") {$x60->parent->outertext = "#RELBLOCK" . $x155 . "_END#";}}self::$x1c = $x3a->save();return $x5f;}private function x2d() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("modules/PDFMaker/resources/classes/simple_html_dom.php");$x3a = str_get_html(self::$x1c);foreach ($x3a->find("td") as $x60) {if ($x196($x60->plaintext) == "#LISTVIEWBLOCK_START#")$x60->parent->outertext = "#LISTVIEWBLOCK_START#";if ($x196($x60->plaintext) == "#LISTVIEWBLOCK_END#")$x60->parent->outertext = "#LISTVIEWBLOCK_END#";}self::$x1c = $x3a->save();}private function x2e() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("modules/PDFMaker/resources/classes/simple_html_dom.php");$x3a = str_get_html(self::$x1c);foreach ($x3a->find("td") as $x60) {if ($x196($x60->plaintext) == "#VATBLOCK_START#") {$x60->parent->outertext = "#VATBLOCK_START#";}if ($x196($x60->plaintext) == "#VATBLOCK_END#") {$x60->parent->outertext = "#VATBLOCK_END#";}}self::$x1c = $x3a->save();}private function x2f() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x44 = array();$x45 = $x184(getTabId("Tac4you"));if ($x45 == true) {$x46 = "SELECT text FROM vtiger_tac4you_texts WHERE id=?";$x47 = self::$x0f->pquery($x46, array(self::$x0e->id));$x57 = self::$x0f->query_result($x47, 0, "text");self::$x21["$" . $x191(self::$x0c) . "_TAC4YOU$"] = $x17f($x57, ENT_QUOTES, self::$x11);}}private function x30() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x15c = array();$x4a = $x184(getTabId("Descriptions4you"));if ($x4a == true) {$x4b = "SELECT text FROM vtiger_descriptions4you_texts WHERE id=?";$x4c = self::$x0f->pquery($x4b, array(self::$x0e->id));$x58 = self::$x0f->query_result($x4c, 0, "text");self::$x21["$" . $x191(self::$x0c) . "_DESC4YOU$"] = $x17f($x58, ENT_QUOTES, self::$x11);}}private function x31() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x59 = array();$x15d = $x184(getTabId("ModComments"));$x15e = "";if ($x15d == true) {$x3e = "SELECT relmodule FROM vtiger_fieldmodulerel WHERE module='ModComments' AND relmodule = ?";$x33 = self::$x0f->pquery($x3e, array(self::$x0c));if (self::$x0f->num_rows($x33) > 0) {$x15e = $this->x32(self::$x0e->id);}}self::$x21["$" . $x191(self::$x0c) . "_MODCOMMENTS$"] = $x17f($x15e, ENT_QUOTES, self::$x11);}private function x32($x15f) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x15e = "";if ($x17d("modules/ModComments/ModComments.php") == true) {require_once("modules/ModComments/ModComments.php");$x160 = "ModComments";$x161 = CRMEntity::getInstance($x160);$x162 = $x18c(" ORDER BY %s.%s DESC ", $x161->table_name, $x161->table_index);$x6e = $x161->getListQuery($x160, $x18c(" AND %s.related_to=?", $x161->table_name));$x6e .= $x162;$x33 = self::$x0f->pquery($x6e, array($x15f));$x163 = array();if (self::$x0f->num_rows($x33)) {while ($x140 = self::$x0f->fetch_array($x33)) {$x164 = new ModComments_CommentsModel($x140);$x15e .= "<p>[" . $x164->author() . ": " . $x164->timestamp() . " ]<br />" . $x164->content() . "</p>";}}}return $x15e;}private function x33($x0c, $x0e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (isset($x0e->column_fields["currency_id"]) && isset($x0e->column_fields["conversion_rate"]) && isset($x0e->column_fields["hdnGrandTotal"])) {self::$x22[$x0c] = $x0e->table_name;self::$x23[$x0c] = $x0e->table_index;}}private function x34($x0c, $x0e, $x94 = false) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (!isset(self::$x22[$x0c]))$this->x33($x0c, $x0e);if (!isset(self::$x22[$x0c]))return array();$x146 = "";if ($x94 !== false)$x146 = "R_" . $x191($x94) . "_";self::$x21["$" . $x146 . "SUBTOTAL$"] = $this->x23($x0e->column_fields["hdnSubTotal"]);self::$x21["$" . $x146 . "TOTAL$"] = $this->x23($x0e->column_fields["hdnGrandTotal"]);$xff = $this->x21($x0c, $x0e);$xff["currency_symbol"] = $x18d("", "€", $xff["currency_symbol"]);$xff["currency_symbol"] = $x18d("", "£", $xff["currency_symbol"]);self::$x21["$" . $x146 . "CURRENCYNAME$"] = getTranslatedCurrencyString($xff["currency_name"]);self::$x21["$" . $x146 . "CURRENCYSYMBOL$"] = $xff["currency_symbol"];self::$x21["$" . $x146 . "CURRENCYCODE$"] = $xff["currency_code"];self::$x21["$" . $x146 . "ADJUSTMENT$"] = $this->x23($x0e->column_fields["txtAdjustment"]);$x6f = $this->x18($x0c, $x0e);self::$x21["$" . $x146 . "TOTALWITHOUTVAT$"] = $x6f["TOTAL"]["TOTALWITHOUTVAT"];self::$x21["$" . $x146 . "VAT$"] = $x6f["TOTAL"]["TAXTOTAL"];self::$x21["$" . $x146 . "VATPERCENT$"] = $x6f["TOTAL"]["TAXTOTALPERCENT"];self::$x21["$" . $x146 . "TOTALWITHVAT$"] = $x6f["TOTAL"]["TOTALWITHVAT"];self::$x21["$" . $x146 . "SHTAXAMOUNT$"] = $x6f["TOTAL"]["SHTAXAMOUNT"];self::$x21["$" . $x146 . "SHTAXTOTAL$"] = $x6f["TOTAL"]["SHTAXTOTAL"];self::$x21["$" . $x146 . "TOTALDISCOUNT$"] = $x6f["TOTAL"]["FINALDISCOUNT"];self::$x21["$" . $x146 . "TOTALDISCOUNTPERCENT$"] = $x6f["TOTAL"]["FINALDISCOUNTPERCENT"];self::$x21["$" . $x146 . "TOTALAFTERDISCOUNT$"] = $x6f["TOTAL"]["TOTALAFTERDISCOUNT"];$this->x15(); if ($x94 === false) { if ($x17a($x6f["TOTAL"]["VATBLOCK"]) > 0) {$x165 = "<table border='1' style='border-collapse:collapse;' cellpadding='3'>";$x165 .= "<tr>
<td nowrap align='center'>" . vtranslate("Name") . "</td>
<td nowrap align='center'>" . self::$x10["LBL_VATBLOCK_VAT_PERCENT"] . "</td>
<td nowrap align='center'>" . self::$x10["LBL_VATBLOCK_SUM"] . " (" . $xff["currency_symbol"] . ")" . "</td>
<td nowrap align='center'>" . self::$x10["LBL_VATBLOCK_VAT_VALUE"] . " (" . $xff["currency_symbol"] . ")" . "</td>
</tr>";foreach ($x6f["TOTAL"]["VATBLOCK"] as $x166 => $x167) {if ($x167["netto"] != 0) {$x165 .= "<tr>
<td nowrap align='left' width='20%'>" . $x167["label"] . "</td>
<td nowrap align='right' width='25%'>" . $this->x23($x167["value"]) . " %</td>
<td nowrap align='right' width='30%'>" . $this->x23($x167["netto"]) . "</td>
<td nowrap align='right' width='25%'>" . $this->x23($x167["vat"]) . "</td>
</tr>";}}$x165 .= "</table>";} else {$x165 = "";}self::$x21["$" . "VATBLOCK$"] = $x165;$this->x15(); if ($x192(self::$x1c, "#VATBLOCK_START#") !== false && $x192(self::$x1c, "#VATBLOCK_END#") !== false) {$this->x2e();$x168 = array();$x169 = $x17c("#VATBLOCK_START#", self::$x1c);$x168[] = $x169[0];for ($x79 = 1; $x79 < $x17a($x169); $x79++) {$x16a = $x17c("#VATBLOCK_END#", $x169[$x79]);foreach ($x16a as $x16b) {$x168[] = $x16b;}$x16c = $x79 * 2 - 1;$x16d[$x16c] = $x168[$x16c];$x168[$x16c] = '';}if ($x17a($x6f["TOTAL"]["VATBLOCK"]) > 0) {foreach ($x6f["TOTAL"]["VATBLOCK"] as $x166 => $x167) {foreach ($x16d as $x7f => $x80) {if ($x167["netto"] != 0) {foreach ($x167 as $x16e => $x16f) {if ($x184($x16f))$x16f = $this->x23($x16f);$x80 = $x18d("$" . "VATBLOCK_" . $x191($x16e) . "$", $x16f, $x80);}$x168[$x7f].=$x80;}}}}self::$x1c = $x182('', $x168);}}return $x6f;}private function x35() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; self::$x21["$" . "MULTICOMPANY_COMPANYNAME" . "$"] = '';self::$x21["$" . "MULTICOMPANY_STREET" . "$"] = '';self::$x21["$" . "MULTICOMPANY_CITY" . "$"] = '';self::$x21["$" . "MULTICOMPANY_CODE" . "$"] = '';self::$x21["$" . "MULTICOMPANY_STATE" . "$"] = '';self::$x21["$" . "MULTICOMPANY_COUNTRY" . "$"] = '';self::$x21["$" . "MULTICOMPANY_PHONE" . "$"] = '';self::$x21["$" . "MULTICOMPANY_FAX" . "$"] = '';self::$x21["$" . "MULTICOMPANY_EMAIL" . "$"] = '';self::$x21["$" . "MULTICOMPANY_WEBSITE" . "$"] = '';self::$x21["$" . "MULTICOMPANY_LOGO" . "$"] = '';self::$x21["$" . "MULTICOMPANY_STAMP" . "$"] = '';self::$x21["$" . "MULTICOMPANY_BANKNAME" . "$"] = '';self::$x21["$" . "MULTICOMPANY_BANKACCOUNTNO" . "$"] = '';self::$x21["$" . "MULTICOMPANY_IBAN" . "$"] = '';self::$x21["$" . "MULTICOMPANY_SWIFT" . "$"] = '';self::$x21["$" . "MULTICOMPANY_REGISTRATIONNO" . "$"] = '';self::$x21["$" . "MULTICOMPANY_VATNO" . "$"] = '';self::$x21["$" . "MULTICOMPANY_TAXID" . "$"] = '';self::$x21["$" . "MULTICOMPANY_ADDITIONALINFORMATIONS" . "$"] = '';if (getTabId('MultiCompany4you') && vtlib_isModuleActive('MultiCompany4you') && isset(self::$x0e->column_fields) && self::$x0e->column_fields > 0) {require_once('modules/MultiCompany4you/MultiCompany4youUtils.php');$x170 = getCompanyRole(self::$x0e->column_fields['assigned_user_id']); $x11b = self::$x0f->pquery("SELECT * FROM vtiger_multicompany4you WHERE role=? AND deleted=0", array($x170));$x42 = self::$x0f->fetchByAssoc($x11b); foreach ($x42 as $xbc => $x83) {switch ($xbc) {case "logo":continue (2);break;case "logoname":case "stampname":$xbc = $x195($xbc, 0, -4);$x83 = "<img src='test/logo/" . $x83 . "'>";break;}self::$x21["$" . "MULTICOMPANY_" . $x191($xbc) . "$"] = $x83; }$this->x15();}}private function x36() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; self::$x21['$x171$'] = $this->x1c(self::$x0e->column_fields["assigned_user_id"]); self::$x21['$x172$'] = $this->x1c($_SESSION["authenticated_user_id"]);switch (self::$x0c) {case "Contacts":self::$x21['$x173$'] = $this->x1b(self::$x0e->id);break;case "Products":self::$x21['$x174$'] = $this->x1d(self::$x0e->id);break;}}} ?>
Did this file decode correctly?
Original Code
<?php
/* * *******************************************************************************
* The content of this file is subject to the PDF Maker license.
* ("License"); You may not use this file except in compliance with the License
* The Initial Developer of the Original Code is IT-Solutions4You s.r.o.
* Portions created by IT-Solutions4You s.r.o. are Copyright(C) IT-Solutions4You s.r.o.
* All Rights Reserved.
* ****************************************************************************** */
$memory_limit = substr(ini_get("memory_limit"), 0, -1);
if ($memory_limit < 256) {
ini_set("memory_limit", "256M");
}
global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196;
$x175="a\x72\162\141\171\137k\145\171\x73"; $x176="\x61\x72r\x61\171\137\x70\165\x73h"; $x177="\141\162\x72a\x79\x5fme\162\x67e"; $x178="\141\x72r\x61y\x5fs\165\x6d"; $x179="c\141l\x6c_\165\163\x65r_\x66\165\x6e\x63\x5f\x61\x72\x72ay"; $x17a="\143\x6f\165n\164"; $x17b="d\141te"; $x17c="\145\170p\x6c\157\x64\x65"; $x17d="\x66i\154\x65_\x65\170is\x74\x73"; $x17e="\x67l\157\142"; $x17f="h\x74\155l\137\145\156\164i\164y\x5f\x64\x65\143od\x65"; $x180="\x68tm\154\145\x6e\x74i\164\151\145\x73"; $x181="i\x63\157\156\x76"; $x182="\x69m\x70\154\157d\x65"; $x183="\151n_\141rr\x61\x79"; $x184="\x69\x73_\x6e\165\155\x65\x72\x69\143"; $x185="i\x73\137\157\142\x6a\x65\143t"; $x186="md\065"; $x187="\156\x6c\x32br"; $x188="\x6e\165mb\145r\x5ff\x6f\x72\155\x61\x74"; $x189="\x70re\x67_\155\x61\x74\x63\150\137\x61\x6cl"; $x18a="\x72\157u\x6e\144"; $x18b="\162t\x72\x69\x6d"; $x18c="spr\x69\156\164\x66"; $x18d="\163\164r\x5fre\x70l\x61\143\x65"; $x18e="\163tr\x5fir\x65\160l\x61ce"; $x18f="\163\164\162len"; $x190="\x73\164\x72i\160_\164\x61g\x73"; $x191="\163\164\162\x74o\165p\x70er"; $x192="\163\164\x72\x70\157\163"; $x193="s\x74\162\164\157low\145r"; $x194="\x73t\x72s\164\162"; $x195="\x73u\142\163\164\x72"; $x196="\x74r\x69\155";
class PDFMaker_PDFContent_Model extends Vtiger_Base_Model {private static $x0b;private static $x0c;private static $x0d;private static $x0e;private static $x0f;private static $x10;private static $x11;private static $x12;private static $x13;private static $x14;private static $x15;public static $x16;private static $x17;private static $x18 = array();private static $x19;private static $x1a;private static $x1b;private static $x1c;private static $x1d;private static $x1e;private static $x1f;private static $x20 = "\x26\043%\111\x54\x53%%\045@@@\x25\045\045I\124\123\045\x23&";private static $x21;private static $x22 = Array("\120u\162\143\150\x61\163\x65Or\x64\145\x72" => "v\x74\x69\x67e\162\137\x70u\162\143\x68a\x73eo\x72\x64\145\x72","\x53\x61l\x65\x73\x4fr\144\145r" => "\166\164i\x67\145\162_\x73\141l\x65so\x72\x64e\162","\121\x75ot\145s" => "\x76\164\151\147\145r\137q\165\x6ft\145\163","In\x76\x6f\151c\145" => "\x76\164\151\x67\145\x72\137i\156\x76\x6f\151\143\145","\x49s\x73\165ec\141\162\x64\x73" => "v\x74\x69\147\145\162\x5f\151\x73s\x75\x65\x63\141r\x64\x73","\x52\x65\x63\145\x69\x70\164\x63\141r\x64s" => "\166t\x69g\x65r\x5f\x72e\x63\145ip\x74card\x73","\x43\x72e\144i\x74\156o\164e" => "v\164\x69\x67\x65r_c\162e\144i\x74\156\157te","S\x74\x6f\x72\156\157\111n\166\157ic\145" => "v\164\x69g\145\x72\137st\157r\156o\x69n\166o\x69\143\145");private static $x23 = Array("\x50u\x72\143\x68\141\163e\x4f\162\144er" => "\x70\x75\162\x63\x68\x61se\x6f\162d\x65r\151\x64","Sal\145\163\117r\x64\x65r" => "\163a\154\145\x73\157\x72\x64e\162\x69d","Q\x75\157\164\145s" => "q\165\x6ft\x65\x69\x64","\111\x6evo\x69\143\x65" => "\151n\166o\x69\x63e\x69\144","Is\x73\165\x65\x63a\x72\x64\x73" => "\151ss\165\x65\x63a\x72\144id","Re\x63\145\x69\160\x74c\x61\x72\x64\163" => "\x72\145\143\145\x69\160\164c\x61\x72d\151\144","\x43\x72\x65\x64\x69\x74\156ot\x65" => "\x63\x72e\x64i\x74n\x6f\164\145\x5fi\x64","\123\x74\x6f\162\x6e\157In\166oi\x63\145" => "\x73t\x6f\162\x6e\x6finv\157\x69\143\x65_\151\x64");private static $x24 = array("\x6fr\147\x61\156\151\x7a\141tion\x6ea\155\x65" => "\103\117\115P\101N\x59_\116\x41\x4d\105","\141\x64d\x72e\163\163" => "C\x4fM\x50A\116Y\x5f\x41\104D\122\x45S\123","\x63\151\164y" => "\x43\x4fM\x50A\116\131\137C\x49\124Y","s\x74at\x65" => "\103O\115\120A\116Y_\123T\x41\124\105","\x63\x6fd\145" => "\x43\x4fM\120A\x4e\x59\x5f\132\111\120","\143\157u\x6e\x74r\171" => "\103O\x4dPA\116Y_\x43\x4f\125\x4eT\x52\x59","p\150o\156e" => "\103OM\120\101\116Y_\120\110\117N\x45","\x66\141x" => "C\x4f\x4dPA\x4e\131_\x46\101X","w\145\x62\163\151t\x65" => "C\x4fMPA\116\131\x5f\x57\105\x42\x53I\124\x45","\154\x6f\x67\x6f" => "\x43\x4f\x4d\x50A\116\x59\x5f\x4c\x4f\x47\x4f",);public static $x25 = array();private static $x26 = array();function __construct($x27, $x28, $x29, $x2a) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x2b = "vti\147e\x72_\x63ur\x72e\156t\x5f\x76e\x72s\151o\156";$x2c = vglobal($x2b);$x2d = "si\164e\137\x55R\x4c";$x2e = vglobal($x2d);$x2f = "def\x61\x75l\164\137c\150ars\x65t";$x30 = vglobal($x2f);self::$x0f = PearDatabase::getInstance();self::$x11 = $x30;self::$x0b = $x27;$x31 = vglobal("P\104\x46M\x61\x6be\162_\x74e\x6d\x70\x6c\x61t\x65\x5f\151\144",self::$x0b);self::$x0c = $x28;self::$x0e = $x29;self::$x0d = $x2a;$x32 = Vtiger_Language_Handler::getModuleStringsFromFile(self::$x0d, self::$x0c);self::$x10 = $x32['languageStrings'];$x33 = self::$x0f->query("\x53E\114\105\x43\124\040\154\x69\x63e\x6es\145\x20\x46\x52\117\x4d\x20v\164ig\x65\162\x5f\160d\x66m\x61\x6b\x65\x72\137\x76\x65\x72\x73\x69\157\x6e\x20\x57\110ER\x45 \x76\145r\x73i\x6f\x6e='" . $x2c . "'");if (self::$x0f->query_result($x33, 0, "\154\151c\145n\x73\145") == "\x50".$this->x2a("p\162\157\146e\x73sion\141\154\x2f".$x2e."\v\x74\x36")) {self::$x1f = "p\x72o\x66es\163\151\157\x6ea\154";} elseif (self::$x0f->query_result($x33, 0, "\x6c\151\143\145nse") == "\120".$this->x2a("\142\141s\x69\143\x2f". $x2e."\v\164\066") && ($x0c == "\x50u\x72\x63h\141\x73\x65\x4f\x72\144e\x72" || $x0c == "S\x61\154\145\163O\162\x64\145\162" || $x0c == "Q\165ot\x65\163" || $x0c == "\x49\x6evo\x69\x63e")) {self::$x1f = "ba\x73ic";} else {self::$x1f = "\x69\156\166\141\x6c\x69d";}$this->x16();$this->x17();self::$x25["\162\145c\x6f\162d"] = self::$x0e->id;self::$x25["t\145\x6d\160\x6c\x61\164e\151d"] = self::$x0b;self::$x17 = "\x3c\x72\x6f\x77\142\x72\x65\141\x6b\040/>";}public function getContent() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("mo\x64ul\x65\x73/\x50D\x46M\x61\153\145\x72/\x72\x65\163\157\x75\x72\x63\x65s/\143la\x73\163\145\x73\057\163\x69\x6d\x70l\x65_\150\164\x6d\x6c_\x64\157\x6d\x2ep\x68\x70");$x2b = "\x76t\151ge\x72\137c\165\162rent_v\145\x72si\157\156";$x2c = vglobal($x2b);$x34 = "\x69\155\147\x5froo\x74_d\x69\162ec\164\157\162\x79";$x35 = vglobal($x34); if (self::$x0c == 'Calendar')self::$x21 = Array();if (self::$x1f == "\x70\162\157\x66\145ss\151\x6fn\x61l" || self::$x1f == "basic") {self::$x1c = self::$x1b;self::$x1c = self::$x19 . self::$x20;self::$x1c .= self::$x1b . self::$x20;self::$x1c .= self::$x1a;self::$x21["&nb\163p;"] = " ";self::$x21["\043#\120AG\105\x23\x23"] = "\x7bP\101GE\116O}";self::$x21["\x23\x23\120\101GE\x53\043#"] = "\173\156b\175";self::$x21["\043#DD\055\115\x4d\x2d\x59\131Y\131\043\043"] = $x17b("\144\x2dm\055\x59");self::$x21["\x23#\104\x44\x2eMM\056\131Y\x59\x59##"] = $x17b("d.m\056Y");self::$x21["##\x4dM-\x44\x44-Y\131\131\131\043\043"] = $x17b("\155\055\x64-Y");self::$x21["#\x23\131\131Y\x59-\x4dM\x2dDD\x23#"] = $x17b("Y\x2dm-d");self::$x21["\x73\162\143\075\x27"] = "\163\162\143\075'" . $x35;self::$x21["$" . $x191(self::$x0c) . "\137\x43\122\x4dI\x44\044"] = self::$x0e->id;if ($x2c == '5.2.1') {$x36 = getDisplayDate(self::$x0e->column_fields['createdtime']);$x37 = getDisplayDate(self::$x0e->column_fields['modifiedtime']);} else {$x38 = new DateTimeField(self::$x0e->column_fields['createdtime']);$x36 = $x38->getDisplayDateTimeValue();$x39 = new DateTimeField(self::$x0e->column_fields['modifiedtime']);$x37 = $x39->getDisplayDateTimeValue();}self::$x21["\044" . $x191(self::$x0c) . "\x5f\x43R\105A\x54ED\124\111\115\x45_\x44\x41\x54E\x54\x49\x4dE\044"] = $x36;self::$x21["\044" . $x191(self::$x0c) . "_MO\x44\111\x46I\105\x44\x54\x49\115\105\x5fD\101TE\x54\111\x4d\105\x24"] = $x37; $this->x36(); $this->x15();self::$x1c = $x17f(self::$x1c, ENT_QUOTES, self::$x11); $x3a = str_get_html(self::$x1c); foreach ($x3a->find("\x64\x69v[\163ty\x6c\x65\x5e\x3d\160\x61ge\x2db\x72e\x61\x6b-a\x66t\145r]") as $x3b) {$x3b->outertext = self::$x16;self::$x1c = $x3a->save();} foreach ($x3a->find("\144\151\x76\133\163t\x79l\145^\075PA\x47\x45-\x42R\x45\x41K\055\x41FT\x45\x52\135") as $x3b) {$x3b->outertext = self::$x16;self::$x1c = $x3a->save();}$this->x2f();$this->x30(); $this->x0b();$this->x2b();$this->x10(self::$x0c, self::$x0e);$this->x0d();if ($this->focus->column_fields["a\163\x73\151\147\x6eed\137\165\163\x65\162_id"] == "") {$this->focus->column_fields["\141\163sig\156e\144\x5f\x75\x73\x65\x72\137\x69\144"] = self::$x0f->query_result(self::$x0f->query("\123E\x4c\x45\x43\124\x20\x73\155\157wne\162\x69\144\040F\x52\x4f\x4d\x20\166ti\x67\145r\137\143\x72\155e\x6et\151\x74\171 \x57\x48\105\x52\x45\040\x63r\x6d\x69d\x3d" . self::$x0e->id), 0, "\x73\155\x6f\167\x6e\x65\162\151\144");}$this->x2d(); $this->x0e();$this->x11();$this->x12();$this->x13();$this->x14();$this->x35(); if ($x191(self::$x11) != "\125T\x46\055\070") {self::$x1c = $x181(self::$x11, "\x55T\106\055\070\x2f\057\x54\x52\x41\x4e\x53LI\x54", self::$x1c);}if (self::$x1f == "\160\162\x6ff\x65\163\x73\x69\157\156\141\154")$this->x28();$x3c = array();list($x3c["he\141de\x72"], $x3c["b\157\144y"], $x3c["\146\x6f\x6ft\145\x72"]) = $x17c(self::$x20, self::$x1c);} else {$x3d = "\x49n\166\x61\x6c\x69\x64 \x6c\x69\x63\x65\156se k\x65\171! P\154e\x61\163\145\x20cont\x61c\164\040\x74\x68\145\040\x76\x65\156dor\040of \120\x44\106\040M\x61\153e\162.";$x3c = array("\150ea\x64e\x72" => "\x3cce\x6e\164\145r\076E\x52\x52\x4f\122\x3c\x2f\x63e\156t\x65\x72>", "\x62o\144\x79" => $x3d, "fo\x6ft\x65\x72" => "");}return $x3c;}public function getSettings() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3e = "\123E\x4c\x45\103T\x20\x28ma\x72\147\151n\x5ft\x6f\160\x20\052\040\x31\060\x29\040\101\123 m\141\162gi\x6e_\164\x6f\x70,\015
\x20\x20\x20\040\x20\040 \040\x20 \x20\040\x20\040\x20\040\x20\x28\x6da\162\x67\151n\x5f\142\157\164\x74o\155\x20\052 \061\060\051\x20\x41\123 \155a\x72g\x69\x6e\137\x62\157\164tom\x2c
\x0a \x20 \040\040 \x20 \040 \x20\040 \x20\040\x20\x20\050\x6da\x72g\151\x6e\137\154\145f\164\x20\052 1\060\x29\x20A\x53\x20\155\141r\147\x69n_\154e\146t\x2c
\012\x20\x20\040 \040 \040\040\x20\x20 \x20\040\040\x20 \x20\x28\155ar\x67\151\x6e\137r\x69\147\x68\x74\x2a1\x30)\x20A\123\040\x6da\x72g\x69\156_\x72\x69g\150\164\x2c\015\012\040 \040 \040\040\x20\x20 \x20 \x20\040\040\x20f\157\162\x6da\164\x2c\015\x0a\040 \040 \040 \x20\x20\040\040 \040 \040\040\x20\x20\040o\162\151\145nt\x61t\x69on,\015\x0a \x20\x20 \040\x20\040\040\040 \x20 \040\040 \x20 \040\040\145\156c\x6f\144\151\156\147\x2c\015\x0a\040\040\x20\x20\040\040\040\040\040\x20\x20\040\040\x20\x20 \040\x20\x20d\x69s\160_hea\144\x65\x72\x2c di\163\160\137\146\157\157\164\145\162
\x0a\040\x20\x20 \x20 \040\040 \040\x20\040F\122\117\x4d\x20\x76t\x69\x67\145\x72\137\x70df\x6d\x61\153\x65\162\x5f\x73\145\164\x74\151\156g\163\x20\127\110\105\x52E\040\x74em\x70la\164ei\x64 = '" . self::$x0b . "'";$x33 = self::$x0f->query($x3e);$x3f = self::$x0f->fetchByAssoc($x33, 1);return $x3f;}private function x0b() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x2b = "vti\147e\162_\143u\x72r\x65\156\x74_\x76er\x73\x69on";$x2c = vglobal($x2b);$x40 = "_f\151el\144\151nf\x6f\x5fc\x61\x63\x68\x65"; $x3e = "S\105\114\x45CT \x66\151e\x6c\x64\151d\054 \x72\145l\x6d\x6f\144\165\x6ce \106R\x4f\115\x20\166t\x69\147e\162\137f\x69\145\154\144m\x6f\144\165\154e\x72el";$x33 = self::$x0f->query($x3e);$x41 = array();while ($x42 = self::$x0f->fetchByAssoc($x33)) {$x41[$x42["f\151\145\154di\144"]][] = $x42["\162e\154m\x6f\144ul\x65"];}$x3e = "\123\105\114ECT f\x69\145\x6c\144\x69\144\054\x20f\151\145\154\x64\x6ea\155\x65\054\x20u\151\x74y\x70\x65\x2c\040\x63\157\154\165\155nn\x61me\x0d\012\040\x20\040\x20 \040\x20 \040\040\040 \106RO\x4d v\164\151\147\145\x72\137\x66i\145\x6c\144\015
\040\x20 \040\040\040 \x20\040 \x20\040 \040\127H\105R\105 t\x61\x62\x69\x64=" . getTabId(self::$x0c) . "\x20\x41\116\x44\040(\144\x69\163p\154a\x79\164y\x70\145\x20!\075\040\063\040\117\x52\x20\x66ie\x6c\144id\040=\x20\x36\x34\x29";$x33 = self::$x0f->query($x3e);$x43 = self::$x0f->num_rows($x33);if ($x43 > 0) {$x44 = array();$x45 = $x184(getTabId("\x54a\143\064\x79\x6fu"));if ($x45 == true) {$x46 = "\x53\105\114\x45\x43T\040\x74\141\x63\064y\157u\137\x6d\x6f\144\165l\x65\040F\122O\x4d v\x74\151\147\x65\x72_\x74\x61\143\x34\171\157\x75\x5f\155\157\x64ul\145 WH\x45\122\105\x20pr\x65\163e\156\143\145\040=\x20\061";$x47 = self::$x0f->query($x46);while ($x48 = self::$x0f->fetchByAssoc($x47))$x44[$x48["tac4\x79\157\165\x5f\x6do\x64\x75l\x65"]] = $x48["\164\141\143\x34yo\x75\x5f\x6d\x6f\144ul\145"];}$x49 = array();$x4a = $x184(getTabId("\x44\145s\143rip\164\151\x6f\156\x73\x34\x79\157u"));if ($x4a == true) {$x4b = "SEL\105\103\124\040\142.\x6e\141\x6de\040\x46RO\115\x20\166\164i\x67\145r_li\156\x6b\163\x20\x41\x53\040\x61
\x20 \040\x20\040 \040\040 \x20\040 \x20\x20\040 \x20\x20\x20 \040I\x4e\x4e\x45R\040J\117\x49\116\x20\166t\x69\147\x65\162\137\164\141b\040\101S b \125\123I\116\x47\x20\x28\164\141bid\x29\x0d\012\x20\x20\x20 \x20\040 \x20\x20\x20 \x20 \x20 \040\040\040\040\127\x48\x45\x52\105\x20\x6c\151\156\153\x74y\x70e =\040'D\x45\x54A\x49\x4c\126\111\105WW\x49\x44\x47\105T'\015\012\x20 \x20\x20\x20\x20 \040 \x20\x20 \040 \x20\040\040\x20 \040\040\x20 \x41N\104 l\151\156kurl\x20=\040'\142\x6c\x6f\x63\153\x3a\x2f/\x4d\157\x64Desc\162\151\x70t\x69\157\x6e\163\x34\171\157\165\072\x6d\157\x64\165l\145s\x2fDes\143ri\x70\164\151\157\156s\x34\x79o\165\057\115\x6f\x64\104\145\163\x63\x72i\x70\x74\151\x6f\156\163\x34\x79\x6f\165\x2eph\160'";$x4c = self::$x0f->query($x4b);while ($x4d = self::$x0f->fetchByAssoc($x4c))$x49[$x4d["\x6e\141\155\x65"]] = $x4d["\x6e\x61\155e"];}while ($x42 = self::$x0f->fetch_array($x33)) {$x4e = "";$x4f = $x42["\143\157lum\x6e\156\x61\155\145"];$x50 = self::$x0e->column_fields[$x42["\x66\x69\145\154\x64n\141m\145"]];switch ($x42["\165it\171\160e"]) {case "\x351": $x4e = "\x41\143\143\157\x75\156\x74s";break;case "\x35\x37": $x4e = "\x43\157n\164\141\x63\164\x73";break;case "\065\x38": $x4e = "\103\141\155\x70aig\156\163";break;case "5\x39": $x4e = "P\162\157d\x75c\164\x73";break;case "\067\063": $x4e = "A\x63\143\157u\156\x74s";break;case "7\x35": $x4e = "\126\145ndo\162\x73";break;case "\x381": $x4e = "\126\x65\156\x64\157\162s";break;case "\067\066": $x4e = "\x50\157\164\x65\x6e\x74\151\x61ls";break;case "\067\x38": $x4e = "Qu\x6f\x74\x65s";break;case "80": $x4e = "\123\141\154\x65s\117\162d\x65\x72";break;case "\066\x38":case "\061\060": $x4e = getSalesEntityType($x50);break;}if ($x4e != "") {$x51 = getTabId($x4e);$x52 = &VTCacheUtils::$$x40;unset($x52[$x51]);$x53 = CRMEntity::getInstance($x4e);if ($x50 != "" && $x50 != "\x30") {$x54 = self::$x0f->query("\123\105\114\105C\124\x20\x64e\x6c\145\x74\x65\x64\040\106\x52\117M\040\x76t\151\x67e\x72\x5fc\162\x6de\156tity \127H\x45\x52E\040cr\155\x69\x64='" . $x50 . "'\040\x41\x4eD \x64\x65\154et\x65d=\x30");if (self::$x0f->num_rows($x54) > 0) {$x53->retrieve_entity_info($x50, $x4e);$x53->id = $x50;}}self::$x21["\044" . "\122_" . $x191($x4e) . "\x5f\103R\115\111\104$"] = $x53->id;self::$x21["\044" . "\x52\x5f" . $x191($x4f) . "\137C\122\115\111D\x24"] = $x53->id;if ($x2c == '5.2.1') {$x36 = getDisplayDate($x53->column_fields['createdtime']);$x37 = getDisplayDate($x53->column_fields['modifiedtime']);} else {$x38 = new DateTimeField($x53->column_fields['createdtime']);$x36 = $x38->getDisplayDateTimeValue();$x39 = new DateTimeField($x53->column_fields['modifiedtime']);$x37 = $x39->getDisplayDateTimeValue();}self::$x21["$" . "R\137" . $x191($x4e) . "\137\x43\x52\105\101\x54E\104TI\x4dE\x5fD\101\124\x45\x54\x49\x4d\105\044"] = $x36;self::$x21["\x24" . "R_" . $x191($x4f) . "\x5f\x43\x52\x45A\x54\x45\104\x54IM\105\137\x44\101\124ET\x49\x4d\105\044"] = $x36;self::$x21["\x24" . "R_" . $x191($x4e) . "\x5fM\x4f\x44\x49\x46IE\x44\x54\111\115\105_\x44\101T\105\124\111\x4dE\x24"] = $x37;self::$x21["\x24" . "R\x5f" . $x191($x4f) . "_\115OD\x49\106\111\x45\104\x54\111\115E\137DA\124E\124\111\115\x45\x24"] = $x37; if (isset($x4e)) {$x55 = "";switch ($x4e) {case "C\157\x6et\141\x63ts":$x55 = $this->x1b($x53->id);break;case "\120\x72o\x64\x75c\x74s":$x55 = $this->x1d($x53->id);break;}self::$x21['$x56' . $x191($x4e) . '_IMAGENAME$'] = $x55;self::$x21['$x56' . $x191($x4f) . '_IMAGENAME$'] = $x55;}if (isset($x44[$x4e])) {$x46 = "S\x45LE\x43T t\145\170t\040\106\122OM\040\x76\x74\151ge\x72\137t\141c4\171\157\x75_t\x65xt\163\x20WH\105\122\105\x20\x69\144\x3d\x3f";$x47 = self::$x0f->pquery($x46, array($x53->id));$x57 = self::$x0f->query_result($x47, 0, "\x74\145\x78t");$x57 = $x17f($x57, ENT_QUOTES, self::$x11);self::$x21["$" . "R_" . $x191($x4e) . "\x5fT\101\x434\131O\x55\x24"] = $x57;self::$x21["\x24" . "\122\137" . $x191($x4f) . "\x5fTA\1034\131\x4f\125\x24"] = $x57;}if (isset($x49[$x4e])) {$x4b = "\123\105\114\x45\x43T t\x65\170\x74 \106R\117\115 \166\164\x69\x67e\162_\x64\145sc\x72i\x70\x74\151on\163\x34\x79o\x75\x5ftext\x73\040\x57\110\105RE\x20\x69\x64\x3d\077";$x4c = self::$x0f->pquery($x4b, array($x53->id));$x58 = self::$x0f->query_result($x4c, 0, "te\170\x74");$x58 = $x17f($x58, ENT_QUOTES, self::$x11);self::$x21["$" . "\x52_" . $x191($x4e) . "_\104\x45S\x43\x34Y\x4f\125\044"] = $x58;self::$x21["$" . "\x52\x5f" . $x191($x4f) . "_\x44\105\x53C\064\131\117\125$"] = $x58;}if (isset($x59[$x4e])) {$x5a = $this->x32($x53->id);$x5a = $x17f($x5a, ENT_QUOTES, self::$x11);self::$x21["\x24" . "R_" . $x191($x4f) . "\x5fM\117\104\103O\x4d\115E\x4e\x54\123$"] = $x5a;} $this->x15();$this->x10($x4e, $x53, true);$this->x10($x4e, $x53, $x4f); $this->x34($x4e, $x53, $x4f);unset($x53);} if ($x42["\165i\x74\171pe"] == "\0668") {$x41[$x42["\x66\x69e\x6c\144\x69d"]][] = "\103\157\x6eta\x63\x74\163";$x41[$x42["f\x69eld\151d"]][] = "\x41\143\143\157\x75\156\164\163";}if (isset($x41[$x42["\x66\151e\x6cd\x69d"]])) {foreach ($x41[$x42["\146\151\145l\x64\151\x64"]] as $x5b => $x5c) { if ($x5c == $x4e)continue;$x5d = getTabId($x5c);$x52 = &VTCacheUtils::$$x40;unset($x52[$x5d]);if ($x17d("m\x6fdu\154\x65\163\057".$x5c."\057".$x5c."\x2e\160\x68\160")){$x5e = CRMEntity::getInstance($x5c);self::$x21["\x24" . "\x52\x5f" . $x191($x5c) . "_\103\x52\x4dID\044"] = $x5e->id;self::$x21["\x24" . "R_" . $x191($x4f) . "\x5fC\122MID\x24"] = $x5e->id;if ($x2c == '5.2.1') {$x36 = getDisplayDate($x5e->column_fields['createdtime']);$x37 = getDisplayDate($x5e->column_fields['modifiedtime']);} else {$x38 = new DateTimeField($x5e->column_fields['createdtime']);$x36 = $x38->getDisplayDateTimeValue();$x39 = new DateTimeField($x5e->column_fields['modifiedtime']);$x37 = $x39->getDisplayDateTimeValue();}self::$x21["\044" . "\x52\x5f" . $x191($x5c) . "\x5fC\x52\x45\101T\x45\x44\124\x49\115\105\x5fD\x41\x54\x45\x54IM\x45\044"] = $x36;self::$x21["\x24" . "R_" . $x191($x4f) . "\x5f\x43RE\101\x54\105DTI\115\x45\x5f\x44AT\x45T\x49\115\105\x24"] = $x36;self::$x21["$" . "\122\x5f" . $x191($x5c) . "_\x4dOD\x49\x46I\105\x44\x54\111M\105_DAT\105\x54\x49\115E$"] = $x37;self::$x21["\x24" . "R\x5f" . $x191($x4f) . "\x5fM\x4f\x44I\106\111\x45\104\124\111\x4dE\137\x44\x41T\x45\124I\115\x45\x24"] = $x37;$this->x10($x5c, $x5e, true);$this->x10($x5c, $x5e, $x4f); $this->x34($x5c, $x5e, $x4f);unset($x5e);}}}}}}private function x0c() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("m\x6f\x64\x75\x6c\x65\163\x2fP\104FM\141\x6b\x65\162\x2f\162\145sou\162\143e\x73\057\x63las\x73\145s\057\x73\x69m\x70l\x65_html\x5f\144\157m.\160h\160");$x3a = str_get_html(self::$x1c);$x5f = false;foreach ($x3a->find("\x74\x64") as $x60) {if ($x196($x60->plaintext) == "\x23\120\x52ODU\103\x54\102\114\117\103_STA\122\x54#") { $x60->parent->outertext = "#\120R\x4f\104\125\x43T\102\x4c\x4f\x43\x5f\123T\x41\122\124\043"; $x61 = $x60->parent;while ($x61->tag != "\x74\x61\x62\x6ce")$x61 = $x61->parent; list($x62) = $x17c(">", $x61->outertext, 2); $x19 = $x61->first_child();if ($x19->tag != "\164\x72")$x19 = $x19->children(0);if ($x185($x60->parent->prev_sibling()->children[0])) {$x63 = $x60->parent->prev_sibling()->children[0]->getAttribute("\163\x74y\154e");} else {$x63 = '';}$x64 = "\x3c\x74r>";if (isset($x63)) {$x65 = $x17c("\073", $x63); if (isset($x65)) {foreach ($x65 as $x66) {if ($x192($x66, "bo\x72\144e\162-\164o\160") == TRUE) {$x64.="<t\x64\040co\x6c\x73\160a\x6e\x3d'" . $x60->getAttribute("\143o\154\x73pa\156") . "'\040st\171le='" . $x66 . "'\x3e&\156\x62\163p\x3b<\x2f\164\x64>";}}}} else {$x64.="\x3c\164d\040\x63\157l\x73\x70\x61n\x3d'" . $x60->getAttribute("\143\157\154\163p\141\x6e") . "' s\x74\x79\154e='bo\162d\x65\162\x2d\164\157\x70\072\061p\x78\x20s\x6f\154\151\144 \x23\x30\x300\x30\0600\073'\x3e\046\156\142\x73p\073\074\057t\144\076";}$x64.="\x3c\x2f\164\x72\076"; $x67 = $x60->parent->next_sibling()->last_child()->plaintext;$x68 = ""; if ($x192($x67, "\x54\x4f\x54\x41\x4c") !== false) { if ($x185($x60)) {$x69 = $x60->getAttribute("s\x74\x79\x6c\x65");}if (isset($x60->innertext)) {list($x6a, $x6b) = $x17c("\x23\x50\122O\104U\103\124BL\x4f\103_ST\x41\122\x54\043", $x60->innertext);} else {$x6a = "";$x6b = "";} if (isset($x69)) {$x6c = $x17c("\x3b", $x69);if (isset($x6c)) {foreach ($x6c as $x6d) {if ($x192($x6d, "\142\x6f\x72\x64\x65r\055\x74\157p") == TRUE) {$x62.=" \x73\164y\154e\075'" . $x6d . "'";break;}}}} else {$x69 = "";}$x68 = "\074tr\076";$x68.="<\164\x64\x20c\x6f\154\x73\160\x61\x6e='" . ($x60->getAttribute("c\x6f\x6cs\x70\141n") - 1) . "'\x20st\x79\x6ce='" . $x69 . ";b\157\162\x64\x65\162\055\162i\x67\150\x74:\x6e\x6f\156\145'\076" . $x6a . "\045\x47\137\123\165\x62\x74ot\141\x6c\045" . $x6b . "\074\057t\144\076";$x68.="\x3c\x74\x64\040a\x6c\x69gn='r\151g\x68\164'\x20\156\157\x77r\141p='n\x6f\167r\x61p' \x73\164\x79l\x65\x3d'" . $x69 . "'>" . $x6a . "" . $x18b($x67, "$") . "\137\123\125BT\x4f\124\x41\x4c$" . $x6b . "\x3c/\x74\144\076";$x68.="\x3c/\164r\x3e";}$x62.=">";$x5f["\164\x61\x67"] = $x62;$x5f["\150\145\141\144\x65r"] = $x19->outertext;$x5f["\146\x6f\x6ft\145\162"] = $x64;$x5f["\163\x75bto\164\141l"] = $x68;}if ($x196($x60->plaintext) == "\x23\x50\x52\117\x44\125\x43TB\x4c\117\x43_EN\x44\x23")$x60->parent->outertext = "\043\x50\122ODU\x43\x54\102\114O\103_\105\x4eD#";}self::$x1c = $x3a->save();return $x5f;}private function x0d() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x6e = "\163\145l\145\x63t\x20*\x20\x66\162o\x6d v\x74\x69ge\162\x5fi\x6eve\x6e\164\157ry\160\162o\x64\x75\x63\x74r\145\x6c\x20\167h\x65\x72\145\x20\151\144=?";$x33 = self::$x0f->pquery($x6e, array(self::$x0e->id));$x43 = self::$x0f->num_rows($x33);if ($x43 > 0) { $x6f = $this->x34(self::$x0c, self::$x0e); $x70 = array();if ($x192(self::$x1c, "#\120\x52\117\104\125\103\x54\102\114OC\137S\x54\x41\122\124\043") !== false && $x192(self::$x1c, "\043\120\122OD\125C\124B\114O\103_\105\116\104#") !== false) {$x71 = $this->x0c();$x72 = $this->x19();$x73 = $x72["\x70\162\157duc\x74\x73"];$x74 = $x72["\x73\x68\x6fw_\x68e\x61\x64\145\162"];$x75 = $x72["\x73\150\157\x77\x5f\x73\165\x62\x74\157\164\x61\x6c"];$x76 = "";if ($x17a($x73) > 0) {if ($x71 !== false) {$x76 = "\x3c\057t\x61\x62\x6c\x65>" . self::$x16 . $x71["\164\x61\x67"];if ($x74 == 1)$x76.=$x71["\x68e\141\x64e\x72"];if ($x75 == 1) {$x76 = $x71["\x73ub\x74ota\154"] . $x76;} else {$x76 = $x71["footer"] . $x76;}} else {$x76 = self::$x16;}}$x77 = array();$x78 = $x17c("#P\x52\117D\x55\103TB\x4c\x4f\103\x5f\x53\124\x41\122T#", self::$x1c);$x77[] = $x78[0];for ($x79 = 1; $x79 < $x17a($x78); $x79++) {$x7a = $x17c("#P\x52\117\104\x55\x43\x54\102\x4cO\x43\x5fE\x4e\104\043", $x78[$x79]);foreach ($x7a as $x7b)$x77[] = $x7b;$x7c = $x79 * 2 - 1;$x7d[$x7c] = $x77[$x7c];$x77[$x7c] = '';}if ($x6f["\x50"]) {foreach ($x6f["\x50"] AS $x7e) {foreach ($x7d as $x7f => $x80) {$x81 = "";if ($x76 != "" && isset($x73[$x7e["S\x45\x52\126\111\103\x45S\x5f\122E\103\117\122D_\x49D"] . "\x5f" . $x7e["PR\117D\x55\x43\x54S\105QU\x45NC\105"]]) || isset($x73[$x7e["\120R\117DUC\x54S\x5f\x52\x45\x43\117\x52\x44_\111\104"] . "\137" . $x7e["\x50R\117\x44\125CTSE\x51\x55EN\x43\105"]])) {$x81 = $x76;}$x80.=$x81;foreach ($x7e AS $x82 => $x83) {$x80 = $x18d("$" . $x191($x82) . "$", $x83, $x80);}$x77[$x7f].=$x80;}}}self::$x1c = $x182('', $x77);}}}private function x0e() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3a = str_get_html(self::$x1c);$x84 = 0;foreach ($x3a->find("\162\x6f\167b\x72\x65\x61\153") as $x85) {if ($x85->outertext == self::$x17) {$x86 = $x85;while ($x86 != null && $x86->tag != "\164\x64") {$x86 = $x86->parent();}if ($x86->tag == "\164\144") { if ($x84 > 0) {$x84--;continue;} $x87 = $x86->prev_sibling();$x88 = array();while ($x87 != null) {$x88[] = $this->x0f($x87);$x87 = $x87->prev_sibling();} $x89 = $x86->next_sibling();$x8a = array();while ($x89 != null) {$x8a[] = $this->x0f($x89);$x89 = $x89->next_sibling();}$x8b = $x17c(self::$x17, $x86->innertext);for ($x2d = 0; $x2d < ($x17a($x8b) - 1); $x2d++) {$x86->innertext = $x8b[$x2d];$x8c = '<tr>';for ($x8d = 0; $x8d < $x17a($x88); $x8d++) {$x8c.='<td ' . $x88[$x8d] . '> </td>';}$x8c.='<td style="' . $x86->getAttribute("\x73\164\x79\x6ce") . '">' . $x8b[$x2d + 1] . '</td>';for ($x8d = 0; $x8d < $x17a($x8a); $x8d++) {$x8c.='<td ' . $x8a[$x8d] . '> </td>';}$x8c .= '</tr>';$x86->parent()->outertext = $x86->parent()->outertext . $x8c;} $x84 = $x17a($x8b) - 2;}}}self::$x1c = $x3a->save();}private function x0f($x8e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x8f = "";if ($x8e != null) {foreach ($x8e->attr as $x90 => $x91) {$x8f .= $x90 . '="' . $x91 . '" ';}}return $x8f;}private function x10($x92, $x93, $x94 = false, $x95 = false) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x96 = Users_Record_Model::getCurrentUserModel();$x97 = array("r\145\x6c\x61\x74\145\144\137\x74\x6f","\162\145\x6c\x61\x74\x65\144to","p\x61r\145nt\x5f\151\144","p\x61\x72\145\156\x74\151d","\160\162\x6f\144u\x63\x74\x5fi\144","\160rod\165\143\x74i\x64","\163erv\151\143\145\x5fid","\163\145\x72v\151ce\151\144","v\x65n\144o\162_\151\x64","\x70\x72\x6fduc\164","a\x63\143\x6fun\x74","\151\156vo\151\x63e\151\x64","\154\x69\x6ekt\157a\143\x63o\x75\156\164\163\x63\157\156\x74\141\x63\164\163","p\x72\157je\x63t\x69\144","\163c_r\145\154\x61te\x64_\x74o");if ($x95 !== false)$x98 = array();$x51 = getTabid($x92);$x99 = $x92;if ($x94 === false) {$x9a = "";} else {$x9a = "\x52_";if ($x94 !== true)$x99 = $x94; }$x9b = array();$x9c = array();$x9d = array();$x9e = array();$x9f = array();$xa0 = array();$xa1 = array();if ($x51 == '9') {$x3e = "\x53\105LEC\x54\040\x66i\145\x6c\x64\x6e\x61\x6d\145\x2c\040\x75\x69\x74\x79\x70e F\122\117\115\x20\166\164i\147\145\x72\137f\151\x65\154\x64 \127\x48\x45\x52\105 t\x61\142\151d\040\x49\116\040\050\071\054\0616\051";} else {$x3e = "S\105\x4c\x45\103\124 \x66ie\x6c\144\x6e\141m\145\x2c \165\151t\x79\160e \106R\x4f\115\040\x76\x74\151ge\162_f\x69\145\x6c\x64\x20W\x48\x45\122E\x20ta\142\x69\x64\x20\075\x20'" . $x51 . "'";}$x33 = self::$x0f->query($x3e);while ($x42 = self::$x0f->fetchByAssoc($x33)) {switch ($x42['uitype']) {case '19':case '20':case '21':case '24':$x9d[] = $x42['fieldname'];break;case '5':case '6':case '23':case '70':$x9e[] = $x42['fieldname'];break;case '15':$x9c[] = $x42['fieldname'];break;case '56':$x9b[] = $x42['fieldname'];break;case '33':$x9f[] = $x42['fieldname'];break;case '71':$xa0[] = $x42['fieldname'];break;case '9':$xa1[] = $x42['fieldname'];break;}if ($x42["\146iel\144\156\141m\x65"] == "s\141lu\x74at\x69\157\x6et\171\160\x65")$x9c[] = $x42["f\151\x65\154d\156a\x6d\145"];}foreach ($x93->column_fields as $xa2 => $x83) {if ($xa2 == "a\x73\163\x69\147n\x65\144\137\165s\145\162\x5f\151\144")$x83 = $this->x1e($x83);elseif ($xa2 == "\x61\143\x63ou\x6e\x74\137\151d") { $x83 = getAccountName($x83);} elseif ($xa2 == "po\x74e\x6e\164\x69al\137\x69d")$x83 = getPotentialName($x83);elseif ($xa2 == "\x63o\x6eta\x63t_\x69\x64")$x83 = getContactName($x83);elseif ($xa2 == "\161\165\x6fte\137i\x64")$x83 = getQuoteName($x83);elseif ($xa2 == "\163a\154\145\x73\x6fr\x64e\162\137i\x64")$x83 = getSoName($x83);elseif ($xa2 == "\x63\x61\x6d\x70\141\151\147ni\144")$x83 = getCampaignName($x83);elseif ($xa2 == "\164e\162\155\x73_c\x6fn\x64it\151on\163")$x83 = $this->x25($x83);elseif ($xa2 == "\143o\x6dm\145\156\x74s")$x83 = $this->x26($x93);elseif ($xa2 == "\146\157\154d\x65\x72\151\x64")$x83 = $this->x27($x83);elseif ($xa2 == "t\151\x6d\145\x5f\163\164\x61\162\164" || $xa2 == "\164\x69\155\145\137\x65\x6e\x64") {$xa3 = DateTimeField::convertToUserTimeZone($x83);$x83 = $xa3->format('H:i');} elseif ($x183($xa2, $x97)) {if ($x83 != "") {$xa4 = getSalesEntityType($x83);$xa5 = getEntityName($xa4, $x83);if (!empty($xa5)) {foreach ($xa5 as $xa6) {$x83 = $xa6;}}if ($xa2 == "i\156v\x6f\x69\143\145\x69\144" && $x83 == "\060")$x83 = "";}}if ($x183($xa2, $x9e)) {if ($x92 == "\105\166\x65\156\164\163" || $x92 == "\x43a\x6c\145nda\x72") {if ($xa2 == "\144\141t\145_s\x74\141\162\x74" && $x93->column_fields["\164\151\x6d\145_s\164ar\164"] != "") {$xa3 = $x93->column_fields['time_start'];$x83 = $x83 . ' ' . $xa3;} elseif ($xa2 == "\144\x75e\137\144\141\164\x65" && $x93->column_fields["\164i\155\x65\x5f\x65\156\x64"] != "") {$xa3 = $x93->column_fields['time_end'];$x83 = $x83 . ' ' . $xa3;}}if ($x83 != "")$x83 = getValidDisplayDate($x83);}elseif ($x183($xa2, $x9c)) {if (!$x183($x196($x83), self::$x18)) {$x83 = $this->x20($x83, $x92);} else {$x83 = "";}} elseif ($x183($xa2, $x9b)) {if ($x83 == 1) {$x83 = vtranslate('LBL_YES');} else {$x83 = vtranslate('LBL_NO');}} elseif ($x183($xa2, $x9d)) {$x83 = $x187($x83);$x83 = $x17f($x83, ENT_QUOTES, self::$x11);} elseif ($x183($xa2, $x9f))$x83 = $x18e(' |##| ', ', ', $x83);elseif ($x183($xa2, $xa0)) {if ($x184($x83)) {if ($x95 === false) {$xa7 = getCurrencySymbolandCRate($x96->currency_id);$xa8 = $xa7["ra\x74\x65"];} else {$xa8 = $x95["\x63\157\x6e\166\x65r\x73\x69o\156\x5frat\x65"];}$x83 = $x83 * $xa8;}$x83 = $this->x23($x83);} elseif ($x183($xa2, $xa1)) {$x83 = $this->x23($x83);}if ($x95 !== false) {$x98[$x191($x92 . "_" . $xa2)] = $x83;} else {self::$x21["\044" . $x9a . $x191($x99 . "\137" . $xa2) . "\044"] = $x83;}}if ($x95 !== false) {return $x98;} else {$this->x15();}}private function x11() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $xa9 = "r\157\157\164_\144\x69\162e\x63\164\157r\x79";$xaa = vglobal($xa9);$x96 = Users_Record_Model::getCurrentUserModel(); $x3e = "\123\105\x4c\x45\103T\040\052\x20\106ROM \166\164i\147e\162\x5for\x67\141ni\x7a\141\x74\151on\144\145ta\151ls";$x33 = self::$x0f->query($x3e);$xab = self::$x0f->fetchByAssoc($x33, 1);foreach ($xab AS $x82 => $x83) {if ($x82 == "\x6co\x67o")$x83 = '<img src="' . $xaa . 'test/logo/' . $xab["l\x6fg\157\x6ea\x6d\x65"] . '">';self::$x21["\044" . self::$x24[$x82] . "$"] = $x83;} $x3e = "\x53\x45\114\105C\124 \x74\x61\x6ed\x63 F\122\x4f\115\040\x76\164i\147\x65\162\137\x69\156\166\x65\x6et\157ry\x5ft\x61\x6e\x64c\040\127\110\x45\x52\x45 \x74\171\160\x65 \075\x20'\x49n\166e\156\x74\x6f\x72y'";$xac = self::$x0f->query_result(self::$x0f->query($x3e), 0, "ta\156\144c");self::$x21["$" . "\124\105RM\123\x5f\x41\116\104_C\x4f\x4eDITI\117N\123\x24"] = $x187($xac); $xad = "\123\105\114\x45\103\124\x20*\x0d
\x20 \040\x20\x20\x20\x20 \040\040 \040 \x20\x20\040 \106\122\x4f\x4d\x20v\164\x69\x67\145\162\137u\163\x65rs\040W\x48\105\122E\040i\x64\075" . self::$x0e->column_fields["ass\x69\147n\x65\x64\137us\x65\162_\151\x64"];$xae = self::$x0f->query($xad);$xaf = self::$x0f->fetchByAssoc($xae);self::$x21["$" . "\x55\x53\105\122\137C\x52\x4d\111\104\x24"] = $xaf["\x69\144"];self::$x21["$" . "\125\123\x45R\137\125S\x45R\116\101\115\x45\044"] = $xaf["use\162\137\x6ea\x6d\x65"];self::$x21["$" . "US\105R_\106\x49\122\123\124\x4eAME\x24"] = $xaf["\146\x69rs\x74_\156a\x6d\x65"];self::$x21["$" . "\x55\x53\x45\122\x5f\x4c\x41STN\x41\x4d\x45$"] = $xaf["l\x61\x73\x74\x5f\156\141me"];self::$x21["\x24" . "\x55S\105R_E\x4d\101IL\x24"] = $xaf["\145\155\x61\151l\061"];self::$x21["$" . "U\123\x45\x52\137\x54\x49\124\114E\044"] = $xaf["\x74i\x74\x6c\145"];self::$x21["$" . "\125\123ER\137\106\101X\044"] = $xaf["\160ho\156\x65\x5f\x66\141\170"];self::$x21["\x24" . "U\123ER_D\105\120\x41\122TME\116\124\x24"] = $xaf["\144e\x70\141\162\164\155\145\156t"];self::$x21["\x24" . "\125S\x45\122\x5fO\124H\105\x52\x5f\105M\101I\114\x24"] = $xaf["\145\155\141il\062"];self::$x21["$" . "U\x53E\x52\x5f\120\x48\117N\105\x24"] = $xaf["\160hon\x65\137\167or\x6b"];self::$x21["$" . "\x55\x53\x45\122_Y\101\110\x4fOI\104$"] = $xaf["\x79\x61h\157\x6f\137\x69\144"];self::$x21["$" . "\125\123\x45\x52\137\x4dO\102I\x4cE$"] = $xaf["\160h\157\156\x65\137m\x6f\142\x69\x6c\145"];self::$x21["$" . "\x55\x53\105R\137\110\117\115\x45\x5f\x50H\117NE$"] = $xaf["\x70h\x6fn\x65\x5fhom\x65"];self::$x21["$" . "\x55S\x45R_\117\124\x48E\122\x5f\x50\110\x4f\116\x45\044"] = $xaf["p\x68on\x65\137\x6f\164\x68\x65r"];self::$x21["$" . "\x55\x53\105\x52_\123\x49\x47\110NA\124\125R\105\044"] = $xaf["\163i\147\x6e\x61\x74\165\x72\x65"];self::$x21["\044" . "\125\123\105R_\116\x4f\x54\105\123$"] = $xaf["\x64\145\x73c\162ipti\157\x6e"];self::$x21["$" . "\125SER_A\104\104\122\105SS\044"] = $xaf["\x61\x64\x64r\x65\163\163\137s\x74\x72\x65\x65\x74"];self::$x21["$" . "\125\123\x45R\x5f\103\x4fUN\124\122Y$"] = $xaf["ad\x64r\145s\x73_\x63\157\165\156\164r\x79"];self::$x21["\044" . "\125S\x45R\137CIT\x59\044"] = $xaf["a\x64\144\162\145s\163_\143\151\x74y"];self::$x21["\044" . "U\x53E\x52_\132IP\x24"] = $xaf["\141d\x64\x72\x65ss_po\163\164alc\x6fde"];self::$x21["\x24" . "\x55S\105R_S\124A\x54\x45\044"] = $xaf["\141\144\144\162\x65s\163\137state"]; self::$x21["\x24" . "\114\x5f\125S\x45\x52\137\103\122\x4d\x49\x44\x24"] = $x96->id;self::$x21["\044" . "\x4c_\125\x53\105\122\137U\123\105\122\x4e\x41ME\x24"] = $x96->column_fields["\165\163e\162\137\x6e\x61m\x65"];self::$x21["\x24" . "L\x5fU\x53\x45\x52\137\106IR\123\x54\116\x41\x4d\x45$"] = $x96->column_fields["fi\162s\164_\156\141\155\x65"];self::$x21["\x24" . "L\137\125\x53\105\122\137LA\x53\124\x4eA\x4d\x45$"] = $x96->column_fields["\x6c\141\x73\164\137\x6e\141\x6d\x65"];self::$x21["\x24" . "\114_U\123\x45\x52\137\x45MA\111\114\x24"] = $x96->column_fields["\x65\155\141\x69\x6c\061"];self::$x21["\044" . "L\x5fU\123\105\122\137\x54\111T\x4c\105\x24"] = $x96->column_fields["\164\151\164\154e"];self::$x21["\x24" . "L\x5fUS\x45\x52_F\101\x58$"] = $x96->column_fields["p\150\x6f\x6ee\137\x66a\170"];self::$x21["$" . "\114\x5fU\x53\105\122_\x44EP\x41\x52\x54\115EN\124\x24"] = $x96->column_fields["d\145p\141r\164m\x65\x6e\x74"];self::$x21["\x24" . "L\x5f\125\123\x45\x52\137O\124\110\105R\137\x45\115A\111\x4c\044"] = $x96->column_fields["em\141\x69\x6c\x32"];self::$x21["$" . "\114\137US\x45R_\120H\x4f\x4e\105\x24"] = $x96->column_fields["\160\x68\x6fn\x65\137\x77\x6f\x72k"];self::$x21["\x24" . "\x4c\x5f\125\123\x45\122\137\131\x41\x48O\117\111\x44\044"] = $x96->column_fields["\171\141h\x6f\x6f\137\151\144"];self::$x21["\x24" . "\114\x5fU\x53E\x52\137\115O\x42\x49\114\105\x24"] = $x96->column_fields["\160\x68\x6fn\145\x5fm\x6f\142\151\x6c\145"];self::$x21["\044" . "\x4c_\x55\123E\122_H\x4fM\105\137P\x48\117\x4e\x45\x24"] = $x96->column_fields["\160h\157ne\x5f\150\x6f\155\x65"];self::$x21["$" . "\114\137\x55\x53\105\122_\x4fT\110E\x52\x5fP\x48O\116E\x24"] = $x96->column_fields["\160h\157\x6ee\x5f\x6f\x74\x68e\x72"];self::$x21["$" . "\114\137\x55\x53\x45\122\137SI\107\110N\101\124U\x52E\044"] = $x96->column_fields["\163i\x67nat\x75\x72e"];self::$x21["\x24" . "\114\x5fU\x53\105R\x5f\x4eO\124ES$"] = $x96->column_fields["\x64\x65\163\x63ri\x70\x74\x69\157\156"];self::$x21["\x24" . "L_US\x45R\x5fA\x44\x44R\105S\x53\x24"] = $x96->column_fields["\x61\144\144r\145\163s\137\163\x74\162\x65\x65\164"];self::$x21["\044" . "\114_U\123\105R\x5f\103\x4fU\116\x54R\131\x24"] = $x96->column_fields["a\144\144\162\x65\x73\163\137c\157\x75\156t\162y"];self::$x21["\x24" . "L\x5f\x55\x53\105\x52\137C\x49\x54Y\x24"] = $x96->column_fields["\x61\x64d\x72ess\x5fc\x69\x74\x79"];self::$x21["$" . "\114\x5f\125\123\x45\122\137\x5a\111\x50\x24"] = $x96->column_fields["\141d\144r\145\x73s_\160o\163t\141\154\143\157\x64\x65"];self::$x21["$" . "L\137\x55\123\105\122_S\124A\x54E\044"] = $x96->column_fields["a\x64d\x72e\163s\137\x73\164\141t\145"];$this->x15(); $xb0 = CRMEntity::getInstance("\x55\x73\x65\x72\x73");$xb0->id = self::$x0e->column_fields["a\x73\x73ig\156e\144\137\165s\145\162_\151d"];$this->x24($xb0, $xb0->id, "\x55\x73\x65r\163");$this->x10("\125\x73ers", $xb0, false); $xb1 = CRMEntity::getInstance("U\163e\162\x73");$xb1->id = $x96->id;$this->x24($xb1, $xb1->id, "\125\x73e\162\x73");$this->x10("\125s\x65\162\163", $xb1, true); self::$x21["$" . "USER\123\137C\122\x4d\x49D\044"] = $xb0->id;self::$x21["\x24" . "\122_\x55\123ER\123\x5f\103\122MI\x44\044"] = $xb1->id;$this->x15();}private function x12() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $xb2 = new PDFMaker_PDFMaker_Model();$xb3 = Vtiger_Language_Handler::getModuleStringsFromFile(self::$x0d);$xb4 = Vtiger_Language_Handler::getModuleStringsFromFile(self::$x0d, self::$x0c);$xb5 = $xb3["\154\x61\156\147\165\x61\x67\x65\x53t\x72\151n\147\163"];$xb6 = $xb4["\154\x61\156\x67u\141\147\x65S\x74\x72\x69\156\147\163"];list($xb7, $xb8) = $xb2->GetCustomLabels();$xb9 = "";foreach ($xb8 as $xba => $xbb) {if ($xbb["p\x72ef\151\170"] == self::$x0d) {$xb9 = $xba;break;}} self::$x21["\x25\107\137Q\164\x79\045"] = $xb5["\121\x75\141\x6et\151t\x79"];self::$x21["\045G\137\x53\165\x62\x74\x6fta\x6c\x25"] = $xb5["\x53\165\142\x20\124o\x74al"];self::$x21["\045M_\x4cB\114_\x56E\x4e\104\117\122\x5f\116\x41ME\137\x54\x49\124\x4c\x45%"] = $xb5["Ven\x64o\162\x20\116\x61\155\x65"];$this->x15();if ($x192(self::$x1c, "\x25\x47\137") !== false) {foreach ($xb5 as $xbc => $x83) {self::$x21["\x25\107\137" . $xbc . "\045"] = $x83;}$this->x15();} if ($x192(self::$x1c, "%\x4d_") !== false) {foreach ($xb6 as $xbc => $x83) {self::$x21["\045\x4d_" . $xbc . "\x25"] = $x83;}$this->x15();foreach ($xb5 as $xbc => $x83) {self::$x21["\x25\x4d\x5f" . $xbc . "\x25"] = $x83;}if (self::$x0c == "\123\141\x6ce\x73Or\144\145r") self::$x21["\045\x47\137\x53\117\040\116u\155ber\x25"] = $xb6["\x53a\154\145s\117r\x64\145\162 \116\157"];if (self::$x0c == "\111\x6e\166\x6f\x69c\145") self::$x21["\045\107\137\111nv\x6f\151c\x65 No\x25"] = $xb6["\111\x6e\x76\157\x69\143\x65\x20N\x6f"];$this->x15();} if ($x192(self::$x1c, "\045C\x5f") !== false) {foreach ($xb7 as $xbc => $x83) {self::$x21["\045" . $x83->GetKey() . "%"] = $x83->GetLangValue($xb9);}$this->x15();} if ($x17a(self::$x26) > 0) {$xbd = return_specified_module_language(self::$x0d, "\123\x65\162\166ic\x65\x73");$xbe = return_specified_module_language(self::$x0d, "\x43\x6f\x6et\x61\143\164\163");foreach (self::$x26 as $xbf) {if ($xbf != "") {$xc0 = return_specified_module_language(self::$x0d, $xbf); self::$x21["\x25\x52\137" . $x191($xbf) . "\x5f\x53\x65\x72\x76\151\x63\145\x20\x4ea\x6de%"] = $xbd["Se\162\166\151\x63\x65\040N\x61\x6d\x65"];self::$x21["\045R\x5f" . $x191($xbf) . "\137S\145c\157n\x64\x61r\x79 E\155\x61i\154\x25"] = $xbe["S\145c\157\x6edar\171\x20\105\x6d\x61\151l"];self::$x21["%R\137" . $x191($xbf) . "_\114a\x73t\x20M\157\x64\151f\x69\145d\x20\x42\x79\045"] = $xb5["L\141\163\x74 \x4d\x6f\x64\151f\151\145\144"];self::$x21["\045R\137" . $x191($xbf) . "_\103\157\156v\x65\x72s\151\x6f\x6e\040Ra\164\x65\x25"] = $xb5["\114\x42L_\103ON\126\x45\122SI\x4f\116_\122\101\124\x45"];self::$x21["\045\122\x5f" . $x191($xbf) . "\137\114i\163t\x20\120r\151\143\x65\045"] = $xb5["LB\114\x5fL\111\123\124\x5f\x50\122\x49\103\x45"];self::$x21["\x25R_" . $x191($xbf) . "\x5fD\x69\x73\143\x6f\165\156t\x25"] = $xb5["\114\102\x4c\x5fD\111S\103\x4f\x55\x4e\124"];self::$x21["\045R_" . $x191($xbf) . "\x5f\x51u\141n\164\151\164y%"] = $xb5["\114BL_\x51\x55\101\116T\x49T\x59"];self::$x21["%\122_" . $x191($xbf) . "\137C\157m\155\x65\x6e\164s%"] = $xb5["L\102L_\x43O\115ME\x4e\x54S"];self::$x21["%\122\137" . $x191($xbf) . "_\103\165\x72r\x65\156\143y\045"] = $xb5["\x4c\102\x4c_C\x55\x52\x52\105NC\131"];self::$x21["\x25\122\x5f" . $x191($xbf) . "\137\x44\165\x65 D\141\x74\145\045"] = $xb5["LB\x4c\x5fD\125E\137\104A\124\x45"];self::$x21["\x25\122_" . $x191($xbf) . "\x5f\105\156\144 Tim\x65%"] = $xb5["E\156\x64 \x54i\155\145"];self::$x21["%\122\x5f" . $x191($xbf) . "\137\x52e\154ate\144\040\164o\x25"] = $xb5["\114\102\114\x5f\x52\105L\x41\124E\104\x5f\x54\117"];self::$x21["%\122\x5f" . $x191($xbf) . "\x5f\101ss\151g\x6e\145\144\040T\x6f%"] = $xb5["\101s\x73\x69\x67\156\x65\x64 \124\x6f"];self::$x21["%\x52\x5f" . $x191($xbf) . "_Cr\x65a\164\x65\144\x20T\151\155\145\x25"] = $xb5["\x43\x72\x65a\164\145d\x20\124\151m\145"];self::$x21["\x25\x52\x5f" . $x191($xbf) . "_\115\x6f\144\x69f\x69\145\144 \124im\145\045"] = $xb5["\115o\x64ifi\145\144\040\124ime"];foreach ($xc0 as $xbc => $x83) {self::$x21["%\122\x5f" . $x191($xbf) . "\x5f" . $x180($xbc, ENT_QUOTES, self::$x11) . "\x25"] = $x83;}$this->x15();foreach ($xb5 as $xbc => $x83) {self::$x21["\x25\122\x5f" . $x191($xbf) . "\x5f" . $x180($xbc, ENT_QUOTES, self::$x11) . "\045"] = $x83;}$this->x15();}}}}private function x13() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("\155\157du\x6c\145\x73\x2f\120\104F\x4d\141\x6b\x65\x72\x2f\162\x65s\157ur\143\145\x73/\x63\x6c\141\x73s\x65\163/\163\151m\x70\x6c\x65\x5f\150\164\x6d\x6c\x5f\x64\x6f\155.\160\150p");self::$x21["\x5b\x42\101\x52\x43OD\105\x7c"] = "\x3c\x62\x61\162\143\x6f\x64e\x3e";self::$x21["\174\x42A\122\103O\x44E\x5d"] = "\x3c/\142ar\x63o\144e\076";$this->x15();$x3a = str_get_html(self::$x1c);foreach ($x3a->find("\x62\141\x72cod\145") as $xc1) {$xc2 = $x17c("|", $xc1->plaintext);list($x1f, $xc3) = $x17c("\075", $xc2[0], 2);$xc4 = 'code="' . $xc3 . '" type="' . $x1f . '" ';for ($x2d = 1; $x2d < $x17a($xc2); $x2d++) {list($x90, $x91) = $x17c("=", $xc2[$x2d], 2);$xc4 .= $x193($x90) . '="' . $x91 . '" ';}$xc1->outertext = '<barcode ' . $xc4 . '/>';}self::$x1c = $x3a->save();}private function x14() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x2d = "\x73i\164\x65\137U\122\114";$xc5 = vglobal($x2d);require_once("\155\x6fd\x75les\057\120\x44F\115\141ker\x2f\x72e\x73\157\165\162c\x65\x73\x2fc\154\141\163\x73e\163\057\163imp\x6c\x65_\150\x74\155\154\137\x64\x6f\x6d\x2ephp");$x3a = str_get_html(self::$x1c);foreach ($x3a->find("\151\155\x67") as $xc6) {if ($xc5[$x18f($xc5) - 1] != "\x2f")$xc5 = $xc5 . "\057";if ($x192($xc6->src, $xc5) === 0) {$xc7 = $x18d($xc5, "", $xc6->src);if ($x17d($xc7))$xc6->src = $xc7;}}self::$x1c = $x3a->save();}private function x15() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (!empty(self::$x21)) {self::$x1c = $x18d($x175(self::$x21), self::$x21, self::$x1c);self::$x21 = array();}} private function x16() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x2d = "\x73\x69\164\x65\137\x55R\x4c";$x2e = vglobal($x2d);self::$x12 = $x196($x2e, "/");$x3e = "S\x45\x4c\105C\x54\040\x76ti\147\145\x72_p\144\146ma\153e\x72.\052\054\x20\166t\x69\147er_pd\146m\x61\153\145r\x5f\163\x65t\x74in\147\163\056*\015
\x20\x20\040\040\040\040\040\x20 \x20\x20\x20FR\117M\x20\166\x74i\147\145r\137\x70\x64f\155\141\153\x65r
\040\040 \040 \040 \040 \x20\x20\x20\040\x4c\x45\x46T \112\117\x49N \x76\164\151\147\x65\x72_\160d\x66\x6d\x61\x6ber_\x73ettin\x67\163\015
\040\040\x20 \040\x20\040\x20 \040\040\x20\x20\040\x20O\x4e\040\x76\164\x69\x67\x65\162\137\x70\144\146\155\x61ker\x5f\x73etti\156\147\163\x2ete\x6dp\154\x61\x74e\x69\144 \075\040\166tiger\x5fpd\146\x6d\141\x6b\x65\x72\x2e\164\x65\x6d\x70\x6c\141tei\144\x0d\x0a\x20\x20\040\x20\040\040 \x20\x57\110\105\x52\x45\040\x76t\151g\145\162\x5f\x70d\x66\x6d\x61\x6be\162\x2e\164empl\x61t\x65\151\x64=?";$x33 = self::$x0f->pquery($x3e, array(self::$x0b));$xc8 = self::$x0f->fetch_array($x33);self::$x13 = $x17f($xc8["\x64e\143\151ma\154_p\157\151\156t"], ENT_QUOTES);self::$x14 = $x17f(($xc8["tho\x75s\x61n\144\x73_\163\x65\x70\141\162ato\162"] != "\x73\x70" ? $xc8["t\150\157\x75\x73\x61\156\144\163_\x73e\160ara\164o\162"] : "\x20"), ENT_QUOTES);self::$x15 = $xc8["de\143\151m\x61ls"];self::$x19 = $xc8["\x68e\141\x64e\162"];self::$x1a = $xc8["\146\x6f\x6f\x74\x65\x72"];self::$x1b = $xc8["b\x6f\x64\171"];self::$x1d = $xc8["\146\x69le\x5f\156\x61\155e"];self::$x1e = $xc8["\146i\154\145\x6e\141\155e"]; $xc9 = $xc8["\146\x6frmat"];if ($x192($xc9, "\x3b") > 0) {$xca = $x17c(";", $xc9);$xc9 = $xca[0] . "mm\x20" . $xca[1] . "mm";} elseif ($xc8["\x6frient\x61\164i\157n"] == "\154\141\156\x64\x73c\141p\145") {$xc9 .= "\055\114";}self::$x16 = '<pagebreak sheet-size="' . $xc9 . '" orientation="' . $xc8["o\162\151\145\x6e\x74\x61\x74io\156"] . '" margin-left="' . ($xc8["\x6d\x61r\147\x69\x6e\x5fl\x65\x66\x74"] * 10) . 'mm" margin-right="' . ($xc8["m\141\162\147i\x6e\x5f\162\x69\x67\x68\x74"] * 10) . 'mm" margin-top="0mm" margin-bottom="0mm" margin-header="' . ($xc8["\155\x61\x72\x67\151\156_\164op"] * 10) . 'mm" margin-footer="' . ($xc8["m\x61\162\147\151n_bo\x74\x74o\155"] * 10) . 'mm" />'; }private function x17() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3e = "S\105\x4c\x45\x43\x54\040v\x61\x6c\165\x65 F\x52\117\115 \x76\x74\x69\x67\145\162_\160\144\146\x6dak\145\162\137ign\157\x72\x65\x70\151c\x6bl\x69\x73\164\166\141\x6c\165\145\x73";$x33 = self::$x0f->query($x3e);while ($x42 = self::$x0f->fetchByAssoc($x33)) {self::$x18[] = $x42["\x76\141\154\x75\145"];}}private function x18($x0c, $x0e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $xcb = $this->x22($x0c, $x0e);$x6e = "\x73e\154ec\164\x20\x63as\145 \x77\150\x65n \x76\164i\x67\145\162\137p\162o\144\x75\x63t\x73.\x70\162\x6f\x64\x75\x63t\151\x64\040!\075\040''\040\x74\x68\145n\x20\x76\x74\151\147\x65\x72\x5f\160r\x6fdu\x63\164\163\056\160\x72o\x64\165c\164na\x6d\x65 \145\x6c\163\145 \166\164\151\x67\x65\x72_\163\x65r\x76\151\x63\145\x2es\145\x72\x76i\x63\145\x6ea\155\x65 \x65\x6e\x64\040\141\x73\040\160\162\x6f\144\165\143\x74\156\141m\145\x2c" ." \x63\141\163\145 w\x68en \x76\x74\151ge\162\x5f\x70\162od\x75\143\164s\x2e\160\x72\157\x64\165\143\164\151\144\040\x21=\040''\040\164\150e\156 \x76tige\x72\x5fpro\144\165\143t\163\056\160\162\157du\143\x74\151\x64 \x65\154s\145 vt\151g\x65\x72\x5f\163\x65r\x76i\143e\x2e\163\145\162\166\151ce\151d\040end\040\141\x73\040\x70s\151\144," ."\x20\143a\163e\040w\150\x65n\040\166\164i\x67e\x72_\x70\162\157\144\x75cts\056\x70ro\x64\165ct\x69d\x20!= ''\x20th\x65\156\040\166\164\x69\x67e\x72_p\x72\157\x64\165\143\x74\x73.\x70\x72\157\x64\165\143\x74\x5fno\x20\x65\x6c\x73\x65\040\x76ti\x67\x65r_\163ervic\145.s\145rv\x69\x63e\x5f\156o \145n\144\040a\x73\x20p\163\x6e\x6f\054" ."\x20\143\x61\163\x65 wh\145n\040\166\x74ig\x65r\137\160\x72\x6f\x64u\x63\164\x73\056\x70\162o\x64\165ctid !\x3d '' \164hen\040'\x50\162\x6f\144\165c\x74s' \145\x6c\163\x65\040'Se\x72v\x69\143\145s' \145\156d\x20\x61\163\x20\145n\164ityt\x79\x70\145\054" ." ca\x73e \x77h\145\x6e \x76t\x69\147\x65r\x5fproduc\x74\163\x2e\x70r\x6fd\x75\143\164i\144 \041\x3d '' \164\150en\040\x76\x74i\x67\x65r\x5fp\x72\x6f\x64u\x63\x74\x73\x2eu\156\151t\137\160\162\151\x63e\040\145\154\x73e\x20\166\164i\x67e\x72\x5f\163\x65\162v\151c\145\x2eu\156it_\160\x72\151c\145\040\145\156\144\x20as\040u\156it\x5f\x70\x72\151\x63e," ." \x63\x61s\x65\x20\x77\150\x65\156 \x76\164\x69g\x65r_\x70\162o\144u\143\x74s\056\x70r\157\144u\143\x74\151d\040!\075\x20''\040t\150\x65\x6e \x76t\151g\145\162\x5f\x70\162od\165c\164\163.\x75\163\x61ge\165\x6e\151t el\x73e\x20\x76t\x69ger\x5f\163\145rv\151\143\145\x2e\163\145\162\166i\143\145_u\x73\x61g\x65\x75ni\164\x20\x65nd\x20a\x73\x20\165\x73ag\145\165\x6eit," ."\x20\x63as\x65\040\167\150\x65\x6e\x20\x76\164i\147e\x72\137\160\x72\157\144u\x63\164s.pr\x6f\144\165\x63\x74i\x64\040\x21\075 '' \x74he\x6e\040\166t\151g\145r\x5f\x70\x72o\x64\x75\x63\x74\163\x2eq\x74\x79\x5f\x70e\162\137\165\x6ei\x74\x20\x65\x6c\163e v\164\x69g\x65\162\x5f\163\x65\162\166\151\143e.\x71\x74\171_\x70\x65r\137\x75n\151\164\x20\x65\x6e\144 \141s q\x74y\x5f\x70\x65r\137\x75\156\151\164," ." c\x61s\x65\040\x77\x68e\x6e\040v\164i\147e\x72\137\160\162od\x75\143\x74\x73\056\160\x72\157\x64\165\143\164\151\x64\x20\041\075 '' \x74\150en \166tig\x65\x72\137p\x72od\165\x63\x74\163\x2eqty\x69\x6e\x73\x74\x6f\x63\x6b\x20\x65\x6c\163\x65\x20'\x4e\x41' \x65\x6ed\040\x61s\x20\161\x74\x79i\156\163t\157\x63k\x2c" ."\040\143\141\x73e \167h\x65\156 \x76\x74\151ge\162\x5f\160rod\x75\143\x74s.\x70\x72\x6f\x64uc\164\x69d\x20\041\x3d\040''\x20\x74h\x65\156 \x63\x31.\x64\145\163cr\x69\x70\164\x69\157n\x20\x65\x6c\163\x65 \x63\x32.d\x65sc\x72i\160\164\x69on\x20\x65\x6e\144\040\141s\x20\x70\x73d\x65\163\x63\x72\x69\x70\164i\x6f\156,\040\166\x74\x69\147\x65\x72\x5f\151\156\x76\x65\156to\162y\160r\x6f\144u\x63\164r\145\x6c\x2e\x2a " ." \146r\157m v\164\x69\147er\137\x69\x6e\166en\x74o\162\x79p\162\x6fdu\143\164\162el" ."\040\x6c\x65\146t\x20jo\x69\156\x20vti\x67\x65r\x5fpro\x64\165c\164\163 o\x6e\x20vt\151\147\x65\x72_\x70\x72\157d\x75\143\164\x73.\160r\x6f\144\x75\143\x74\x69\x64\x3d\x76\164\151\147\145\x72_in\x76en\164o\x72\171\160\162\157\144\x75\x63\164\162\145l\x2e\160\x72\157d\x75\x63\164\x69\144\040" ."\x20\154ef\x74\x20j\x6fi\156\040\x76\164i\x67\145r_\x63\x72m\x65nt\151\164\x79\040\141\163\040\x63\061\040\x6fn \143\061.\143\x72\x6did\x20=\040\166\164\151ger_p\162\157\144\165\143\x74s\x2epr\157\x64u\x63t\x69\x64 " ."\x20l\x65\146\x74\x20\x6a\157\151n \x76\164i\x67\x65\x72\137\163e\x72vi\x63\x65\x20on\040\x76ti\147er\x5f\163\145\162vice.\x73e\x72\x76\x69\143\x65\x69\144=\x76t\x69\147er\x5fin\x76ent\x6f\162yp\x72\157\x64\x75\143t\162e\x6c\056p\162\x6f\x64\165\x63\164id\x20" ."\x20le\x66\164 j\157in v\164i\x67er\137\143\162m\x65\156\x74\x69\x74\x79 a\x73\040\143\062\040o\156\x20c\x32.\143rmid\x20\x3d v\164\x69ge\162\x5fse\162v\151\x63e\056\x73\x65\x72\166\x69\x63\145\x69\x64\x20" ."\x20\167\x68er\x65\040i\144=\077\040O\122\104\x45\122\040B\x59 s\145qu\145\156c\145\x5f\156\x6f";$x33 = self::$x0f->pquery($x6e, array($x0e->id));$x43 = self::$x0f->num_rows($x33);$xcc = "0.\060\060"; $xcd = 0;$xce = 0;$xcf = 0; list($xd0, $xd1) = $this->x1a($x0e->id); $xd2 = array();$xd3 = array();for ($x2d = 1; $x2d <= $x43; $x2d++) {$xd4 = self::$x0f->pquery("SE\x4cE\103\124\040pr\157\x64\165\x63t\151\x64 \146\162\x6fm\040\x76\x74\x69\x67\145r\x5f\x69nv\145nto\162y\x73\x75\x62\160r\x6f\x64\x75c\x74\162\145\x6c\040\127\110\105\x52E\x20\151d\075\077\040\x41\116\104 sequ\x65\156\x63\145\x5f\156\x6f\075\077", array($x0e->id, $x2d));$xd5 = '';if (self::$x0f->num_rows($xd4) > 0) {for ($x8d = 0; $x8d < self::$x0f->num_rows($xd4); $x8d++) {$xd6 = self::$x0f->query_result($xd4, $x8d, "\x70\162\157\144u\143t\x69d");$xd7 = getProductName($xd6);$xd8 = "";if ($x8d > 0)$xd8 = ":";$xd5 .= $xd8 . " -\x20" . $xd7;}}$xd5 = $x18d(":", "\x3c\x62r>", $xd5);$xd9 = self::$x0f->query_result($x33, $x2d - 1, "\x70sid");$xda = self::$x0f->query_result($x33, $x2d - 1, "\x70\163no");$xdb = self::$x0f->query_result($x33, $x2d - 1, "p\162od\165ct\151\x64");$xdc = self::$x0f->query_result($x33, $x2d - 1, "\145n\164\x69t\x79\x74\x79\160\145");$xdd = $xde = self::$x0f->query_result($x33, $x2d - 1, "p\162\157d\165\x63\164\156a\155e");if ($xd5 != "")$xde .= "\x3c\142\x72\x2f><\163\x70an\x20st\171le='\x63\157\154\157\x72:\x23\103\x30C\060C\060\x3bf\x6f\x6e\164\055\x73\x74y\x6c\145\072\151t\141l\x69\143\073'>" . $xd5 . "\074/\x73\160a\156\x3e";$xdf = self::$x0f->query_result($x33, $x2d - 1, "c\157m\x6d\x65n\x74");$xe0 = self::$x0f->query_result($x33, $x2d - 1, "p\x73d\x65s\143r\x69\x70\164io\156");$xe1 = self::$x0f->query_result($x33, $x2d - 1, "\x64\x65\163c\162\151p\x74\151\x6fn");$xe2 = self::$x0f->query_result($x33, $x2d - 1, "\161\164\171\151\156\163\x74\157c\153");$xe3 = self::$x0f->query_result($x33, $x2d - 1, "q\165a\x6e\164\151\164\x79");$xe4 = self::$x0f->query_result($x33, $x2d - 1, "q\164y\137\160\x65r\137\165\156\x69\x74");$xe5 = self::$x0f->query_result($x33, $x2d - 1, "u\x73a\147eu\156i\x74");$xe6 = self::$x0f->query_result($x33, $x2d - 1, "u\x6e\x69\x74\137p\x72i\x63\x65");$xe7 = self::$x0f->query_result($x33, $x2d - 1, "l\x69\163\164\x70ri\x63\x65");$xe8 = $xe3 * $xe7; $xe9 = self::$x0f->query_result($x33, $x2d - 1, "d\151s\143\x6f\x75\x6e\164\137pe\162\x63\x65\x6e\164");$xea = self::$x0f->query_result($x33, $x2d - 1, "\144i\x73\x63\157\165n\x74\137\x61m\157\165n\164");$xeb = $xe8;$xec = "\x30\x2e\060\x30";$xed = "";if ($xe9 != "\116\125L\114" && $xe9 != "") {$xec = $xe8 * $xe9 / 100;$xeb = $xe8 - $xec; $xed = $xe9;} elseif ($xea != "\116U\114\114" && $xea != "") {$xec = $xea;$xeb = $xe8 - $xec;} $xee = $xeb; if ($xcb == "in\x64i\x76\151d\165\x61\154") {$xef = "\x30\056\x30\060";$xf0 = $x10["\x4c\102L_TOTA\114\137AFT\x45\122\137DIS\103O\125\x4e\x54"] . "\040= $xeb\x20\\n";$xf1 = getTaxDetailsForProduct($xdb, "a\154\x6c");$xf2 = array();for ($xf3 = 0; $xf3 < $x17a($xf1); $xf3++) {$xf4 = $xf1[$xf3]["t\x61\x78\156\141\x6d\145"];$xf5 = $xf1[$xf3]["\x74\141xl\x61\x62\x65l"];$xf6 = getInventoryProductTaxValue($x0e->id, $xdb, $xf4);$xf7 = $xeb * $xf6 / 100;$xef = $xef + $xf7;if ($xf4 != "" && $xf6 > 0) {$xf8[$xf4 . "\055" . $xf6]["\154\x61\x62\x65\x6c"] = $xf5;$xf8[$xf4 . "\055" . $xf6]["\x6ee\164t\157"] += $xeb;$xf8[$xf4 . "\055" . $xf6]["\166\141t"] += $x18a($xf7, self::$x15);$xf8[$xf4 . "-" . $xf6]["\166\141l\165e"] = $xf6;$x176($xf2, $xf6);$x176($xd3, $xf6);}}$xee = $xee + $xef; if ($x17a($xf2) > 0) {$xf9 = $x178($xf2);} else {$xf9 = "\x30.\x30\060";}$xfa["\x50"][$x2d]["P\x52\x4f\104\x55\103TV\x41\124\x50\105\122\x43\x45N\124"] = $this->x23($xf9);$xfa["\x50"][$x2d]["PR\117\104UC\x54VA\x54SU\x4d"] = $this->x23($xef);}if ($xdc == "Pr\x6f\144u\x63\164\x73") {$xfa["\x50"][$x2d]["\x50\x52O\104\x55\103T\x53\137\103R\x4d\x49\104"] = $xd9;$xfa["P"][$x2d]["SE\122V\111CES\x5f\x43\122\115\x49\x44"] = "";} else {$xfa["P"][$x2d]["\120RO\x44\125\x43T\x53\x5f\103\x52\115\x49\104"] = "";$xfa["\x50"][$x2d]["S\105RV\x49\x43ES\137CR\115\x49D"] = $xd9;}$xfa["\x50"][$x2d]["PS\x5f\103\x52\115\x49\104"] = $xd9;$xfa["\120"][$x2d]["\120\x53\137\x4e\x4f"] = $xda;if ($xdf != "") {$xdf = $x18d("\\\156", "<br\076", $x187($xdf));$xdf = $x17f($xdf, ENT_QUOTES, self::$x11);$xde .= "\074\142\x72\x20/>\074\x73m\141\154\x6c\x3e" . $xdf . "<\x2f\x73\155\x61\154\154\x3e";}$xfa["P"][$x2d]["\x50\x52\x4f\x44\125C\124N\101\x4d\x45"] = $xde;$xfa["P"][$x2d]["\x50\122\117\104\x55\103\124TI\x54\114\x45"] = $xdd;$xe0 = $x18d("\\n", "\074br>", $x187($xe0));$xfa["P"][$x2d]["\120R\x4f\x44\x55C\124D\105\123\x43\x52I\120\124\x49\x4f\116"] = $x17f($xe0, ENT_QUOTES, self::$x11);$xfa["\x50"][$x2d]["PR\x4fDU\103\x54\105D\x49TDE\123\103RIP\124I\x4fN"] = $xdf;$xe1 = $x18d("\\n", "\x3c\142\x72>", $x187($xe1));$xfa["\120"][$x2d]["CR\115\x4eO\127\120RODU\x43TD\105S\103RI\120\x54\x49O\x4e"] = $x17f($xe1, ENT_QUOTES, self::$x11);$xfa["\120"][$x2d]["\x50\122\x4fDU\103T\114\x49\x53\124P\x52I\103\x45"] = $this->x23($xe7);$xfa["\x50"][$x2d]["PRO\x44UC\124\124\x4f\124\101L"] = $this->x23($xe8);$xfa["\x50"][$x2d]["\120R\117D\125\x43T\121\125\101\x4e\x54I\124\131"] = $this->x23($xe3);$xfa["\x50"][$x2d]["\120\122\117\104\x55\x43\x54Q\x49NST\117\x43\x4b"] = $this->x23($xe2); $xfa["\x50"][$x2d]["P\122\117\x44\x55\103T\x50\122\111\103\x45"] = $this->x23($xe6); $xfa["P"][$x2d]["P\122\x4f\x44\x55\103T\120O\123\x49T\111\x4f\116"] = $x2d;$xfa["\x50"][$x2d]["\x50\122O\104\125\x43\x54QT\x59PE\x52\x55\x4e\x49T"] = $this->x23($xe4); $x83 = $xe5;if (!$x183($x196($x83), self::$x18)) {$x83 = $this->x20($x83, "\x50\x72\157\144u\x63\x74\x73\057S\145rv\151c\145\x73");} else {$x83 = "";}$xfa["\x50"][$x2d]["\x50ROD\x55C\124\x55\x53\101G\105U\x4eI\124"] = $x83;$xfa["\x50"][$x2d]["\x50ROD\125\x43\124\x44IS\103O\x55\x4e\124"] = $this->x23($xec);$xfa["\120"][$x2d]["\120\122\x4f\x44\125\103T\104I\123\103\x4f\125\x4e\124\120\x45RC\x45N\124"] = $this->x23($xed);$xfa["P"][$x2d]["PR\x4fDU\103\124\x53\124\117\x54A\114\x41\106\124\105\122\x44\111\123\103\117\125N\124\x53U\x4d"] = $xeb; $xfa["\120"][$x2d]["\120\x52\117\x44\x55\103\124\x53\x54\117\x54A\x4cAF\124ERD\x49\x53\x43O\125\x4eT"] = $this->x23($xeb);$xfa["\120"][$x2d]["P\122O\x44\125C\124\x54\117T\101\114\123U\x4d"] = $this->x23($xeb + $xef); $xcd += $xeb;$xce += $xe8;$xcf+= $xeb + $xef;$xfa["\x50"][$x2d]["\120\x52\x4fD\125\x43\124\123\124OT\x41L\101F\x54\105R\x44\x49SC\117\125N\124\137S\x55\x42TOTAL"] = $this->x23($xcd);$xfa["\x50"][$x2d]["\120\122\117\x44\x55\103\x54\124\117\124\101L\x5f\123U\x42\124\117\x54\101\114"] = $this->x23($xce);$xfa["\120"][$x2d]["\x50\x52OD\125C\x54\x54\117T\x41\114SUM_\x53\125\x42T\117\x54AL"] = $this->x23($xcf); $xd2[$x2d]["\044" . "\x54\117\x54A\x4c\101F\x54\x45RD\x49\123CO\x55\116\124_\x53UB\124\117\124A\x4c$"] = $xfa["\120"][$x2d]["PR\117D\x55\x43\124\123TO\124A\x4cA\106\124\105\122DIS\103\x4f\125N\124_\123\125\102\x54\x4fT\x41L"];$xd2[$x2d]["$" . "\124OT\x41L_SUBTO\124A\114$"] = $xfa["P"][$x2d]["P\122\x4f\104U\103\x54TO\x54\x41\x4c_\x53\x55\102\124O\124A\x4c"];$xd2[$x2d]["\044" . "\x54O\x54\x41LS\125\115\137\x53\125\x42\124OT\x41\x4c\x24"] = $xfa["\120"][$x2d]["\x50\x52OD\125\103\124\x54\117T\101\x4c\123\125\115\137\123\125B\124\x4fT\101\x4c"]; $xfb = self::$x0f->query_result($x33, $x2d - 1, "se\x71\x75e\x6e\x63\145_\156o");$xfa["\x50"][$x2d]["\120\122O\104U\x43\x54\x53\105\121\x55\105\x4eC\x45"] = $xfb;if (isset($xd0[$xdb . "_" . $xfb])) {$xfc = "";$xfd = "";if ($xd0[$xdb . "\x5f" . $xfb]["\167i\x64\164h"] > 0)$xfc = "\040wi\144\164\x68\075'" . $xd0[$xdb . "\137" . $xfb]["\167id\x74h"] . "'\040";if ($xd0[$xdb . "_" . $xfb]["he\x69ght"] > 0)$xfd = "\x20\150\145\x69\147\x68\164='" . $xd0[$xdb . "_" . $xfb]["heig\x68\164"] . "'\x20";$xfa["P"][$x2d]["\x50R\117\104\125\103TS\137\111M\x41\x47E\x4eAM\x45"] = "<\x69mg\040\163\162c\x3d'" . self::$x12 . "\x2f" . $xd0[$xdb . "\137" . $xfb]["\x73\x72c"] . "'\040" . $xfc . $xfd . "\x2f\x3e";}elseif (isset($xd1[$xdb . "\137" . $xfb])) {$xfa["\120"][$x2d]["\120\x52\117D\x55C\124\x53\x5f\x49M\101GE\116A\x4d\x45"] = "\074i\x6d\x67\x20\x73\162c\x3d'" . self::$x12 . "/" . $xd1[$xdb . "\x5f" . $xfb]["src"] . "' \x77\151\144th\x3d'\0703'\040\x2f>";} $xfe = CRMEntity::getInstance("\120r\157\144\x75\x63\x74s");if ($xdc == "P\x72\x6f\144u\143\164\x73" && $xd9 != "") {$xfe->id = $xd9;$this->x24($xfe, $xd9, "\120r\x6fd\165\x63t\163"); }$xff = $this->x21($x0c, $x0e);$x100 = $this->x10("\120\162\x6fd\165\x63t\163", $xfe, false, $xff);$xfa["\x50"][$x2d] = $x177($x100, $xfa["\120"][$x2d]);unset($xfe);$x101 = CRMEntity::getInstance("\x53\145r\x76\x69\143e\163");if ($xdc == "\x53\x65\x72v\151\143es" && $xd9 != "") {$x101->id = $xd9;$this->x24($x101, $xd9, "\x53\x65\162vi\143\145\x73"); }$x102 = $this->x10("\x53\x65r\x76ice\163", $x101, false, $xff);$xfa["\x50"][$x2d] = $x177($x102, $xfa["\120"][$x2d]);unset($x101); $x103 += $xeb;$xcc = $xcc + $xee;} if (self::$x0c == $x0c)self::$x25["\163\x75b\164o\x74\x61\x6c\163Arr\x61y"] = $xd2; $x104 = "\060\x2e\x30\060";$x105 = "\060";$x106 = ""; if ($x0e->column_fields["\x68\144\156\104i\x73\x63ou\x6etPe\x72\x63e\x6e\x74"] != "0") {$x104 = ($xcc * $x0e->column_fields["\x68\x64\x6eDi\x73\143\157\x75nt\120e\x72ce\156\164"] / 100);$x106 = $x0e->column_fields["h\x64nD\x69\163c\x6f\165\x6e\x74\x50\x65\x72c\145\156\164"];} elseif ($x0e->column_fields["\150\144n\x44\x69\x73\143\157u\x6e\164\101\x6do\165nt"] != "\x30") {$x104 = $x0e->column_fields["\150d\x6eD\151\163c\x6f\165\156\164\x41\155o\165\156t"];} $xef = "\060\056\x30\060";if ($xcb == "\x67\x72\x6f\165\160") {$x107 = $xcc - $x104;$xf1 = getAllTaxes("\141\166a\151l\x61\x62\154\145", "", "\145\144i\164", $x0e->id);for ($xf3 = 0; $xf3 < $x17a($xf1); $xf3++) {$xf4 = $xf1[$xf3]["\x74\x61x\156\141\x6d\145"];$xf5 = $xf1[$xf3]["t\x61xl\x61\x62\145l"];$xf6 = self::$x0f->query_result($x33, 0, $xf4);if ($xf6 == "" || $xf6 == "\x4eU\114\114")$xf6 = "0.\060\x30";$x108 = ($xcc - $x104) * $xf6 / 100;$xef = $xef + $x108;if ($xf4 != "" && $xf6 > 0) {$xf8[$xf4]["\154\x61b\x65l"] = $xf5;$xf8[$xf4]["net\x74\x6f"] = $x107;$xf8[$xf4]["\166\141\164"] += $x108;$xf8[$xf4]["\166\141\154ue"] = $xf6; } $x109 += $xf6;}$x10a = $xef; foreach ($xfa["P"] as $x10b => $x10c) {$x10d = ($xfa["P"][$x10b]["\120\122\117\104\x55\103T\x53\x54\117TAL\101\x46\x54\105R\104IS\x43\117\125\x4e\x54\123UM"] * $x109) / 100;$x10e = $xfa["\120"][$x10b]["\120R\x4f\x44\125\x43\x54S\124\117\x54\x41LA\106\124\x45\122\104\x49\x53\x43\117\x55N\x54\x53\125\115"] + $x10d;$xfa["P"][$x10b]["PRODU\x43T\x56\101\x54PE\122\103\x45NT"] = $this->x23($x109);$xfa["\120"][$x10b]["\x50\122O\x44U\103T\x56\101\x54\123\x55M"] = $this->x23($x10d);$xfa["\x50"][$x10b]["PR\x4fD\125\x43T\x54\x4f\124\101L\x53\x55\115"] = $this->x23($x10e);} } else {if ($x17a($xf8) > 0) {foreach ($xf8 as $x10f => $x110)$x10a += $x110["\166\x61\x74"];} else {$x10a = "\060.\0600";}} $x111 = ($x0e->column_fields["\x68\144\x6e\x53\137H\137A\x6do\x75n\x74"] != "") ? $x0e->column_fields["\150\x64\156\123\137\110_\x41m\157\165nt"] : "\060\x2e0\x30";$x112 = "\060.0\x30";$x113 = getAllTaxes("a\166\141\151\154\x61\142\x6c\x65", "\x73\150", "e\144\151t", $x0e->id);for ($x114 = 0; $x114 < $x17a($x113); $x114++) {$x115 = $x113[$x114]["t\x61x\x6e\x61\155\145"];$x116 = $x113[$x114]["\164\x61\x78l\141\142el"];$x117 = getInventorySHTaxPercent($x0e->id, $x115);$x118 = $x111 * $x117 / 100;$x112 = $x112 + $x118;}$x119 = $x103 - $x104;$x11a = ($x103 - $x104) + $x10a;$xfa["\x54\117\x54\x41\x4c"]["\116E\124\124\x4f\124\x41\114"] = $this->x23($xcc);$xfa["T\x4f\x54\101\x4c"]["\x54\x4fTA\x4cWIT\x48\117UTV\x41\x54"] = $this->x23($x103);$xfa["T\x4f\124A\x4c"]["\106\x49\116ALD\111\x53C\117\x55\116\x54"] = $this->x23($x104);$xfa["\124\117T\101L"]["FI\x4e\x41\x4c\x44ISC\x4fU\x4e\x54P\105\122\x43\105\116\x54"] = $this->x23($x106);$xfa["\x54\x4fT\x41L"]["T\117T\x41\114\101\106\x54E\x52\x44\x49S\x43\117\x55N\x54"] = $this->x23($x119);$xfa["\x54\x4f\x54\x41L"]["\x54\101\130TOTAL"] = $this->x23($x10a);$xfa["T\117TA\114"]["TAX\124O\x54\101\114\120\x45RC\105N\x54"] = $this->x23($x109); $xfa["\124\x4f\124\x41L"]["\x54\x4f\124\101\x4c\127\x49\124\x48\126\x41T"] = $this->x23($x11a);$xfa["\x54\x4fT\x41\x4c"]["\x53H\124A\130\x41M\x4fU\116\124"] = $this->x23($x111);$xfa["TOT\x41\x4c"]["\123\110\124\101\x58T\117TAL"] = $this->x23($x112);$xfa["\124\x4fTA\x4c"]["\126\x41\x54\102\x4c\x4f\103K"] = $xf8;return $xfa;}private function x19() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3e = "\123E\114E\103\x54\040\160r\157d\165\143\x74i\144\054\x20\x73\145\x71\165\145\x6ec\x65\054\040\163\150o\167\x5f\150\x65\141\x64\x65\162,\x20\x73h\157w\137\163u\x62t\157t\x61\x6c\x20\106R\x4fM\040\x76t\x69\147\x65\162\137\160\x64\x66m\141ke\x72\x5f\x62\162\x65a\153li\x6e\x65\x20\x57\110E\x52E\x20\143\x72m\151\144\x3d?";$x11b = self::$x0f->pquery($x3e, array(self::$x0e->id));$x11c = array();$x74 = 0;$x75 = 0;while ($x42 = self::$x0f->fetchByAssoc($x11b)) {$x11c[$x42["\x70r\x6fdu\x63\164\x69\x64"] . "_" . $x42["\x73\x65\161\x75\x65\x6ec\x65"]] = $x42["\x73\x65q\x75\145\x6ece"];$x74 = $x42["\x73\x68\157\167_h\145\141der"];$x75 = $x42["\x73\150\x6f\167\137s\x75b\x74\x6fta\x6c"];}$x11d["\160\162\157\x64\165\x63\x74s"] = $x11c;$x11d["\x73ho\x77\x5f\x68e\141der"] = $x74;$x11d["\163\150o\167\137\163\165\x62\x74\157\164\x61\x6c"] = $x75;return $x11d;}private function x1a($x11e, $x11f = false) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x11f === false) {$x3e = "\x53\x45\x4cEC\x54 v\164\x69g\145\x72_\x69nv\145\156\x74o\x72yp\162o\144u\x63tr\145\154.\x70\162\x6f\144\x75c\x74id\x2c\x20\166tige\x72\137\x69\x6e\166\x65n\164\157\x72y\x70\162\x6f\144\165\x63\x74re\154\x2es\x65\x71u\x65\156c\x65\137\x6e\157,\x20\166\x74ige\162\x5fat\164a\x63\x68\155e\156\x74\163\056att\x61\143\x68m\145\156t\163\151\144,\040\156a\x6d\x65, \160\x61\164\150\x0d\012\x09\011 \040\x20\040\040\040\x20\x20 \x20F\x52\117\115 v\164\151\147e\162\137i\x6ev\x65\x6e\x74\157\x72y\x70\x72\x6f\x64u\143t\162\x65l\x0d
\x09\040\x20\040\040\x20\x20\x20 \040\040\x4c\x45F\x54 JO\x49N\x20\x76\x74\151\147\x65\162\137\163\145at\164\x61c\150\x6d\145nts\x72el\x0d
\011\011 \x20\x20 \x20\040\040\x20\040\040O\116\x20\166\x74\x69ge\x72\x5f\x73\145\x61\x74\164a\143\x68m\x65n\x74s\x72\145l\056\143\162m\x69d\x3dv\164ig\145\x72_\x69nv\x65\156\x74or\x79\x70ro\x64\165c\164\162\145l\x2epr\157d\x75\143t\x69d\x0d\012\x09\011\040\x20\040\040\040\040 \040\x20 L\x45F\x54 \112OI\x4e\x20v\x74i\x67\145r\137\141\x74\x74\141\143\150\x6d\x65nt\163\015\012\x09 \x20\x20 \x20\x20\x20\040 \040 \040\040ON\x20vtige\x72\137a\164\164\141\x63\x68m\x65\156t\x73\x2ea\164\164a\143hm\145\x6e\x74\163\x69\144=\x76\x74\151\147\x65\162\137\x73\x65\141t\x74\x61\x63h\x6de\x6e\164s\162\145\154.\141\164\x74ac\150me\156\164\163\x69d\x0d\012\011\011 \x09 \040I\x4e\x4e\x45\x52\040J\117\111N v\164i\147\145\162_\143\162men\164\x69t\x79\x0d
\x09 \011\011\x20\040\040 \117N\x20\166ti\147\x65\162\137\x61\164\x74\141c\150\x6d\x65nts\056\141\164\x74\x61\143\x68\155en\164s\151d=\166\164\151\147\x65r\137\143r\x6d\145nt\x69\x74\x79.c\162\155i\144\015
\x09\011\x20\x20 \x20\x20\040 \040 W\110\105\x52\105\040\166\x74\x69g\145\x72\137c\x72men\164i\164\x79\056\x64\145\154\x65\164\x65\x64\0750\040\101\116\104 v\x74\x69\x67e\162\x5fin\166en\164\x6f\162\171pr\x6fd\x75\x63t\x72e\x6c\x2e\x69\x64\x3d?\015\012\011 \011 \x20\x4f\122D\105R\x20B\131\040\x76\164\151\147\145r\x5f\151n\x76\x65nt\x6fr\171\x70rodu\143t\162\145\x6c.\x73\145\x71\x75\x65\156ce_\156\157";} else {$x3e = "SE\x4c\x45\x43\x54\040vti\147\145\x72\137\160\x72\157duct\x73\056p\162\x6f\144\165\x63t\x69\x64,\040'1'\040\101\x53 \163\x65\x71\x75e\156\143\x65\137\x6e\x6f\054\x0d\x0a \x09 \x20\x20 \x20 \x20 \040\040\040 v\164\151\147\145\162\x5f\x61\x74tach\155e\156ts\x2e\x61\x74\x74\141\x63\x68me\x6e\x74\x73\x69\144\054\x20\156\141\155\x65, \160a\x74\x68
\012 \040\040\x20\040\040 \040\x46R\117\115\x20vti\147\145r_p\x72\157\x64\165ct\x73\x0d\012\011 \x20\x20 \x20\x20 \x20 \040\114\x45\x46T J\117\111N\040\x76ti\x67\145\162_se\x61\x74\164\141\x63\150m\x65nts\162\145\x6c\x0d
\011\011 \040 \x20 \040 \040 \040\117N\040vt\151g\145\x72_s\x65atta\x63\x68\155e\x6e\164s\x72\145\x6c\056\143rm\x69\x64\x3dv\164i\147e\x72\x5f\x70ro\144\x75c\164s.\x70r\x6fd\165\x63t\x69\x64\x0d\012 \040\x20\040\x20 \x20 \040 \x20\114\105\106\124 \112\x4f\111N\x20\x76\x74ig\x65r\137\141\164tac\x68\155\x65\156\x74\163\015
\011\x09\x20\x20\040\040 \040 \040 ON \166t\151ge\162\137\x61\x74\164\141\143\150\155\x65\x6e\x74s.a\164\164\x61\143\x68me\x6e\164si\x64\075v\164i\147e\x72_seat\x74\141\143h\155ents\x72\x65\154.\141\x74t\x61c\x68m\x65n\164\163\x69\x64\015
\x20\x20\x20\040 \040 \x20\040\040 \x20 \040\x20\x20\x49\x4eN\105\x52 \112\117\111\x4e \166\164\x69\147\x65r_cr\155\x65\x6et\151t\171
\x0a\x09 \040 \040\x20\x09ON \x76t\151ge\x72\x5fat\164\x61\x63\150\155\145\x6et\163\056\141tt\x61\143\150m\145\x6e\x74si\x64=\x76\x74\x69g\145\x72_\x63\x72\155e\x6et\151\x74\171\056c\162m\x69d\x0d\012\011\011\040\x20 \x20\x20\x20\040\040 W\110E\122E\x20v\x74\151g\x65\162\137\x63\x72m\x65\156t\x69ty\056\x64\x65\x6c\145\x74ed\075\x30\x20A\x4eD\x20v\164\151\147\145r\x5fpr\157\144uc\x74\x73\x2e\160\162\157\x64u\143\x74\x69\x64=\077\040\x4f\x52\104ER\040BY\x20\166\x74\151\147e\162\x5f\x61\x74\x74\141c\150\155e\x6et\163.\141tt\141\x63h\x6den\x74\163\151d";}$x120 = array();$xd1 = array();$x11b = self::$x0f->pquery($x3e, array($x11e));$x11c = array();while ($x42 = self::$x0f->fetchByAssoc($x11b)) {$x11c[$x42["\160\162\x6f\144u\143\164\x69\x64"] . "\043\x5f\x23" . $x42["se\x71\165\x65n\143e_n\x6f"]][$x42["\141t\164a\x63\x68me\156ts\151\144"]]["\x70\x61t\x68"] = $x42["p\x61\x74h"];$x11c[$x42["\160\x72\x6f\144\x75\143\x74\x69\x64"] . "\x23\x5f#" . $x42["\163\x65\161\165\x65nce\x5f\x6e\x6f"]][$x42["\141t\x74a\143\150m\x65\x6et\163\151\x64"]]["\156\x61\155\x65"] = $x42["\x6e\x61\x6d\145"];}$x121 = "\x53\105LE\x43T \x70\x72o\144u\143\164\x69\144\x2c\x20\x73\145\x71\x75enc\145\x2c at\164\x61\x63\x68\x6d\145\156\x74\151d\054\040\167id\164\150, \150\145\151\x67h\164\040\x46R\117M\x20\166\164\x69g\x65\162\x5f\x70\144f\155ak\145r\x5fi\x6d\x61\x67\145s\x20\x57\110\105\122\x45 \x63r\155\x69d=?";$x122 = self::$x0f->pquery($x121, array($x11e));$x123 = array();$x124 = array();while ($x125 = self::$x0f->fetchByAssoc($x122)) {$x123[$x125["pr\x6f\x64u\143t\x69\144"] . "_" . $x125["\163equen\143\x65"]] = $x125["a\x74\164\141\143h\155\x65nt\x69\144"];$x124[$x125["\160ro\144\x75\x63tid"] . "_" . $x125["s\x65\161\165\145\156\143\145"]]["\x77\151\144\164\x68"] = ($x125["\x77id\164\x68"] > 0 ? $x125["\x77i\x64\x74h"] : "");$x124[$x125["\x70r\x6fd\165\x63\164\x69\144"] . "\x5f" . $x125["\163\x65q\x75e\156\143e"]]["\150eight"] = ($x125["\x68\145\151\147\150\164"] > 0 ? $x125["\x68ei\x67\150t"] : "");}foreach ($x11c as $x126 => $xc8) {list($xdb, $x127) = $x17c("\x23\137#", $x126, 2);foreach ($xc8 as $x128 => $xd0) {if ($x128 != "") {if (isset($x123[$xdb . "\137" . $x127])) {if ($x123[$xdb . "\x5f" . $x127] == $x128) {$xfc = $x124[$xdb . "\x5f" . $x127]["\x77id\x74\150"];$xfd = $x124[$xdb . "\x5f" . $x127]["\150e\x69g\x68\x74"];$x120[$xdb . "_" . $x127]["\x73rc"] = $xd0["\x70ath"] . $x128 . '_' . $xd0["na\x6d\145"];$x120[$xdb . "_" . $x127]["wi\x64t\x68"] = $xfc;$x120[$xdb . "\137" . $x127]["\x68\x65\x69gh\164"] = $xfd;}} elseif (!isset($xd1[$xdb . "\x5f" . $x127])) { $xd1[$xdb . "_" . $x127]["\163\162\143"] = $xd0["\160\x61th"] . $x128 . '_' . $xd0["n\141\x6d\x65"];}}}}return array($x120, $xd1);}private function x1b($x11e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (isset($x11e) AND $x11e != "") {$x6e = "\123\x45L\105CT\040\x76\164\x69\x67\145\x72\x5fat\x74a\x63\x68\x6d\145\156t\x73\056\160\141t\150\x2c v\x74\151\147\145\x72\137\x61\x74\164\x61\143\x68m\x65\x6e\164\x73\x2en\x61\155\x65,\x20v\x74\151g\145\162_a\x74\164a\x63hm\145n\x74\163.\x61\164\x74\141c\x68\155\x65\156\x74s\x69\144\015
\x20\x20 \040\x20\x20\040\x20\040\x20\x20\040\x20\040FR\x4f\x4d\x20\166\164i\147\145\162\137co\x6e\164a\x63\x74d\x65ta\x69ls\x0d
\040\x20 \x20 \x20 \040\040\040\040 \x20 \x49\116N\105R\x20\112\x4fI\x4e v\164\151g\145\x72\x5fs\x65at\x74a\143hm\x65\156\164\x73\162\145l\x0d\012\x20\040\x20\x20\040\040 \x20 \x20\x20 \040\x20\040O\x4e\x20\x76t\x69\147e\x72_\143o\x6e\164a\x63\164de\x74\141i\154\x73.c\x6f\x6e\164\141\x63\x74i\x64\075\166\164i\x67er\x5fse\141\164\164\x61\x63\150m\x65\x6e\164\163\x72\145\154\056c\x72\x6did
\x0a \x20\x20 \x20\x20\040\x20\x20\040 \x20 \040\111\x4e\116E\122\040\x4aO\x49\x4e \x76\164\x69g\x65\162_\141\x74\164ac\150m\145\156\164s\x0d\x0a \040\x20 \040\x20\040\x20\x20\x20\x20\x20 \x4f\116\x20\x76ti\147e\x72_\141\164\x74\141\x63h\x6de\x6e\164\x73\056\141\164\164ac\x68\155\x65n\164\163\151\x64\075v\x74i\x67\145\x72\137\163e\x61t\164a\143\x68me\156\x74sr\145\154\056\141\164\164\141\x63\150men\x74\x73\x69\x64
\x0a \x20\040\040\040\x20 \040 \x20\x20\040\040\x20\x49\116\116\x45\x52\040\x4a\x4fI\116\x20v\164\151ger\x5fc\x72\x6d\x65\x6e\164\151\x74\x79\015\x0a\040\040\x20\x20\x20 \x20\x20 \040\040\x20 \040 \117N\040vt\151\x67\x65r\137\x61t\164\141\x63\x68\x6d\x65\156\164\163.\141\x74\x74a\x63\x68\x6den\164\x73i\x64\075\166t\x69g\145\x72\x5fc\x72\155e\x6e\x74\151\164\171.\x63\162\155i\x64
\012\040\x20\x20 \x20\x20\040\040\040\x20\040\x20 \x20W\x48E\122\x45\040d\145\x6ce\164\145\x64\x3d0\x20A\116D\040\166t\x69\x67\x65\x72\x5fc\157\156\x74\141ctd\x65t\141i\x6cs\x2e\143\x6f\156t\141c\164\x69\144=\x3f";$x33 = self::$x0f->pquery($x6e, array($x11e));$x43 = self::$x0f->num_rows($x33);if ($x43 > 0) {$x129 = self::$x0f->query_result($x33, 0, "\160a\164\150") . self::$x0f->query_result($x33, 0, "a\x74tac\x68\x6d\145n\x74\x73\151\x64") . "\x5f" . self::$x0f->query_result($x33, 0, "\x6eame");$x12a = "<\x69\155\147\040\163\162\143\075'" . self::$x12 . "/" . $x129 . "'\057\076";return $x12a;}} else {return "";}}private function x1c($x11e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (isset($x11e) AND $x11e != "") {$x3e = "\163e\x6ce\143t\x20v\x74\151\x67er\x5fa\164\164\x61\x63h\155\145\156\x74\x73.\052\040\146rom \166\x74\x69\147er\x5fatt\x61ch\155\x65\156\x74s\040\x6c\x65ft \x6a\x6f\151n \x76\164iger\137\x73\x61\x6c\x65\x73\x6dana\164\x74\x61\143h\x6d\145\156\x74\163\162e\154 \157\x6e\040v\164iger\x5fs\141l\145sm\x61\x6ea\164\x74\x61\x63\150\x6d\145\156\164\163re\x6c\x2ea\x74\x74ac\150\155\145\156\x74s\151\144 =\040v\x74\151\147e\162_\x61t\x74achme\x6et\163\x2e\141\x74\x74\141\x63\x68\155\145n\164\x73\x69\144\040w\x68er\145\x20\166t\151g\145\162\x5f\x73ale\163\x6d\141\x6e\x61\x74\164ach\x6d\145\x6e\x74\x73\162el.s\x6di\x64\x3d?";$x12b = self::$x0f->pquery($x3e, array($x11e));$x12c = self::$x0f->query_result($x12b, 0, 'attachmentsid');$x12d = self::$x0f->query_result($x12b, 0, 'path');$x12e = self::$x0f->query_result($x12b, 0, 'name');$x12f = $x12d . $x12c . "_" . $x12e;if ($x12e != '') { $x12a = '<img src="' . $x12f . '" width="250px" border="0">';} else {$x12a = '';}return $x12a;} else {return "";}}private function x1d($x11e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $xdb = $x11e;list($xd0, $xd1) = $this->x1a($xdb, true);$xfb = "\061";$x130 = "";if (isset($xd0[$xdb . "_" . $xfb])) {$xfc = "";$xfd = "";if ($xd0[$xdb . "\x5f" . $xfb]["w\x69\144t\150"] > 0)$xfc = "\x20w\151d\164\x68\x3d'" . $xd0[$xdb . "_" . $xfb]["\x77idt\x68"] . "'\x20";if ($xd0[$xdb . "_" . $xfb]["\x68e\151\x67\x68t"] > 0)$xfd = "\x20h\145\x69\147h\x74\x3d'" . $xd0[$xdb . "\137" . $xfb]["\150\145\151\x67h\x74"] . "'\x20";$x130 = "\x41\x3ci\155g\040\x73rc\x3d'" . self::$x12 . "/" . $xd0[$xdb . "\137" . $xfb]["s\x72\x63"] . "'\x20" . $xfc . $xfd . "\x2f\076";}elseif (isset($xd1[$xdb . "\137" . $xfb])) {$x130 = "\x42<\x69\x6d\147 \163\x72\143\x3d'" . self::$x12 . "/" . $xd1[$xdb . "\x5f" . $xfb]["\163r\x63"] . "'\x20w\151d\164\150\075'\x38\x33' /\x3e";}return $x130;} private function x1e($x11e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x11e != "") {$x3e = "\x53\105\x4c\x45\x43T\x20u\x73\145r_\156a\155\145\040\x46\122O\x4d\x20v\x74\x69ger\137\165s\145\x72\163 W\x48\105RE\x20i\x64\075?";$x33 = self::$x0f->pquery($x3e, array($x11e));$x131 = self::$x0f->query_result($x33, 0, "\x75\163\145\x72\137\156\x61\155e");}if ($x131 == "") {$x3e = "\x53\x45\114\x45\x43\x54\x20g\162\157\165\x70\x6e\x61\x6d\145\040FROM\040v\164\151\147\x65\x72\137\147\162\x6f\x75\x70\x73 W\x48\105\122\x45 \x67ro\165\x70id\x3d\077";$x33 = self::$x0f->pquery($x3e, array($x11e));$x131 = self::$x0f->query_result($x33, 0, "g\x72\157\x75\x70\156\141\155\145");} else {$x131 = getUserFullName($x11e);}return $x131;}private function x1f($x132) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x133 = "";if ($x132 != '') {$x3e = "S\105\114\x45\103\x54\x20a\x63cou\x6e\164\137n\157\040\x46R\117M\x20v\x74\151\x67\x65\162_ac\143\157\x75\156\164 \x57\x48\x45\122E\x20\141\x63\x63o\165\156tid\x3d\077";$x33 = self::$x0f->pquery($x3e, array($x132));$x133 = self::$x0f->query_result($x33, 0, "\x61\x63\x63\157\x75\156\x74\x5f\x6e\x6f");}return $x133;}private function x20($x134, $x92) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x92 != "P\162\157\144u\143\164s\057\123er\166ice\x73") {$xb5 = return_application_language(self::$x0d);$xb6 = return_specified_module_language(self::$x0d, $x92);} else {$xb5 = return_specified_module_language(self::$x0d, "\x53e\162\x76ice\x73");$xb6 = return_specified_module_language(self::$x0d, "\x50\162\x6fd\165c\164\x73");}$x135 = ($xb6[$x134] != '') ? $xb6[$x134] : (($xb5[$x134] != '') ? $xb5[$x134] : $x134);return $x135;}private function x21($x0c, $x0e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x136 = self::$x22[$x0c];$x137 = self::$x23[$x0c];$x11b = self::$x0f->pquery("\x53EL\x45CT\040\x63\x75\x72\x72\145\x6e\x63\x79_id\054\040" . $x136 . "\056con\x76\145rs\151o\156\x5f\162a\164\145\040\101S \x63o\156\166_\x72\141\x74\145, \x76\x74\151\x67\x65\162\137\143u\162r\x65\x6ecy\x5f\x69\156\x66\x6f.\x2a
\012\040\x20 \x20\x20 \x20\040\040 \040 \040 \x20 \040\040\x20\x20 FROM\040" . $x136 . "\x0d
\040\x20\040\040\040 \040\x20\040\x20 \x20\x20\040\040\x20 \x20\x20 \x20\x20\x20 I\116NE\x52 \112\x4f\x49\116\040v\164i\x67\145\x72\x5fc\x75\x72\162\x65ncy\137i\156\x66\x6f\x20\117\x4e\x20" . $x136 . "\056c\x75\x72\x72\x65n\143\x79\137\x69\144\x20\075\x20\x76\164\x69ger\x5f\x63\165\162\162en\x63\x79\x5f\x69\156\x66\157.id\x0d\x0a\040\x20\x20\x20\x20\040\x20 \x20\x20\040\040\040 \040\x20 \040\x20\040\x20 \x20\x20\040W\x48\x45RE\040" . $x137 . "=\x3f", array($x0e->id));$x138 = array();$x138["c\x75\162r\145\x6e\x63\171\137i\144"] = self::$x0f->query_result($x11b, 0, "\143\x75\x72re\x6ec\x79\x5f\x69\144");$x138["\143\157n\166\145\x72si\x6fn\137r\141t\x65"] = self::$x0f->query_result($x11b, 0, "\143on\x76\x5frat\x65");$x138["c\x75\162\x72e\x6ec\171\x5fn\141\155\x65"] = self::$x0f->query_result($x11b, 0, "c\x75\x72\162\x65\156\143\171\137n\x61\155e");$x138["c\165r\162\145\156\143y\137\x63o\x64\x65"] = self::$x0f->query_result($x11b, 0, "c\165\x72\x72\x65n\x63\x79_\x63o\144e");$x138["c\x75\162\162e\156cy_\x73\171mb\157\154"] = self::$x0f->query_result($x11b, 0, "\x63\165\162\162\x65\x6ec\171_symbo\x6c");return $x138;}private function x22($x0c, $x0e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x11b = self::$x0f->pquery("\x53\105\114ECT\x20t\x61x\x74y\160\x65 \106\x52OM\x20" . self::$x22[$x0c] . "\040W\x48\x45R\x45\040" . self::$x23[$x0c] . "\075\077", array($x0e->id));$xcb = self::$x0f->query_result($x11b, 0, 'taxtype');return $xcb;}private function x23($x83) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x184($x83)) {$x139 = $x188($x83, self::$x15, self::$x13, self::$x14);} else {$x139 = "";}return $x139;}private function x24(&$x0e, $x13a, $x0c) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x33 = Array();foreach ($x0e->tab_name_index as $x13b => $x13c)$x33[$x13b] = self::$x0f->pquery("\x53\x45L\105\103\124\x20* F\122\x4fM\x20" . $x13b . "\040\127H\105R\105 " . $x13c . "\x3d\x3f", array($x13a));$x51 = getTabid($x0c);$x13d = "S\x45\114E\103\x54\x20\146\151e\x6cd\x6e\141m\145\054\040\x66i\x65l\x64\x69d,\040\146\151\x65\154d\154a\x62\145l\054 \143o\x6c\165\x6d\156\156a\x6d\x65\054\040\164a\x62le\156ame\x2c\x20\165it\171\x70\145\x2c \x74\171\160\145\157\146\144a\164a\054 \x70re\x73\x65\156c\x65
\012 \x20 \x20\040\x20\x20\040 \x20\x20\040\x20\x20\040FRO\115\040\166\164ige\x72_\x66\x69\145\x6c\144\x20W\x48E\122\x45 \x74a\142\151\x64\075?";$x13e = self::$x0f->pquery($x13d, array($x51));$x13f = self::$x0f->num_rows($x13e);if ($x13f) {while ($x140 = self::$x0f->fetch_array($x13e)) {$x141 = $x140["\x63\x6f\x6c\165m\x6e\x6eam\145"];$x142 = $x140["\164\x61\x62\x6ce\156a\155\145"];$xa2 = $x140["\x66\x69e\x6c\x64n\141\x6d\x65"];$x143 = "";if (isset($x33[$x142]))$x143 = self::$x0f->query_result($x33[$x142], 0, $x141);$x0e->column_fields[$xa2] = $x143;}}$x0e->column_fields["r\x65\143\x6f\x72\144\137\151\x64"] = $x13a;$x0e->column_fields["re\x63\157\x72\x64\x5fmod\165l\145"] = $x0c;}private function x25($x83) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x17d("\155\157\144\165\154\x65s\057\123\145\164\x74in\x67\163/Edi\x74\124e\162mD\145\164ai\154\163\x2e\x70\x68\x70")) {$x3e = "\x53E\x4c\105C\124\x20\x74a\156\144c\x20FR\x4f\x4d\040v\x74\151\147\x65r\x5f\151n\x76\145n\164\157\x72\171_\x74\141nd\x63\x20\x57\x48\105R\x45 \x69d\075'" . $x83 . "'";$x11b = self::$x0f->query($x3e);$x144 = self::$x0f->num_rows($x11b);if ($x144 > 0) {$xac = self::$x0f->query_result($x11b, 0, "t\x61ndc");} else {$xac = $x83;}} else {$xac = $x83;}return $xac;}private function x26($x93) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x145 = "";$x146 = "";if ($x93->column_fields["\x72\145\143\x6f\x72\144\137\x6d\x6fd\165l\x65"] == "Hel\x70\x44\145s\x6b") {$x146 = "\164\151\143ke\x74";} elseif ($x93->column_fields["\162\145\143\x6fr\x64\x5f\x6d\157\x64\x75\x6c\145"] == "\106\x61\161") {$x146 = "\146\141q";}if ($x146 != "") {$xb6 = return_specified_module_language(self::$x0d, $x93->column_fields["\x72\x65\x63or\x64\x5f\x6d\x6f\x64\x75le"]);$x3e = "\x53\105L\105C\x54 * F\122\x4f\x4d \x76\x74\x69\x67e\162\x5f" . $x146 . "c\x6fm\x6d\x65nt\163\040W\x48ER\105 " . $x146 . "id\075" . $x93->id;$x33 = self::$x0f->query($x3e);while ($x42 = self::$x0f->fetchByAssoc($x33)) {$xdf = $x42["c\157\x6d\155\145\156\x74\x73"];$x147 = getValidDisplayDate($x42["\143r\x65\141t\x65\x64\x74i\155\x65"]);$x1b = "";if ($x146 == "\x74ic\x6b\x65t") {$x148 = $this->x1e($x42["o\x77\156er\151d"]);$x1b = $xdf . "\x3cb\x72 />" . $xb6["L\x42\114\x5f\101U\x54\x48\x4f\122"] . "\072 " . $x148 . "\x3c\x62\162\x20\x2f>" . $xb6["\x43r\x65a\x74e\144 T\151me"] . ": " . $x147 . "\074\x62\162 \057\x3e\x3c\142\x72\040\x2f\076";} else {$x1b = $xdf . "<\142\x72\040\x2f\x3e" . $xb6["\x43\162\x65a\x74\145\x64\x20T\x69\x6d\x65"] . ":\040" . $x147 . "<\142\162 \x2f\076\074\142r\040\057\076";}$x145.=$x1b;}}return $x145;}private function x27($x149) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x3e = "\123\105\x4c\105\103\124 \146\157\154\x64\x65rn\141\155\145 \x46\x52OM \166\164\x69\x67e\x72\x5f\x61t\x74a\143h\155e\156\x74s\146\x6f\x6cder\040\127\x48\x45\x52E\x20\146old\x65\x72\x69\144\x3d" . $x149;return $x14a = self::$x0f->query_result(self::$x0f->query($x3e), 0, "f\157\x6c\144\145\x72n\141\155\x65");}private function x28() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if ($x184($x192(self::$x1c, '[CUSTOMFUNCTION|'))) {require_once("m\157d\x75les/\120\104\x46M\141\x6b\x65\162\x2f\x72\x65s\x6furce\163/cl\141\163\163\145\x73\x2fs\x69\155\x70\154e\x5f\150\164\x6d\x6c_\144\x6f\155\056p\x68\160");foreach ($x17e('modules/PDFMaker/resources/functions/*.php') as $x14b) {include_once $x14b;}self::$x21["[\x43\x55\x53TO\115\106\x55\116\x43T\x49O\x4e\174"] = "<\143\x75\163\x74\157m\x66\165\x6e\x63ti\157\x6e>";self::$x21["\174CU\x53\124\117\x4d\x46\125\x4e\x43\124\111\x4fN\135"] = "<\x2fcus\x74\x6f\x6d\146u\x6e\143\x74\151\x6f\156>";$this->x15();$x3a = str_get_html(self::$x1c);foreach ($x3a->find("\x63u\x73\164\x6f\155\146u\156\x63\164\x69\157n") as $x14c) { $x14d = $this->x29($x196($x14c->plaintext));$x14e = $x14d[0];unset($x14d[0]);$x14f = $x179($x14e, $x14d);$x14c->outertext = $x14f;}self::$x1c = $x3a->save();}}private function x29($x150) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x14d = array();$x151 = false;do {if ($x194($x150, '|')) {if ($x150[0] == '"') {$x152 = '"|';$x150 = $x195($x150, 1);} elseif ($x195($x150, 0, 6) == '"') {$x152 = '"|';$x150 = $x195($x150, 6);} else {$x152 = '|';}list($x14d[], $x150) = $x17c($x152, $x150, 2);} else {$x14d[] = $x150;$x151 = true;}} while (!$x151);return $x14d;}public function getFilename() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; self::$x1c = self::$x1d;self::$x21["\x24\x23\x54\x45\x4dPLA\124\x45\x5f\116\x41ME\x23\044"] = self::$x1e;self::$x21["\044#D\x44\055\x4d\115-\131YY\x59#$"] = $x17b("\x64\055\x6d\x2d\x59");self::$x21["$\043\x4d\115\x2dDD\055Y\131\131\131\043\x24"] = $x17b("\155\x2d\144\x2d\131");self::$x21["\044\x23\x59\131YY\055\x4d\x4d-\104\104#\x24"] = $x17b("\131\055\x6d-\144");self::$x21["$" . $x191(self::$x0c) . "\x5f\x43R\x4d\x49\104\044"] = self::$x0e->id;$this->x10(self::$x0c, self::$x0e);self::$x21 = array();self::$x21["\x5c\x72\\x6e"] = "";self::$x21["\x5c\156\\162"] = "";self::$x21["\n"] = "";self::$x21["\\162"] = "";$this->x15();return $x18d("\x20", "\x5f", $x195($x190($x17f(self::$x1c, ENT_QUOTES, self::$x11)), 0, 255));}private function x2a($x150) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; return $x186($x150);}private function x2b() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; include_once("\x6d\157du\x6ce\x73\x2f\120\x44F\x4d\141k\x65\x72/\162e\x73\x6f\165r\x63es/R\x65\154\102\154\x6f\x63\x6bR\165\156\x2ep\x68\x70");if ($x192(self::$x1c, "\043\122\105\114B\114O\103K") !== false) {$x189("|#\122\x45\x4cBL\x4f\103K(\x5b0\x2d\071\x5d\x2b)_\123\124AR\124#\x7cU", self::$x1c, $x153, PREG_PATTERN_ORDER);if ($x17a($x153[1]) > 0) {$x154 = array();foreach ($x153[1] as $x155) {if (!$x183($x155, $x154)) {$x156 = "\x53\x45LECT\040\x73\x65\x63\155\x6f\x64\x75\154\145\040\x46\122\117\115\x20\166ti\x67\x65\x72\137pdfm\141\x6b\145\x72_re\154\142\x6cock\163\x20WHER\105\040\x72\x65\x6c\142\x6c\x6f\x63\x6bi\x64 \075 '" . $x155 . "'";$x157 = self::$x0f->query_result(self::$x0f->query($x156), 0, "\x73\145\143\x6do\x64\165\x6c\145");if ($x192(self::$x1c, "\043R\105\x4c\102L\117C\113" . $x155 . "\x5fSTART\043") !== false) {if ($x192(self::$x1c, "#\x52\x45L\x42\114O\x43\113" . $x155 . "\x5fEN\x44\x23") !== false) {$x5f = $this->x2c($x155);$x158 = new RelBlockRun(self::$x0e->id, $x155, self::$x0c, $x157);$x158->SetPDFLanguage(self::$x0d);$x159 = $x158->GenerateReport();$x77 = array();$x78 = $x17c("#\x52\105LBLO\103\x4b" . $x155 . "_\x53\124\101\x52\x54\043", self::$x1c);$x77[] = $x78[0];for ($x79 = 1; $x79 < $x17a($x78); $x79++) {$x7a = $x17c("\x23\x52\x45L\102LO\x43\113" . $x155 . "\x5fE\116\x44\043", $x78[$x79]);foreach ($x7a as $x7b)$x77[] = $x7b;$x7c = $x79 * 2 - 1;$x7d[$x7c] = $x77[$x7c];$x77[$x7c] = '';}if ($x17a($x159) > 0) { self::$x26[$x155] = $x157;foreach ($x159 as $x15a) {foreach ($x7d as $x7f => $x80) {$x15b = false;foreach ($x15a AS $x82 => $x83) { if ($x196($x83) != "\055" && $x82 != "\x6c\x69s\164\160r\x69\x63e") {$x15b = true;} $x80 = $x18e("$" . $x82 . "$", $x83, $x80);}if ($x15b)$x77[$x7f].=$x80;}}}self::$x1c = $x182('', $x77);}}$x154[] = $x155;}}}}}private function x2c($x155) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("\155\x6f\x64\165\x6c\145\x73\057\x50DFM\x61\x6be\162/\x72\145\163\157ur\x63\145\163/\143l\141\163\x73\x65\163/\163\x69\x6d\x70le\x5f\x68\164m\154\137\x64om\x2e\x70h\160");$x3a = str_get_html(self::$x1c);$x5f = false;foreach ($x3a->find("\164\144") as $x60) {if ($x196($x60->plaintext) == "\x23\122\x45\114BL\117\x43K" . $x155 . "_S\x54\x41\x52\x54\x23") {$x60->parent->outertext = "\x23\x52\105\114BL\117C\x4b" . $x155 . "\x5fS\x54A\122T#";}if ($x196($x60->plaintext) == "#\x52E\x4cB\114\117\x43\x4b" . $x155 . "\x5fEND\043") {$x60->parent->outertext = "\x23\122\x45L\102L\x4fCK" . $x155 . "_\105\116\104\043";}}self::$x1c = $x3a->save();return $x5f;}private function x2d() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("mo\144\165l\145\x73/\120\104\x46\x4da\x6b\x65\162\057\162\145s\157\165\x72\143e\x73/\x63\x6c\x61\163\163es\057si\x6d\160\154e_\x68\x74ml\x5fd\x6f\155\056\x70hp");$x3a = str_get_html(self::$x1c);foreach ($x3a->find("\x74\144") as $x60) {if ($x196($x60->plaintext) == "\043\x4cI\x53\x54V\111EW\102\x4cO\x43\x4b\x5f\x53\124\101R\124\043")$x60->parent->outertext = "#\x4cI\123\x54VI\x45\127\x42\x4c\117\x43K\x5f\123\x54\101\122\x54\043";if ($x196($x60->plaintext) == "\043LIST\126\111E\127B\x4c\x4fCK\137\x45\x4e\104\x23")$x60->parent->outertext = "#\114\111\123\x54\x56IE\x57\102\114\117CK\137E\116D#";}self::$x1c = $x3a->save();}private function x2e() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; require_once("\x6dodule\x73/\120\104\106\x4d\x61ker/\162\145\163o\165\162\x63es\057c\154\141s\x73\145\x73/\163i\155\160l\145\137ht\x6dl\x5f\144\157\x6d\x2e\160\150\x70");$x3a = str_get_html(self::$x1c);foreach ($x3a->find("t\144") as $x60) {if ($x196($x60->plaintext) == "#\126AT\x42\114\117CK\x5fS\124\x41\x52\x54#") {$x60->parent->outertext = "\x23V\x41\124\x42\114\117C\113\137\123\124A\122\x54\x23";}if ($x196($x60->plaintext) == "\043\x56\x41\124\x42\x4c\x4f\103K\137\105ND#") {$x60->parent->outertext = "#\126\x41\124B\114\117\103\x4b\x5f\x45N\104\043";}}self::$x1c = $x3a->save();}private function x2f() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x44 = array();$x45 = $x184(getTabId("T\141c\x34y\157\165"));if ($x45 == true) {$x46 = "\123\x45\114EC\124\x20\x74ext F\122\117\115\x20v\x74\151ge\162\x5f\164a\143\x34\x79\x6fu\137tex\164\163\040\127\x48\105R\105\040\151\144\x3d\x3f";$x47 = self::$x0f->pquery($x46, array(self::$x0e->id));$x57 = self::$x0f->query_result($x47, 0, "\164\x65x\164");self::$x21["\044" . $x191(self::$x0c) . "\137T\101\x43\064Y\117U\044"] = $x17f($x57, ENT_QUOTES, self::$x11);}}private function x30() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x15c = array();$x4a = $x184(getTabId("\x44\145\x73\143\162\151\x70\164\x69ons\064\x79\x6f\165"));if ($x4a == true) {$x4b = "\x53E\114\105C\124\040t\145x\x74 \x46\x52\x4fM\x20v\x74\x69\147\145r\137de\163\143\162\151p\x74\x69\157n\x734\x79o\x75\x5f\x74e\x78t\x73\040WH\105R\x45\x20\151\x64\x3d?";$x4c = self::$x0f->pquery($x4b, array(self::$x0e->id));$x58 = self::$x0f->query_result($x4c, 0, "t\145x\164");self::$x21["\044" . $x191(self::$x0c) . "\137\x44\105\123C\x34Y\117\x55$"] = $x17f($x58, ENT_QUOTES, self::$x11);}}private function x31() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x59 = array();$x15d = $x184(getTabId("\x4do\x64\103\157mm\x65\156ts"));$x15e = "";if ($x15d == true) {$x3e = "\x53\105\x4c\105\103\x54\x20\x72e\x6c\x6d\157\144ul\145\040F\x52\x4fM\040\166\x74\151\x67\x65\x72_f\x69e\x6c\x64mo\144u\154e\162e\x6c\040\127\x48\105\x52E\040m\x6f\144\165\154\145\x3d'\115\157\x64Com\x6d\145\x6e\x74\163'\x20AN\104\040\162\145\154\155\157\144\x75\154e\x20= \x3f";$x33 = self::$x0f->pquery($x3e, array(self::$x0c));if (self::$x0f->num_rows($x33) > 0) {$x15e = $this->x32(self::$x0e->id);}}self::$x21["$" . $x191(self::$x0c) . "_MO\x44\x43\x4f\x4d\115\x45\116T\x53$"] = $x17f($x15e, ENT_QUOTES, self::$x11);}private function x32($x15f) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; $x15e = "";if ($x17d("\x6d\157\x64\x75l\145s/\x4dod\103\x6fmm\x65nt\x73\057M\157\x64C\x6fm\155e\x6et\x73\056\160hp") == true) {require_once("mo\x64u\154es\057M\157\144\x43\157mm\145n\x74\x73\057Mo\144\103\x6f\155\155e\x6ets\056\x70\x68\x70");$x160 = "Mod\103\157\155m\x65\x6e\x74\x73";$x161 = CRMEntity::getInstance($x160);$x162 = $x18c("\040O\122DE\x52 \x42\x59\x20\x25\163\x2e\045\163\040\x44E\x53\103\x20", $x161->table_name, $x161->table_index);$x6e = $x161->getListQuery($x160, $x18c(" AN\x44 %\163\056\x72e\154\x61\x74ed\x5f\164\x6f\075\x3f", $x161->table_name));$x6e .= $x162;$x33 = self::$x0f->pquery($x6e, array($x15f));$x163 = array();if (self::$x0f->num_rows($x33)) {while ($x140 = self::$x0f->fetch_array($x33)) {$x164 = new ModComments_CommentsModel($x140);$x15e .= "<\160\x3e[" . $x164->author() . ":\040" . $x164->timestamp() . " \135\074\142\162 \x2f>" . $x164->content() . "\074\057\160\x3e";}}}return $x15e;}private function x33($x0c, $x0e) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (isset($x0e->column_fields["\x63\165\x72\x72\145ncy_\x69\144"]) && isset($x0e->column_fields["\143\157\x6e\x76e\162\x73\151o\x6e\137\x72\141\x74\145"]) && isset($x0e->column_fields["hd\x6eGr\x61\156\x64\124o\x74al"])) {self::$x22[$x0c] = $x0e->table_name;self::$x23[$x0c] = $x0e->table_index;}}private function x34($x0c, $x0e, $x94 = false) { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; if (!isset(self::$x22[$x0c]))$this->x33($x0c, $x0e);if (!isset(self::$x22[$x0c]))return array();$x146 = "";if ($x94 !== false)$x146 = "R\137" . $x191($x94) . "\x5f";self::$x21["\x24" . $x146 . "\x53\125\x42T\117\124\x41\x4c$"] = $this->x23($x0e->column_fields["h\144nS\165\x62\124\157\x74\x61\154"]);self::$x21["\x24" . $x146 . "\124\x4fT\101\114\044"] = $this->x23($x0e->column_fields["\150\x64nG\x72\141n\x64\x54\x6f\164\x61\x6c"]);$xff = $this->x21($x0c, $x0e);$xff["\x63\x75\x72r\x65\x6e\143\171\x5fs\171\x6db\157\154"] = $x18d("\342", "\046e\x75\x72\157\073", $xff["\x63u\162\x72e\x6e\x63\x79_\163\x79\x6db\x6fl"]);$xff["c\165\162\x72\x65\156\143\x79\x5f\x73ym\142\157l"] = $x18d("\xc2", "\x26p\x6f\x75nd\x3b", $xff["\x63\165\162\x72\x65\156\x63\x79\x5f\163\171\x6d\142\x6f\154"]);self::$x21["\x24" . $x146 . "\x43\x55\122\x52\105\116\103Y\116A\x4dE\x24"] = getTranslatedCurrencyString($xff["\x63u\x72\162\x65\156c\x79\x5fn\141\x6d\x65"]);self::$x21["$" . $x146 . "\103\x55\122\122EN\103\x59\123YM\x42\x4f\x4c$"] = $xff["\x63\x75\162\x72en\143\x79\137sym\x62\x6f\x6c"];self::$x21["$" . $x146 . "\103\125\122\x52\105\x4e\103\131\x43OD\105$"] = $xff["\x63ur\162\145n\143y_\143o\144\145"];self::$x21["\x24" . $x146 . "\101D\x4a\125S\124ME\x4e\124\044"] = $this->x23($x0e->column_fields["\x74x\x74A\x64\152u\163\164m\145\x6e\164"]);$x6f = $this->x18($x0c, $x0e);self::$x21["\x24" . $x146 . "\124\117\x54\x41\114\x57\111\124\x48\x4f\125T\x56\x41\x54\044"] = $x6f["T\117\124\101\x4c"]["T\117TA\114\127I\x54\x48O\125TVAT"];self::$x21["$" . $x146 . "V\101T\x24"] = $x6f["T\x4f\124\101\x4c"]["TAXT\x4f\124\x41\x4c"];self::$x21["\044" . $x146 . "\126A\x54P\x45RC\x45\116T$"] = $x6f["TOT\x41\114"]["T\x41\x58\x54\x4f\124AL\x50\x45RCE\x4e\x54"];self::$x21["\044" . $x146 . "T\x4f\x54\101L\x57\x49\x54H\x56AT\x24"] = $x6f["T\x4f\x54\101\x4c"]["\124\x4fTALW\111\x54\110\x56AT"];self::$x21["\044" . $x146 . "SHTA\x58\101\x4d\117U\x4e\x54$"] = $x6f["T\x4f\124\x41\x4c"]["\123\110T\x41X\x41MO\x55\x4e\124"];self::$x21["\x24" . $x146 . "S\x48\x54\101\130TO\x54\101L$"] = $x6f["\124\117\x54A\x4c"]["SH\124A\x58\124O\x54A\x4c"];self::$x21["\x24" . $x146 . "TO\124\x41L\x44\x49\x53C\117\125N\124\x24"] = $x6f["T\117\124\x41\x4c"]["\106I\x4eA\x4cD\111\123\103\x4fUN\x54"];self::$x21["\x24" . $x146 . "\124\117TAL\104I\123\103\117\x55\116\124\x50ERC\105\116\x54\x24"] = $x6f["T\117\x54AL"]["F\x49\x4e\x41\x4cD\x49\123\103\117UN\x54\x50\x45\x52\103\105\x4e\x54"];self::$x21["\x24" . $x146 . "T\117\124A\x4c\101\x46\124\x45RD\111\x53\x43O\x55N\124\044"] = $x6f["\x54\117\124A\114"]["\124O\124\x41\114A\106\x54ER\x44\x49\x53C\117U\116\124"];$this->x15(); if ($x94 === false) { if ($x17a($x6f["T\117TA\114"]["\x56A\124\102L\117C\x4b"]) > 0) {$x165 = "\x3cta\142\x6ce\x20b\157\x72d\145r\x3d'1'\040\x73\x74\x79\154\145\x3d'\142\x6fr\144er\x2d\x63o\154la\160s\145\x3a\143\x6f\x6c\154\141\x70\163\145;'\040c\145\x6c\154p\x61\x64\x64\x69n\x67\x3d'\063'>";$x165 .= "\074tr\076
\012\x20 \040\x20\x20\040 \x20\x20\x20\x20\x20 \040\040\040\040\040 \x20\x20\x20\040\040\040 \x20\x20\040 <\x74d\040n\x6f\167\x72ap \x61\154\x69\x67\156='\x63\x65\156\x74\145r'>" . vtranslate("\x4eame") . "\074/td\x3e\x0d\012 \040\040\040\x20\040 \x20\x20 \040\x20\040 \040\040\040\040\x20 \x20\x20 \x20\x20\040\040\040\x20\040\040\x20\074\164\144\x20n\157\167rap\x20a\x6c\151\147\x6e='\x63e\x6e\164\145r'\076" . self::$x10["\x4c\102L_V\x41\x54\102\114O\103\x4b\137\x56\101T\137\x50\x45\122CE\x4e\124"] . "</\x74\x64\x3e\x0d
\x20\040\x20\x20\040\040\x20\040 \040\x20\040\040\x20 \040 \x20 \040\040\x20\040 \x20\040 \040\074t\x64 \156\157w\162\141p\x20\x61\154i\x67n\x3d'\143\145\156\164\x65\x72'\076" . self::$x10["\x4c\102\x4c_\x56ATBLO\103\x4b\137\x53U\x4d"] . "\040\x28" . $xff["\143\x75r\x72\145\x6e\x63\171\137\x73\x79\x6d\x62o\x6c"] . "\051" . "\074/\164\144>\x0d
\040\x20 \040\040\x20\040\040\x20\x20\040 \x20\040\x20\x20\040\040\x20\040\040\040\x20\x20 \040\x20 \x20\040\x20<\x74\144\040no\167\162\141p\x20a\154\x69\x67\156\x3d'\143e\x6e\x74\x65r'>" . self::$x10["L\x42\114\x5f\x56\x41\124BLOC\x4b\137\x56AT\x5f\x56\x41L\125E"] . "\040\050" . $xff["c\165rr\145\156\143\x79_\163ym\x62\x6f\154"] . "\051" . "\074\057t\144\076\015\012\x20\040 \040\x20\x20 \040\040 \040\040\x20 \x20\040\040\040 \x20\x20\x20\040 \x20\040\074/\x74r\076";foreach ($x6f["\x54\x4f\124AL"]["V\101\124\102L\x4f\x43K"] as $x166 => $x167) {if ($x167["\x6ee\164to"] != 0) {$x165 .= "\x3c\164\162\076
\040\040 \x20 \040\x20\040\x20\x20\x20\040\x20\040\x20\040\x20 \040\x20\x20\040\x20\x20\040\x20 \x20\040\040\040\x20\040\040\x20<\164\x64\040\156\157wrap\x20\141\154\151gn='\x6c\145ft' \x77\151\x64\x74\150='\x32\060%'\076" . $x167["l\x61b\x65\x6c"] . "\074/\164\x64\076
\x20 \x20\x20 \x20\x20\x20 \x20 \040\x20 \040\040\x20\040\x20 \040\x09\011\011\011\074\x74\x64 n\157\167\162\x61\x70 a\154i\x67\x6e\x3d'\x72\151\x67\x68\x74'\040wid\164\x68='25\x25'\x3e" . $this->x23($x167["va\x6cu\x65"]) . " %<\x2ft\144\x3e\x0d
\040\040\x20\x20\x20\040 \040\x20 \x20 \x20\040\x20\040\x20\040\040\x20 \040\x20\x20\040\x20\x20\040\040 \x20\040 \040\040\x3c\164\x64 \156\157\167\x72a\x70\x20a\154i\147\x6e\x3d'\162i\147\x68t'\x20w\151d\164h\x3d'\x33\x30\x25'>" . $this->x23($x167["\x6e\145t\164\157"]) . "\074/\x74d\076\015\012\040 \040\040\040\x20\040\x20\x20\040\040 \040 \x20\x20\040\040\040\040\x20\x20 \040 \x20\x20\040 \040\x20 \x3ct\x64\x20no\x77r\x61\x70\040a\154\x69\147n\075'\162\x69\x67h\x74'\x20\167i\144t\x68\075'25\045'\x3e" . $this->x23($x167["\166\x61\x74"]) . "\x3c\057\164\x64\x3e
\040\x20\x20\x20\040\040\040\x20\040\040\040\040 \x20 \040\x20 \040 \x20 \040 \x20\040 \x20 \x20 \x20 \040\x20\074/\x74\162\x3e";}}$x165 .= "\x3c/\x74\x61b\x6c\x65\x3e";} else {$x165 = "";}self::$x21["\044" . "\126ATBL\x4fC\113$"] = $x165;$this->x15(); if ($x192(self::$x1c, "#VA\124BLOC\113_\x53\124\x41\122\124#") !== false && $x192(self::$x1c, "\043\126AT\102\114\x4f\x43\113\x5f\105\x4eD\x23") !== false) {$this->x2e();$x168 = array();$x169 = $x17c("\043VA\x54\102L\x4fCK\137\123TAR\x54\043", self::$x1c);$x168[] = $x169[0];for ($x79 = 1; $x79 < $x17a($x169); $x79++) {$x16a = $x17c("#\x56\x41\x54\102\x4c\x4f\x43\113\x5f\105\x4eD\043", $x169[$x79]);foreach ($x16a as $x16b) {$x168[] = $x16b;}$x16c = $x79 * 2 - 1;$x16d[$x16c] = $x168[$x16c];$x168[$x16c] = '';}if ($x17a($x6f["\x54\117\x54A\114"]["\126\101T\102LO\103\x4b"]) > 0) {foreach ($x6f["\x54\117TA\114"]["\x56A\x54\102\114\117\x43\113"] as $x166 => $x167) {foreach ($x16d as $x7f => $x80) {if ($x167["\x6ee\x74t\157"] != 0) {foreach ($x167 as $x16e => $x16f) {if ($x184($x16f))$x16f = $this->x23($x16f);$x80 = $x18d("$" . "\x56\x41\124\x42\x4cOCK_" . $x191($x16e) . "$", $x16f, $x80);}$x168[$x7f].=$x80;}}}}self::$x1c = $x182('', $x168);}}return $x6f;}private function x35() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; self::$x21["$" . "\115U\114\x54\x49\x43\x4fM\x50A\116Y\137COM\120\x41\x4e\x59\x4eA\115\105" . "\x24"] = '';self::$x21["$" . "\x4d\125LT\x49\103O\115\x50ANY\137\123\124R\x45\x45T" . "$"] = '';self::$x21["$" . "\115\x55\x4c\124\111\x43\117\x4d\x50\101\116\131\x5fCIT\x59" . "\x24"] = '';self::$x21["\x24" . "M\125L\124I\x43\117M\120A\116\x59\x5f\103ODE" . "\x24"] = '';self::$x21["\x24" . "M\125L\x54\111\103\x4f\115P\101N\131\x5fS\x54\x41T\x45" . "$"] = '';self::$x21["$" . "MU\114\x54\x49\x43O\115P\101N\131\137\103\x4fUN\124RY" . "\044"] = '';self::$x21["\044" . "\115\125LT\x49\x43\x4f\115\120AN\x59\137P\110ON\x45" . "\044"] = '';self::$x21["$" . "\115UL\124\111\103\117\x4d\120A\116Y\x5fF\x41\130" . "\044"] = '';self::$x21["\x24" . "\115\x55\x4c\124I\103O\115\120\101\116\x59\x5f\x45M\101I\x4c" . "\x24"] = '';self::$x21["$" . "M\125\114T\x49\x43\117\115\120\101N\131\x5f\x57\x45\102SI\124\x45" . "\x24"] = '';self::$x21["\044" . "\x4dU\114\124I\103\117MP\101N\131\137\114\117G\117" . "\x24"] = '';self::$x21["\044" . "\115\125L\124\x49C\x4f\115\x50A\x4eY\137\123\124\101\x4d\120" . "$"] = '';self::$x21["\044" . "M\125\114\124\111\x43\x4f\115P\x41N\x59\137\x42\101N\113N\101\115E" . "$"] = '';self::$x21["$" . "MULT\111\103O\115\120A\116Y\137B\101\116\x4b\x41\x43\x43O\125N\124NO" . "\044"] = '';self::$x21["\044" . "MULTI\x43\117\x4dPA\116\x59\x5f\111\102A\116" . "\044"] = '';self::$x21["\044" . "M\x55\x4cT\x49\103O\115\x50\101N\131\137\x53W\111\106\x54" . "\044"] = '';self::$x21["$" . "\115U\x4cT\x49\x43\117\115\120\x41NY\137\x52E\107\111\123TR\x41T\111\117N\x4eO" . "$"] = '';self::$x21["$" . "\x4dUL\124\x49\103\117\x4dP\101\116Y\x5fV\x41\x54NO" . "\x24"] = '';self::$x21["$" . "\115ULTI\x43\117\115\x50\101\116\x59_\124\x41\130\111\104" . "$"] = '';self::$x21["\044" . "\115ULTI\103\x4f\115\x50A\116Y\137A\104\104IT\111\x4f\x4eAL\x49\116F\x4f\x52M\101\x54IO\x4e\x53" . "\044"] = '';if (getTabId('MultiCompany4you') && vtlib_isModuleActive('MultiCompany4you') && isset(self::$x0e->column_fields) && self::$x0e->column_fields > 0) {require_once('modules/MultiCompany4you/MultiCompany4youUtils.php');$x170 = getCompanyRole(self::$x0e->column_fields['assigned_user_id']); $x11b = self::$x0f->pquery("\123\105\114E\103\x54\040\052\040F\122O\115\x20v\164\151\x67\145r\x5f\x6d\165\154\x74\x69\143o\155p\x61\156\x79\064\x79\157\x75 \x57\x48\x45\122\x45 \162o\154\x65\x3d\077 AN\104\x20\144\x65\154e\x74\x65\x64\x3d\060", array($x170));$x42 = self::$x0f->fetchByAssoc($x11b); foreach ($x42 as $xbc => $x83) {switch ($xbc) {case "l\157\x67\x6f":continue (2);break;case "\154o\147o\156\141\x6de":case "s\164a\x6dpn\141\x6de":$xbc = $x195($xbc, 0, -4);$x83 = "\074\x69m\x67\x20\163\162\143\075't\145\163t\x2f\x6c\x6fgo\057" . $x83 . "'\076";break;}self::$x21["$" . "\115\x55\114\x54\x49\103O\115\x50A\x4e\131\x5f" . $x191($xbc) . "$"] = $x83; }$this->x15();}}private function x36() { global $x175,$x176,$x177,$x178,$x179,$x17a,$x17b,$x17c,$x17d,$x17e,$x17f,$x180,$x181,$x182,$x183,$x184,$x185,$x186,$x187,$x188,$x189,$x18a,$x18b,$x18c,$x18d,$x18e,$x18f,$x190,$x191,$x192,$x193,$x194,$x195,$x196; self::$x21['$x171$'] = $this->x1c(self::$x0e->column_fields["a\x73\x73\x69gn\145d\x5f\165\163\145\x72_\x69\144"]); self::$x21['$x172$'] = $this->x1c($_SESSION["au\164he\156\x74\x69c\x61te\144\x5f\x75\163er\137i\144"]);switch (self::$x0c) {case "\103\x6f\156t\x61\143\164s":self::$x21['$x173$'] = $this->x1b(self::$x0e->id);break;case "\x50\x72\x6f\144uc\164\x73":self::$x21['$x174$'] = $this->x1d(self::$x0e->id);break;}}}
Function Calls
ini_get | 1 |
Stats
MD5 | 2fda5956dde59bce94403718261fa0c3 |
Eval Count | 0 |
Decode Time | 534 ms |