Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

global $x20,$x21; $x20="d\141t\145"; $x21="\155\x64\x35"; class PDFMaker_SaveIntoDoc..

Decoded Output download

<?  global $x20,$x21;  
 
$x20="date"; $x21="md5";  
class PDFMaker_SaveIntoDocuments_Action extends Vtiger_Action_Controller {public function checkPermission(Vtiger_Request $x0b) { global $x20,$x21; }public function process(Vtiger_Request $x0b) { global $x20,$x21; require_once("modules/PDFMaker/resources/mpdf/mpdf.php");$x0c = PearDatabase::getInstance();$x0d = new PDFMaker_PDFMaker_Model();$x0e = "P";$x0f = "vtiger_current_version";$x10 = "site_URL";$x11 = vglobal($x0f);$x12 = vglobal($x10);$x13 = $x0b->get('pmodule');$x14 = $x0b->get('language');$x15 = $x0c->query("SELECT license FROM vtiger_pdfmaker_version WHERE version='" . $x11 . "'");if (!$x15 || ($x0c->query_result($x15, 0, "license") != $x0e.$x21("professional/".$x12."t6") && $x0c->query_result($x15, 0, "license") != $x0e.$x21("basic/".$x12."t6"))) {$x15 = array("success"=>false,"message"=>vtranslate("LBL_INVALID_KEY", "PDFMaker"));} else {require_once("modules/Documents/Documents.php");$x16 = new Documents();$x16->parentid = $x0b->get('pid');$x17 = CRMEntity::getInstance($x13);if (isset($x16->parentid)) {$x17->retrieve_entity_info($x16->parentid, $x13);$x17->id = $x16->parentid;}$x15 = $x0c->query("SELECT fieldname FROM vtiger_field WHERE uitype=4 AND tabid=" . getTabId($x13));$x18 = $x0c->query_result($x15, 0, "fieldname");if (isset($x17->column_fields[$x18]) && $x17->column_fields[$x18] != "") {$x19 = $x0d->generate_cool_uri($x17->column_fields[$x18]) . ".pdf";} else {$x19 = "doc_" . $x16->parentid . $x20("ymdHi") . ".pdf";}$x16->column_fields["notes_title"] = $x0b->get('notes_title');$x16->column_fields["assigned_user_id"] = Vtiger_Session::get('AUTHUSERID');$x16->column_fields["filename"] = $x19;$x16->column_fields["notecontent"] = $x0b->get('notecontent');$x16->column_fields["filetype"] = "application/pdf";$x16->column_fields["filesize"] = "";$x16->column_fields["filelocationtype"] = "I";$x16->column_fields["fileversion"] = '';$x16->column_fields["filestatus"] = "on";$x16->column_fields["folderid"] = $x0b->get('folderid');$x16->save("Documents"); $x1a = $x0b->get('pdfdoc_contact_id');if (isset($x1a) && $x1a != "") {$x1b = "INSERT INTO vtiger_senotesrel(crmid, notesid) VALUES(?,?)";$x0c->pquery($x1b, array($x1a, $x16->id));} $x1c = $x0b->get('pdfdoc_account_id');if (isset($x1c) && $x1c != "") {$x1b = "INSERT INTO vtiger_senotesrel(crmid, notesid) VALUES(?,?)";$x0c->pquery($x1b, array($x1c, $x16->id));}$x1d = $x0b->get('template_ids');$x0d->createPDFAndSaveFile($x0b,$x1d, $x16, $x17, $x19, $x13, $x14); $x15 = array("success"=>true,"message"=>vtranslate("LBL_PDF_ADDED_DOC", "PDFMaker"));}$x1e = new Vtiger_Response();try {$x1e->setResult($x15);} catch (Exception $x1f) {$x1e->setError($x1f->getCode(), $x1f->getMessage());}$x1e->emit();}} 
 ?>

Did this file decode correctly?

Original Code

global $x20,$x21; 

$x20="d\141t\145"; $x21="\155\x64\x35"; 
class PDFMaker_SaveIntoDocuments_Action extends Vtiger_Action_Controller {public function checkPermission(Vtiger_Request $x0b) { global $x20,$x21; }public function process(Vtiger_Request $x0b) { global $x20,$x21; require_once("\x6d\157\x64ul\x65\x73/\120D\x46Ma\x6be\x72\x2f\162\x65\163\157ur\143\x65s\x2f\x6d\x70d\x66/m\160\x64f\056\x70\150p");$x0c = PearDatabase::getInstance();$x0d = new PDFMaker_PDFMaker_Model();$x0e = "P";$x0f = "\166t\x69\x67\145\162\x5f\143\x75\162\162e\x6e\164_\x76\145\x72\x73\x69o\x6e";$x10 = "s\x69te_\x55\x52L";$x11 = vglobal($x0f);$x12 = vglobal($x10);$x13 = $x0b->get('pmodule');$x14 = $x0b->get('language');$x15 = $x0c->query("S\x45L\x45\103T\x20\154ic\x65\156\163e\040\x46R\117\x4d\x20v\164\x69g\x65\162_\x70\144\146\x6d\x61\x6ber\137\166e\162s\151\157\x6e\040\127H\105\x52E \166e\162\x73\151o\156='" . $x11 . "'");if (!$x15 || ($x0c->query_result($x15, 0, "li\143\145n\163e") != $x0e.$x21("\x70\x72\x6f\146essio\x6ea\154\057".$x12."\v\1646") && $x0c->query_result($x15, 0, "lice\156\x73\145") != $x0e.$x21("\142\141\x73\151\x63\057".$x12."\v\1646"))) {$x15 = array("s\165c\143\x65\x73\x73"=>false,"m\145\x73\163\141\x67e"=>vtranslate("\x4c\102L\137\x49\116\126\x41\114\111D_\113E\x59", "\120\x44\x46Ma\x6ber"));} else {require_once("\x6do\x64\165l\145\x73/\x44\157\143\x75m\145nt\163/\104\157\143\x75\155e\156\x74\x73.\x70\x68\160");$x16 = new Documents();$x16->parentid = $x0b->get('pid');$x17 = CRMEntity::getInstance($x13);if (isset($x16->parentid)) {$x17->retrieve_entity_info($x16->parentid, $x13);$x17->id = $x16->parentid;}$x15 = $x0c->query("\123\105\114E\x43\x54\x20\x66\x69\145\x6c\x64\x6e\x61\x6de\040\106\122\x4f\x4d\040\166\164\151g\145\x72_f\x69\145\154\x64 \x57\x48\105\122E\040\x75\151\164\x79pe\0754 \101N\x44\040\x74ab\x69\x64\x3d" . getTabId($x13));$x18 = $x0c->query_result($x15, 0, "\x66\151\x65\154dn\x61m\145");if (isset($x17->column_fields[$x18]) && $x17->column_fields[$x18] != "") {$x19 = $x0d->generate_cool_uri($x17->column_fields[$x18]) . "\056\x70\144\x66";} else {$x19 = "\144o\143\137" . $x16->parentid . $x20("y\x6d\x64\110i") . "\056\160\144\x66";}$x16->column_fields["\156\157\x74es_t\x69\x74l\145"] = $x0b->get('notes_title');$x16->column_fields["a\163s\151gn\x65\x64\x5f\165\x73\x65r\137\x69\144"] = Vtiger_Session::get('AUTHUSERID');$x16->column_fields["\146\x69\154ename"] = $x19;$x16->column_fields["n\157\164e\143\157\156t\x65nt"] = $x0b->get('notecontent');$x16->column_fields["\146\151le\x74y\160\145"] = "a\160p\x6c\151\143a\164\151\x6f\156\057\x70\144f";$x16->column_fields["\146\x69\154\x65\x73\151z\145"] = "";$x16->column_fields["\x66il\145\154o\x63at\151o\156\x74y\x70\145"] = "\111";$x16->column_fields["f\151\154ev\x65\162\x73\151\157\x6e"] = '';$x16->column_fields["\x66i\154\145s\x74\x61t\165s"] = "\157\x6e";$x16->column_fields["\x66\x6fl\144\x65ri\x64"] = $x0b->get('folderid');$x16->save("\104\x6f\143u\155e\x6e\x74\163"); $x1a = $x0b->get('pdfdoc_contact_id');if (isset($x1a) && $x1a != "") {$x1b = "\x49NS\x45R\x54\x20\111\x4eTO\x20\166ti\x67\145\x72\x5fs\145\156\x6f\164e\163r\x65\x6c\x28\x63rmi\x64, \156ote\163\x69\144\x29\040\x56\x41\x4c\x55E\123\050?,\077)";$x0c->pquery($x1b, array($x1a, $x16->id));} $x1c = $x0b->get('pdfdoc_account_id');if (isset($x1c) && $x1c != "") {$x1b = "\111\x4e\x53\x45\x52\124\x20\111\x4e\124\x4f \166\164\x69\x67\x65\x72\x5fs\x65no\164\x65s\x72e\154\x28\x63\x72\155\151d, n\157t\145\163\151d) \126\x41\x4cU\x45S(\x3f,\x3f\x29";$x0c->pquery($x1b, array($x1c, $x16->id));}$x1d = $x0b->get('template_ids');$x0d->createPDFAndSaveFile($x0b,$x1d, $x16, $x17, $x19, $x13, $x14); $x15 = array("\163\165\143c\x65\x73\163"=>true,"mes\163ag\x65"=>vtranslate("L\x42\x4c_\120\x44F_\101\104D\105\104\x5f\104\x4f\x43", "\x50\x44F\x4d\141\153er"));}$x1e = new Vtiger_Response();try {$x1e->setResult($x15);} catch (Exception $x1f) {$x1e->setError($x1f->getCode(), $x1f->getMessage());}$x1e->emit();}}

Function Calls

None

Variables

$x20 date
$x21 md5

Stats

MD5 220299d740488d59ef37af22dfa44b56
Eval Count 0
Decode Time 112 ms