Просмотр файла servises/screen/config.js

Размер файла: 1.5Kb
var COUNT_NEWS = 10;
var COUNT_THEMES = 10;

var COUNT_FORUMS = 10;

var COUNT_USERS_LIST = 10;

var COUNT_ONLINE_LIST = 10;

var SESSION_TIME = 0;

var ONLINE_TIME = 600;

//ниже не трогать



var get = Browser.getLocationSearch(), mysql = MySQL(ID), SID = Browser.getCookie('sid'), user = [];



if(SID) {


mysql.query('user', 'select id,login,rank from users where sid = var(' + SID + ')');


mysql.query('user(last)', 'update users set (last = var(), whereis = var(' + location.pathname.split('/')[1] + ')) where sid = var(' + SID + ')');



var q = escape('select id from users where sid = var(' + SID + ')');



mysql.query('user(ban)', 'delete from ban where uid = query('+q+')');


mysql.query('user(ban)', 'select exists() from ban where uid = query('+q+')');



mysql.result();



} else {



user['id'] = 0;

user['login'] = '';

user['rank'] = 0;



}

//загрузка настроек сессии

var countElements = Browser.getCookie('countElements');

if(countElements) {

countElements = countElements.split(',');

COUNT_GUEST_MS = countElements[0];

COUNT_CHAT_MS = countElements[1];

COUNT_FORUM_MS = countElements[2];

COUNT_PRIVAT_MS = countElements[3];

COUNT_COMMENT_MS = countElements[4];

COUNT_WALL_MS = countElements[5];

COUNT_NEWS = countElements[6];

COUNT_THEMES = countElements[7];

COUNT_FORUMS = countElements[8];

COUNT_USERS_LIST = countElements[9];

COUNT_ONLINE_LIST = countElements[10];

}