| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 | function $(id) {return document.getElementById(id);}var timeout;document.onmousemove = function(){  clearTimeout(timeout);  timeout = setTimeout(function(){    if (getCGI('goback.cgi?') === true) {      $('count-wrap').style.display = 'block';      $('countdown').style.display = 'block';      countdown();    }  }, 1800000);};function countdown() {  var countDown = 5;  setInterval(function () {    if (countDown == 1) { window.location.href = '/'; }    if (countDown > 0){ countDown--; }    document.getElementById('count-number').innerHTML = countDown;    return countDown;  }, 1000);}function getCGI(url) {  var q,a,xmlhttp;  if (url == 'goback.cgi') {    q = confirm('Вы уверены что хотите вернуться в основной интерфейс?');    a = 'Возврат отменен.';  } else {q = true;}  if (q) {    if (window.XMLHttpRequest) {      xmlhttp = new XMLHttpRequest();    } else {      xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');    }    // xmlhttp.onreadystatechange = true;    xmlhttp.open('GET', url, true);    xmlhttp.send();    return true;  } else {    alert(a);  }}var _validFileName = 'IBP.bin';function Validate(oForm) {  var arrInputs = oForm.getElementsByTagName('input');  for (var i = 0; i < arrInputs.length; i++) {    var oInput = arrInputs[i];    var blnValid = false;    if (oInput.type == 'file') {      if (oInput.files.length === 0) {        alert('Путь к файлу не указан');        blnValid = false;        return false;      }else{        var sFileName = oInput.files[0].name;        if (sFileName == _validFileName) {          blnValid = true;          $('goback').className += ' disabled';          break;        }        if (!blnValid) {          alert('Файл ' + sFileName + ' не валиден, расширение и имя файла должно соответствовать: [ ' + _validFileName + ' ]');          return false;        }      }    }  }  return true;}$('goback').onclick = function(){  var a = 'goback.cgi';  if (getCGI(a) === true) {    $('count-wrap').style.display = 'block';    $('countdown').style.display = 'block';    countdown();  }};$('uploadBtn').onchange = function () {document.getElementById('uploadFile').value = this.files[0].name;};
 |