function getEscapedMap() { $map = $this->getMap(); $map['gc_from'] = escapeAttrHTML($map['gc_from']); $map['gc_to'] = escapeAttrHTML($map['gc_to']); $map['gc_message'] = escapeAttrHTML($map['gc_message']); $map['gc_fname'] = escapeAttrHTML($map['gc_fname']); $map['gc_lname'] = escapeAttrHTML($map['gc_lname']); $map['gc_email'] = escapeAttrHTML($map['gc_email']); $map['gc_address'] = escapeAttrHTML($map['gc_address']); $map['gc_city'] = escapeAttrHTML($map['gc_city']); $map['gc_zip'] = escapeAttrHTML($map['gc_zip']); $map['gc_phone'] = escapeAttrHTML($map['gc_phone']); return $map; }
function getTag($tag) { global $application; $value = null; switch ($tag) { case 'Local_Messages': $value = $this->outputMessages(); break; case 'Local_FormActionURL': $request = new Request(); $request->setView(CURRENT_REQUEST_URL); $request->setAction('AddGCToCart'); $value = $request->getURL(); break; case 'Local_GC_Amount': $value = escapeAttrHTML($this->gcValues['gc_amount']); break; case 'Local_GC_From': $value = escapeAttrHTML($this->gcValues['gc_from']); break; case 'Local_GC_To': $value = escapeAttrHTML($this->gcValues['gc_to']); break; case 'Local_GC_Message': $value = $this->gcValues['gc_message']; break; case 'Local_GC_LastName': $value = escapeAttrHTML($this->gcValues['gc_lname']); break; case 'Local_GC_FirstName': $value = escapeAttrHTML($this->gcValues['gc_fname']); break; case 'Local_GC_CountriesList': $country_id = $this->gcValues['gc_country_id']; #$JavascriptFunctions = ""; $value = modApiFunc("Checkout", "genCountrySelectList", $country_id); break; case 'Local_JSFunctions': $value = modApiFunc("Location", "getJavaScriptCountriesStatesArrays") . modApiFunc("Checkout", "getJavascriptSynchronizeCountriesAndStatesLists"); break; case 'Local_GC_StatesList': $state_id = $this->gcValues['gc_state_id']; $country_id = $this->gcValues['gc_country_id']; if (empty($country_id)) { // : move the message to the resource. /*_fatal(*/ //echo "The country is not specified yet. It's impossible to check if the state has been selected valid." /*)*/; $country_id = 223; // USA //The list will be updated automatically by the script body.onload() } $value = modApiFunc("Checkout", "genStateSelectList", $state_id, $country_id); break; case 'Local_GC_ZipCode': $value = escapeAttrHTML($this->gcValues['gc_zip']); break; case 'Local_GC_City': $value = escapeAttrHTML($this->gcValues['gc_city']); break; case 'Local_GC_Address': $value = escapeAttrHTML($this->gcValues['gc_address']); break; case 'Local_GC_Phone': $value = escapeAttrHTML($this->gcValues['gc_phone']); break; case 'Local_GC_Email': $value = escapeAttrHTML($this->gcValues['gc_email']); break; case 'Local_GC_SendType_Email_Selected': if ($this->gcValues['gc_sendtype'] == "E") { $value = 'selected="selected"'; } break; case 'Local_GC_SendType_Post_Selected': if ($this->gcValues['gc_sendtype'] == "P") { $value = 'selected="selected"'; } break; case 'Local_GC_Currency_Sign': $value = DEFAULT_CURRENCY_SIGN; break; default: if (isset($this->gc_item[$tag])) { $value = escapeAttrHTML($this->gc_item[$tag]); } break; } return $value; }