/**
 * Outputs decrypted attribute values.
 * In the format of the hidden fields and as a javascript array.
 * array( variable_id => array
                         (
                             variable_blowfish_encrypted_value,
                             blowfish_rsa_encoded_key
 */
 function getEncryptedHiddenCreditCardInfo()
 {
     $result = "";
     if (isset($this->_customer['CreditCard']['id'])) {
         $encrypted_data = array();
         foreach ($this->_customer_encrypted['CreditCard']['attr'] as $attr) {
             $this->_counter++;
             $this->_attr = array('tag' => $attr['tag'], 'name' => $attr['name'] . "_encrypted", 'value' => nl2br(_ml_htmlentities($attr['value'])), 'person_attribute_id' => $attr['person_attribute_id'], 'encrypted_secret_key' => $attr['encrypted_secret_key'], 'rsa_public_key_asc_format' => $attr['rsa_public_key_asc_format']);
             $encrypted_data[$attr["person_attribute_id"]] = array("variable_value__blowfish_encrypted" => $this->_attr["value"], "blowfish_key__rsa_encrypted" => $this->_attr["encrypted_secret_key"], "rsa_public_key_asc_format" => $this->_attr["rsa_public_key_asc_format"]);
         }
         $result = '<input type="hidden" name="encrypted_data[' . $this->_group['id'] . ']" value="' . base64_encode(serialize($encrypted_data)) . '">';
         return $result;
     } else {
         return "";
     }
 }
 function outDebugInfo($debug_info)
 {
     global $application;
     $return_html_code = "";
     foreach ($debug_info as $key => $value) {
         if (strstr(_ml_strtolower($value[0]), "xml")) {
             $value[1] = preg_replace("/(>)(<[^\\/])/", "\\1\n\\2", $value[1]);
             $value[1] = preg_replace("/(<\\/[^>]+>)([^\n])/", "\\1\n\\2", $value[1]);
             $value[1] = nl2br(_ml_htmlentities($value[1]));
         }
         if (preg_match("/(post|get) params/", _ml_strtolower($value[0]))) {
             $out = "";
             foreach ($value[1] as $_k => $_v) {
                 $out .= $_k . " =&gt; " . $_v . "<br>";
             }
             $value[1] = $out;
         }
         $this->_Template_Contents = array("VarName" => $value[0], "VarValue" => $value[1]);
         $application->registerAttributes($this->_Template_Contents);
         $return_html_code .= $this->mTmplFiller->fill("shipping_tester/", "debug_info_var.tpl.html", array());
     }
     return $return_html_code;
 }
 function xml_tag(&$document, $tag_name, $tag_attrs = array(), $tag_contents = '')
 {
     // Constructor function for xml_tag class
     // Set object variables
     $this->name = $tag_name;
     $this->attributes = $tag_attrs;
     $this->contents = _ml_htmlentities($tag_contents);
     $this->tags = array();
     // Initialize children array/collection
     $this->children = array();
 }
 function onApplicationStarted()
 {
     global $zone;
     if ($zone == 'AdminZone') {
         if (modApiFunc('Settings', 'getParamValue', 'TIMELINE', 'LOG_BACKEND_ACCESS') === 'NO') {
             return;
         }
         $type = getMsg('TL', 'TL_AZ_ACCESS');
     } else {
         if (modApiFunc('Settings', 'getParamValue', 'TIMELINE', 'LOG_STOREFRONT_ACCESS') === 'NO') {
             return;
         }
         $type = getMsg('TL', 'TL_CZ_ACCESS');
     }
     $header = str_replace(array('{IP}', '{URL}'), array(getVisitorIP(), _ml_htmlentities(str_replace("&", "\t&", getCurrentURL()))), getMsg('TL', 'TL_VISITOR_HEADER'));
     $body = prepareArrayDisplay($_GET, '$_GET');
     $body .= prepareArrayDisplay($_POST, '$_POST');
     $body .= prepareArrayDisplay($_SESSION, '$_SESSION');
     $this->addLog($type, $header, $body);
 }