2 * Создаёт объект XMLHttpRequest, предварительно уничтожая существующий,
3 * если такой существует.
5 function createRequestObject()
9 xmlhttp.onreadystatechange = function (){};
15 xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
18 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
23 if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
24 xmlhttp = new XMLHttpRequest();
31 * Загружает конфигурационный файл для текущего подфорума в формате INI.
32 * Файл имеет фиксированное имя 'config.ini'
36 xmlhttp.open("GET", config.ini, true);
37 xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
38 xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
39 xmlhttp.onreadystatechange = function() {
40 if (xmlhttp.readyState == 4) {
41 if(xmlhttp.status == 200) {
42 parsIni(xmlhttp.responseText);
44 alert("You have a phoblem: ");
52 * Разбирает загруженный INI-файл и устанавливает настройки движка.
54 function parsIni(config)
56 var propertyLines=config.split(/[\n\r]+/);
58 for(var i=0;i<propertyLines.lengthl;i++) {
59 var property=propertyLines[i].split(/ *=/);
60 properties[property[0]]=property[1];