128 $this->bOutputEntities =
true;
137 $this->bOutputEntities =
false;
151 $this->xml .= $this->
_cmdXML(array(
"n"=>
"cc",
"t"=>$iCmdNumber),$sMessage);
166 $this->xml .= $this->
_cmdXML(array(
"n"=>
"as",
"t"=>$sTarget,
"p"=>$sAttribute),$sData);
181 $this->xml .= $this->
_cmdXML(array(
"n"=>
"ap",
"t"=>$sTarget,
"p"=>$sAttribute),$sData);
197 $this->xml .= $this->
_cmdXML(array(
"n"=>
"pp",
"t"=>$sTarget,
"p"=>$sAttribute),$sData);
214 $sDta =
"<s><![CDATA[$sSearch]]></s><r><![CDATA[$sData]]></r>";
215 $this->xml .= $this->
_cmdXML(array(
"n"=>
"rp",
"t"=>$sTarget,
"p"=>$sAttribute),$sDta);
229 $this->
addAssign($sTarget,$sAttribute,
'');
241 $this->xml .= $this->
_cmdXML(array(
"n"=>
"al"),$sMsg);
256 $queryStart = strpos($sURL,
'?', strrpos($sURL,
'/'));
257 if ($queryStart !== FALSE)
260 $queryEnd = strpos($sURL,
'#', $queryStart);
261 if ($queryEnd === FALSE)
262 $queryEnd = strlen($sURL);
263 $queryPart = substr($sURL, $queryStart, $queryEnd-$queryStart);
264 parse_str($queryPart, $queryParts);
266 foreach($queryParts as $key => $value)
268 $newQueryPart .= rawurlencode($key).
'='.rawurlencode($value).ini_get(
'arg_separator.output');
270 $sURL = str_replace($queryPart, $newQueryPart, $sURL);
272 $this->
addScript(
'window.location = "'.$sURL.
'";');
284 $this->xml .= $this->
_cmdXML(array(
"n"=>
"js"),$sJS);
296 $arguments = func_get_args();
297 $sFunc = array_shift($arguments);
299 $this->xml .= $this->
_cmdXML(array(
"n"=>
"jc",
"t"=>$sFunc),$sData);
311 $this->xml .= $this->
_cmdXML(array(
"n"=>
"rm",
"t"=>$sTarget),
'');
329 trigger_error(
"The \$sType parameter of addCreate has been deprecated. Use the addCreateInput() method instead.", E_USER_WARNING);
332 $this->xml .= $this->
_cmdXML(array(
"n"=>
"ce",
"t"=>$sParent,
"p"=>$sId),$sTag);
347 $this->xml .= $this->
_cmdXML(array(
"n"=>
"ie",
"t"=>$sBefore,
"p"=>$sId),$sTag);
362 $this->xml .= $this->
_cmdXML(array(
"n"=>
"ia",
"t"=>$sAfter,
"p"=>$sId),$sTag);
380 $this->xml .= $this->
_cmdXML(array(
"n"=>
"ci",
"t"=>$sParent,
"p"=>$sId,
"c"=>$sType),$sName);
398 $this->xml .= $this->
_cmdXML(array(
"n"=>
"ii",
"t"=>$sBefore,
"p"=>$sId,
"c"=>$sType),$sName);
416 $this->xml .= $this->
_cmdXML(array(
"n"=>
"iia",
"t"=>$sAfter,
"p"=>$sId,
"c"=>$sType),$sName);
430 $this->xml .= $this->
_cmdXML(array(
"n"=>
"ev",
"t"=>$sTarget,
"p"=>$sEvent),$sScript);
445 $this->xml .= $this->
_cmdXML(array(
"n"=>
"ah",
"t"=>$sTarget,
"p"=>$sEvent),$sHandler);
461 $this->xml .= $this->
_cmdXML(array(
"n"=>
"rh",
"t"=>$sTarget,
"p"=>$sEvent),$sHandler);
473 $this->xml .= $this->
_cmdXML(array(
"n"=>
"in"),$sFileName);
488 $sXML =
"<?xml version=\"1.0\"";
489 if ($this->sEncoding && strlen(trim($this->sEncoding)) > 0)
490 $sXML .=
" encoding=\"".$this->sEncoding.
"\"";
491 $sXML .=
" ?".
"><xjx>" . $this->xml .
"</xjx>";
510 if (is_a($mXML,
"xajaxResponse")) {
511 $mXML = $mXML->getXML();
514 $iStartPos = strpos($mXML,
"<xjx>") + 5;
515 $sNewXML = substr($mXML, $iStartPos);
516 $iEndPos = strpos($sNewXML,
"</xjx>");
517 $sNewXML = substr($sNewXML, 0, $iEndPos);
518 $this->xml .= $sNewXML;
531 if ($this->bOutputEntities) {
532 if (function_exists(
'mb_convert_encoding')) {
533 $sData = call_user_func_array(
'mb_convert_encoding', array(&$sData,
'HTML-ENTITIES', $this->sEncoding));
536 trigger_error(
"The xajax XML response output could not be converted to HTML entities because the mb_convert_encoding function is not available", E_USER_NOTICE);
540 foreach($aAttributes as $sAttribute => $sValue)
541 $xml .=
" $sAttribute=\"$sValue\"";
542 if ($sData !==
null && !stristr($sData,
'<![CDATA['))
543 $xml .=
"><![CDATA[$sData]]></cmd>";
544 else if ($sData !==
null)
545 $xml .=
">$sData</cmd>";
562 if (gettype($var) ==
"object") $var = get_object_vars($var);
563 if (!is_array($var)) {
564 return "<![CDATA[$var]]>";
568 foreach ($var as $key => $value) {
570 $data .=
"<k>" . htmlspecialchars($key) .
"</k>";
574 $data .=
"</xjxobj>";