/* Decoded by unphp.net */
query("SELECT license FROM vtiger_pdfmaker_version WHERE version='".$$xxx0e."'");if(!$xxx12 || ($$xxx0d->query_result($xxx12,0,"license")!=$xxx46($$xxx0f) && $$xxx0d->query_result($xxx12,0,"license")!=$xxx46("basic/".$$xxx0f))){ echo "Invalid license key! Please contact the vendor of PDF Maker."; exit;}else{ if(isset($_REQUEST["idslist"]) && $_REQUEST["idslist"]!=""){$xxx13 = $xxx3d(";", $xxx4a($_REQUEST["idslist"],";"));if(isset($_SESSION[$_REQUEST["relmodule"]."_listquery"])){$xxx14 = $_SESSION[$_REQUEST["relmodule"]."_listquery"];$xxx15 = $xxx11->table_index; $xxx16 = $$xxx0d->query($xxx14);$xxx17 = array();while($xxx18 = $$xxx0d->fetchByAssoc($xxx16)){if(isset($xxx18[$xxx15]) && $xxx44($xxx18[$xxx15], $xxx13)){$xxx17[$xxx18[$xxx15]] = $xxx18[$xxx15];}}$xxx13 = $xxx3c($xxx17);}else{$xxx4b($xxx13);} } elseif(isset($_REQUEST['record'])) {$xxx13 = array($_REQUEST["record"]); } $xxx19 = $xxx4e($_REQUEST["commontemplateid"],";"); $xxx1a = $xxx3d(";",$xxx19); $xxx1b=""; if($_REQUEST["mode"] == "content") {$xxx1c = array();foreach($xxx13 as $xxx1d){ $xxx11->retrieve_entity_info($xxx1d,$_REQUEST["relmodule"]); $xxx11->id = $xxx1d; foreach ($xxx1a AS $xxx1e) {$xxx1f = $xxx10->GetPDFContentRef($xxx1e, $_REQUEST["relmodule"], $xxx11, $_REQUEST["language"]);$xxx20 = $xxx1f->getContent();$xxx21 = $xxx20["body"];$xxx21 = $xxx4c("#LISTVIEWBLOCK_START#","",$xxx21);$xxx21 = $xxx4c("#LISTVIEWBLOCK_END#","",$xxx21);$xxx1c[$xxx1e]["header"] = $xxx20["header"];$xxx1c[$xxx1e]["body"] = $xxx21;$xxx1c[$xxx1e]["footer"] = $xxx20["footer"]; }}include_once("modules/PDFMaker/EditPDF.php");showEditPDFForm($xxx1c); } else {if (isset($_REQUEST["type"]) && ($_REQUEST["type"] == "doc" OR $_REQUEST["type"] == "rtf")){$xxx22 = array();$xxx23 = 1;foreach($xxx13 as $xxx1d){ $xxx11->retrieve_entity_info($xxx1d,$_REQUEST["relmodule"]);$xxx11->id = $xxx1d;foreach ($xxx1a AS $xxx1e){ $xxx1f = $xxx10->GetPDFContentRef($xxx1e, $_REQUEST["relmodule"], $xxx11, $_REQUEST["language"]); $xxx1f->pagebreak = "
"; $xxx24 = $xxx1f->getSettings(); if($xxx1b=="")$xxx1b = $xxx1f->getFilename(); if (isset($_REQUEST["mode"]) && $_REQUEST["mode"] == "edit") { $xxx25 = $_REQUEST["header".$xxx1e]; $xxx21 = $_REQUEST["body".$xxx1e]; $xxx26 = $_REQUEST["footer".$xxx1e]; } else { $xxx20 = $xxx1f->getContent(); $xxx25 = $xxx20["header"]; $xxx21 = $xxx20["body"]; $xxx26 = $xxx20["footer"]; } if ($xxx25 != "" OR $xxx26 != "") { $xxx27 = "cache/pdfmaker/".$xxx1d."_headerfooter_".$xxx1e."_".$xxx23.".html"; $xxx25 = $xxx4c("{PAGENO}","1",$xxx25); $xxx26 = $xxx4c("{PAGENO}","1",$xxx26);$xxx25 = $xxx4c("{nb}","1",$xxx25); $xxx26 = $xxx4c("{nb}","1",$xxx26); $xxx28 = '';} else { $xxx27 = ""; $xxx28 = "";}$xxx21 = $xxx4c("#LISTVIEWBLOCK_START#","",$xxx21);$xxx21 = $xxx4c("#LISTVIEWBLOCK_END#","",$xxx21);$xxx29 = "