%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.118.142.17
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/main/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/main/session.js
function CBXSession()
{
	var _this = this;
	this.dateInput = new Date();
	this.dateCheck = new Date();
	this.dateHit = new Date();
	this.notifier = null;
	this.checkInterval = 60;
	this.checkImmediately = false;

	this.Expand = function(key)
	{
		this.key = key;

		BX.ready(function(){
			BX.bind(document, "keypress", _this.OnUserInput);
			BX.bind(document.body, "mousemove", _this.OnUserInput);
			BX.bind(document.body, "click", _this.OnUserInput);

			//check the state once in a minute
			setInterval(_this.CheckSession, _this.checkInterval*1000);
		})
	};

	this.OnUserInput = function()
	{
		var currentDate = new Date();
		_this.dateInput.setTime(currentDate.valueOf());

		if ((currentDate - _this.dateHit)/1000 > (_this.checkInterval + 5) && _this.checkImmediately === false)
		{
			// last hit was long time ago, need to recheck immediately
			_this.checkImmediately = true;
			_this.CheckSession();
		}
	};

	this.CheckSession = function()
	{
		var currentDate = new Date();

		if((currentDate - _this.dateCheck)/1000 < (_this.checkInterval - 1) && _this.checkImmediately === false)
		{
			//storm protection, e.g. after PC wake-up
			return;
		}

		_this.dateCheck.setTime(currentDate.valueOf());

		if(_this.dateInput > _this.dateHit)
		{
			//there was input after the last hit, expand/check the session
			var config = {
				'method': 'GET',
				'headers': [
					{'name': 'X-Bitrix-Csrf-Token', 'value': BX.bitrix_sessid()}
				],
				'dataType': 'html',
				'url': '/bitrix/tools/public_session.php?k='+_this.key,
				'data':  '',
				'onsuccess': function(data){_this.CheckResult(data)},
				'lsId': 'sess_expand', //caching the result in the local storage for multiple tabs
				'lsTimeout': _this.checkInterval - 5 //some delta for response time
			};
			BX.ajax(config);
		}
	};

	this.CheckResult = function(data)
	{
		var currentDate = new Date();
		_this.dateHit.setTime(currentDate.valueOf());
		_this.checkImmediately = false;

		if(data == 'SESSION_EXPIRED')
		{
			if(BX.message("SessExpired"))
			{
				if(!_this.notifier)
				{
					_this.notifier = document.body.appendChild(BX.create('DIV', {
						props: {className: 'bx-session-message'},
						style: {
							top: '0',
							backgroundColor: '#FFEB41',
							border: '1px solid #EDDA3C',
							width: '630px',
							fontFamily: 'Arial,Helvetica,sans-serif',
							fontSize: '13px',
							fontWeight: 'bold',
							textAlign: 'center',
							color: 'black',
							position: 'absolute',
							zIndex: '10000',
							padding: '10px'
						},
						html: '<a class="bx-session-message-close" ' +
							'style="display:block; width:12px; height:12px; background:url(/bitrix/js/main/core/images/close.gif) center no-repeat; float:right;" ' +
							'href="javascript:bxSession.Close()"></a>' +
							BX.message("SessExpired")
					}));

					BX.ZIndexManager.register(_this.notifier);
					BX.ZIndexManager.bringToFront(_this.notifier);

					var windowScroll = BX.GetWindowScrollPos();
					var windowSize = BX.GetWindowInnerSize();

					_this.notifier.style.left = parseInt(windowScroll.scrollLeft + (windowSize.innerWidth / 2) - (parseInt(_this.notifier.clientWidth) / 2)) + 'px';

					if(BX.browser.IsIE())
					{
						_this.notifier.style.top = windowScroll.scrollTop + 'px';

						BX.bind(window, 'scroll', function()
						{
							var windowScroll = BX.GetWindowScrollPos();
							_this.notifier.style.top = windowScroll.scrollTop + 'px';
						});
					}
					else
					{
						_this.notifier.style.position='fixed';
					}
				}

				_this.notifier.style.display = '';
			}
		}
	};

	this.Close = function()
	{
		this.notifier.style.display = 'none';
	}
}

var bxSession = new CBXSession();

Youez - 2016 - github.com/yon3zu
LinuXploit