403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/components/bitrix/learning.test/templates/.default/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/components/bitrix/learning.test/templates/.default/script.js
function checkForEmpty(warnMessage)
{
	var answers = document.getElementsByName('answer[]');
	if(!answers || answers.length==0)
		answers = document.getElementsByName('answer');
	if(!answers || answers.length==0)
		return true;
	var exAnswers = [];
	for(var i=0;i<answers.length;i++)
	{
		if (answers[i].type == "textarea")
		{
			if (answers[i].value.length > 0)
				return true;
		}
		else
		{
			if(answers[i].selected || answers[i].checked)
				return true;
		}
	}
	return confirm(warnMessage);
}

function checkSorting(warnMessage)
{
	var answers = document.getElementsByName('answer[]');
	if(!answers || answers.length==0)
		return true;
	var exAnswers = [];
	for(var i=0;i<answers.length;i++)
	{
		if (answers[i].value == 0)
			return confirm(warnMessage);
		else
		{
			for(var j=0; j<exAnswers.length;j++)
			{
				if (answers[i].value == exAnswers[j])
					return confirm(warnMessage);
			}
			exAnswers.push(answers[i].value);
		}
	}
	return true;
}

function UpdateClock(seconds)
{
	if(clockID)
		clearTimeout(clockID);

	if (!(seconds >= 0))
		return;

	var SecondsToEnd = seconds;

	var strTime = "";
	var hours = Math.floor(seconds/3600);

	if (hours > 0)
	{
		strTime += (hours < 10 ? "0" : "") + hours + ":";
		seconds = seconds - hours*3600;
	}
	else
	{
		strTime += "00:";
	}

	var minutes = Math.floor(seconds/60);

	if (minutes > 0)
	{
		strTime += (minutes < 10 ? "0" : "") + minutes + ":";
		seconds = seconds - minutes*60;
	}
	else
	{
		strTime += "00:";
	}
	
	var sec = (seconds%60);
	strTime += (sec < 10 ? "0" : "") + sec;

	//alert(strTime);

	document.getElementById("learn-test-timer").innerHTML = strTime;

	clockID = setTimeout("UpdateClock("+(SecondsToEnd-1)+")", 950);
}

Youez - 2016 - github.com/yon3zu
LinuXploit