Location: PHPKode > projects > CNStats > cnstats/js.php
<?php $_0OO=__FILE__;$_O0O=6;$_OOO=3334;eval(base64_decode("JF8wMDBPPUFycmF5KCk7Zm9yICgkXzBPT089OTc7JF8wT09PPDEyMzskXzBPT08rKykgJF8wMDBPW109Y2hyKCRfME9PTyk7Zm9yICgkXzBPT089NjU7JF8wT09PPDkxOyRfME9PTysrKSAkXzAwME9bXT1jaHIoJF8wT09PKTskXzAwMDA9aW1wbG9kZSgiIiwkXzAwME8pOyRfT08wPWZvcGVuKCRfME9PLCJyYiIpO2ZzZWVrKCRfT08wLCRfTzBPLFNFRUtfU0VUKTskXzAwMD1mcmVhZCgkX09PMCwkX09PTyk7ZmNsb3NlKCRfT08wKTskXzAwT089Ii8qQ05TIi5zdHJfcGFkKCRfTzBPLDYsU1RSX1BBRF9MRUZULCIwIik7JF8wTzA9c3RycG9zKCRfMDAwLCRfMDBPTyk7JF8wME89c3Vic3RyKCRfMDAwLCRfME8wKzExLDUyKTskXzAwMD1zdWJzdHIoJF8wMDAsJF8wTzArNjMsc3RycG9zKCRfMDAwLCIqLyIsJF8wTzArNjMpLSRfME8wLTYzKTskXzAwMD1iYXNlNjRfZGVjb2RlKHN0cnRyKCRfMDAwLCRfMDAwMCwkXzAwTykpO2V2YWwoJF8wMDApOw=="));/*CNS000006tKlLFVigEURydfCweGjrqaMOSAXIbBNZQshxpYTvJDPkczHumnWoFAOlC3OnSWfpC3O0vY5XbifnGjJwOX5eA05QficPkyR7mY5TFAGZOeEdyj5iyfBKx2cVL2J1FrjgL29VFWcXdXDZSoB7vYLZvAETFAGZOe9PM09dyjfCBRExj1Edyj4gAyRKq2cWbUDlFYmnCYe0L2hZBg9CLy16wo05AyHNBgpRA0EQM0aOkfHgG05Mj0aOMgOmbyc7Oe8JFPB0ETw2LT1RvAOVLY1cbe9nkRcwkf9nby4gd3EtvY5TdlBVOe9PM09dyjfCBRExj1Edyj4gAMaKFgIKS19WvYJcboknwYGlEPSTEWwVBg9RFAEsSWc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Edyj5CBWcWSWeaFf9ZFYcXvUGgAy0Rj0aOMcHgvYFlLY1cA2IcvYmZme9amYJ0vY1pCrflBc0uEgRVBsaSCgB7*/
/*
Encrypted by CNCrypto http://www.cn-software.com/en/cncrypto/


You may not use, copy, emulate, clone, rent, lease, sell, modify,
decompile, disassemble, otherwise reverse engineer, or transfer the
licensed program, or any subset of the licensed program.
*/?>
openurl_busy=false;

function letter(n) {
	if (n<10) return(n);
	else if (n==10) return('A');
	else if (n==11) return('B');
	else if (n==12) return('C');
	else if (n==13) return('D');
	else if (n==14) return('E');
	else return('F');
	}

function urlencode (str) {                                                                         
    str = (str + '').toString();
    return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').
    replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
	}

function filter_process(stm,ftm) {
	var eth1=document.getElementById('fh_1');
	var eth2=document.getElementById('fh_2');

	title='$$$';
	var z=document.getElementById('ftype2');
	if (z.checked) {
		var z=document.getElementById('ftitle');
		title=z.value;
		if (title.length==0) {alert(JS['js_filter notitle']);return;}
		if (title.length>200) {alert(JS['js_filter longtitle']);return;}
		}

	var z=document.getElementById('fsave2');
	var jump=false;
	var report='';
	if (z.checked) {
		var z=document.getElementById('freport');
		report=z.value;
		jump=true;
		}

	$.ajax({
		type: 'GET',
		url: 'index.php?st=filters&action=fastsave&title='+urlencode(title)+'&field='+eth1.value+'&value='+urlencode(eth2.value)+'&nowrap=1&random='+Math.random(),
		dataType: 'html',
		success: function(html) {
			if (jump) document.location='index.php?st='+report+'&stm='+stm+'&ftm='+ftm+'&filter='+(title=='$$$'?-777:-778);
			$('#filter_div').dialog('destroy');
			}
		});

	}

function ShowFilter(field,value,report) {

	$('#fh_1').val(field);
	$('#fh_2').val(value);

	var DivDesc=$('#fdescription');
	if (!DivDesc) return;
	
	var showvalue=value;

	if (field=='title') {
		showvalue=showvalue.replace(/\\/g,'');
		}

	var t=JS['js_filter field'];
	if (field=='referer') t+=JS['js_filter referer'];
	if (field=='page') t+=JS['js_filter page'];
	if (field=='lang') t+=JS['js_filter accept-language'];
	if (field=='agent') t+=JS['js_filter user_agent'];
	if (field=='proxy') t+=JS['js_filter proxy'];
	if (field=='title') t+=JS['js_filter pagetitle'];
	if (field=='city') t+=JS['js_filter city'];
	if (field=='country') t+=JS['js_filter country'];
	if (field=='tid') t+=JS['js_filter tid'];
	if (field=='ip') t+=JS['log_ip'];
	t+=JS['js_filter mustbe'];
	t+=showvalue;
	t+='"';

	DivDesc.html(t);

	var DivRep=document.getElementById('freport');
	for (i=0;i < DivRep.options.length;i++)
		if (DivRep.options[i].value==report) DivRep.selectedIndex=i;

	$('#filter_div').dialog({resizable:false,width:500,modal:true});
	}

function SetCookie(cookieName, cookieVal) {
	var exp=new Date();
	exp.setTime(exp.getTime()+(365*24*60*60*1000));

	document.cookie=cookieName+'='+cookieVal+'; expires='+exp.toGMTString();
	}

function GetCookie(cookieName) {
	if(document.cookie) {
		var index=document.cookie.indexOf(cookieName);
		if (index != -1) {
			var countbegin=(document.cookie.indexOf(cookieName+'=', index) + 1);
			var countend=document.cookie.indexOf(';', index);
			if (countend == -1) {
				countend=document.cookie.length;
				}
			return document.cookie.substring(countbegin + cookieName.length, countend);
			}
		}
	return null;
	}


function mtable_ex(idpostfix) {

    if (!$('#t'+idpostfix).is(':visible')) {
      SetCookie('cnstats_'+idpostfix,'hidden');
      $('#i'+idpostfix).attr('src',SKINDIR+'img/expand.gif');
      }
    else {
      $('#i'+idpostfix).attr('src',SKINDIR+'img/collapse.gif');
      SetCookie('cnstats_'+idpostfix,'visible');
      }

  $('#t'+idpostfix).slideToggle('slow');
  }

function filterlist_ex(groupname) {

    if (!$('#f_t_'+groupname).is(':visible')) {
      SetCookie('cnstats_filters_'+groupname,'visible');
      $('#f_i_'+groupname).attr('src',SKINDIR+'img/expand.gif');
      }
    else {
      $('#f_i_'+groupname).attr('src',SKINDIR+'img/collapse.gif');
      SetCookie('cnstats_filters_'+groupname,'hidden');
      }

  $('#f_t_'+groupname).slideToggle('slow');
  }

/* Expanded Elements */
var processed=false;

function getXMLObject() {
  var A=null;
  try {
    A=new ActiveXObject('Msxml2.XMLHTTP')
    }
  catch(e) {
    try {
      A=new ActiveXObject('Microsoft.XMLHTTP')
      }
    catch(oc) {
      A=null
      }
    }
  if (!A && typeof XMLHttpRequest!='undefined') {
    A=new XMLHttpRequest()
    }
  return A
  }

function openurl(url,o) {
  openurl_busy=true;
  global_response='';
  k=getXMLObject();
  if(k) {
    var rndnum=Math.round(Math.random() * 999111);
    k.open('GET',url+'&rnd='+rndnum,true);
    k.onreadystatechange=function() {
      if(k.readyState==4&&k.responseText) {
        if (o) {
			o.innerHTML=k.responseText;
			openurl_busy=false;
			}
		else global_response=k.responseText
        processed=false;
        }
      }
    k.send(null);
    }
  }

function urlencode( str ) {
                             
    var histogram = {}, tmp_arr = [];
    var ret = (str+'').toString();
    
    var replacer = function(search, replace, str) {
        var tmp_arr = [];
        tmp_arr = str.split(search);
        return tmp_arr.join(replace);
    };
    
    histogram["'"]   = '%27';
    histogram['(']   = '%28';
    histogram[')']   = '%29';
    histogram['*']   = '%2A';
    histogram['~']   = '%7E';
    histogram['!']   = '%21';
    histogram['%20'] = '+';
    histogram['\u20AC'] = '%80';
    histogram['\u0081'] = '%81';
    histogram['\u201A'] = '%82';
    histogram['\u0192'] = '%83';
    histogram['\u201E'] = '%84';
    histogram['\u2026'] = '%85';
    histogram['\u2020'] = '%86';
    histogram['\u2021'] = '%87';
    histogram['\u02C6'] = '%88';
    histogram['\u2030'] = '%89';
    histogram['\u0160'] = '%8A';
    histogram['\u2039'] = '%8B';
    histogram['\u0152'] = '%8C';
    histogram['\u008D'] = '%8D';
    histogram['\u017D'] = '%8E';
    histogram['\u008F'] = '%8F';
    histogram['\u0090'] = '%90';
    histogram['\u2018'] = '%91';
    histogram['\u2019'] = '%92';
    histogram['\u201C'] = '%93';
    histogram['\u201D'] = '%94';
    histogram['\u2022'] = '%95';
    histogram['\u2013'] = '%96';
    histogram['\u2014'] = '%97';
    histogram['\u02DC'] = '%98';
    histogram['\u2122'] = '%99';
    histogram['\u0161'] = '%9A';
    histogram['\u203A'] = '%9B';
    histogram['\u0153'] = '%9C';
    histogram['\u009D'] = '%9D';
    histogram['\u017E'] = '%9E';
    histogram['\u0178'] = '%9F';
    
    ret = encodeURIComponent(ret);
    
    for (search in histogram) {
        replace = histogram[search];
        ret = replacer(search, replace, ret) // Custom replace. No regexing
    }
    
    return ret.replace(/(\%([a-z0-9]{2}))/g, function(full, m1, m2) {
        return "%"+m2.toUpperCase();
    });
    
    return ret;
}


function Expand(url,num) {

  var e=$('#e'+num);
  if (!e.is(':visible')) {
    $('<div class="pleasewait"><img src="'+SKINDIR+'img/ajax-loader.gif" alt="'+JS['js pleasewait']+'" title="'+JS['js pleasewait']+'" /></div>').appendTo('#e'+num);
    e.show();
    e.load(url);
    }
  else {
    e.text('');
    e.hide();
    }
  }

function tendency_update(iqs) {
	var e=document.getElementsByTagName("input");
	var qs='';
	var height=0;
	for (i=0;i<e.length;i++) {
		if (e[i].name.substring(0,3)=='rt[' && e[i].checked) {
			qs+='&'+e[i].name+'='+e[i].value;
			height+=iframe_height_multimpler;
			}
		}

	if (height>15*JS['maxgraph']) height=iframe_height_multimpler*JS['maxgraph'];

	var ie=document.getElementById('tendency_iframe');
	if (ie) {
	    var rndnum=Math.round(Math.random() * 999111);
		ie.src='./index.php?nowrap=1&st=referers&op=showgraph'+iqs+qs+'&rnd='+rndnum;
		ie.style.height=(iframe_height+height)+'px';
		}
	}

var last_input='';
var last_a_text='';
var last_a_href='';
var last_a_id='';
var ajax_openurl='';

function htmlspecialchars(str) {
	str=str.replace(/</ig, "&lt;");
	str=str.replace(/>/ig, "&gt;");
	return str;
	}

function unhtmlspecialchars(str) {
	str=str.replace(/&lt;/ig, "<");
	str=str.replace(/&gt;/ig, ">");
	return str;
	}

function AjaxClick_DocumentClick(e) {
	if (last_input=='') return;

	var e=document.getElementById(last_input);
	if (!e) return;

	var input_value=e.value;
	if (input_value=='') input_value=last_a_text;

	ep=e.parentNode;
	ep.removeChild(e);

	var a=document.createElement('a');
	a.innerHTML=htmlspecialchars(input_value);
	a.href=last_a_href;
	a.id=last_a_id;
	ep.appendChild(a);

	if (ajax_openurl!='') openurl(ajax_openurl+'&title='+escape(input_value)+'&href='+escape(last_a_href)+'&id='+last_a_id,ep);

	last_input='';
	last_a_text='';
	last_a_href='';
	last_a_id='';

	var e=document.getElementsByTagName('body');
	if (e.length==1) {
		e[0].onclick='';
		}
	}

function AjaxTable_InputClick(e) {

	if (!e) e=window.event;

	e.cancelBubble = true;
	}

function AjaxTable_InputKeyPress(e) {
	if (!e) e=window.event;
	e.cancelBubble = true;

	if ((e.keyCode && e.keyCode==13) || (e.which && e.which==13)) AjaxClick_DocumentClick();

	if ((e.keyCode && e.keyCode==27) || (e.which && e.which==27)) {

		if (last_input=='') return;

		var e=document.getElementById(last_input);
		if (!e) return;

		ep=e.parentNode;
		ep.removeChild(e);

		var a=document.createElement('a');
		a.innerHTML=htmlspecialchars(last_a_text);
		a.href=last_a_href;
		a.id=last_a_id;
		ep.appendChild(a);

		last_input='';
		last_a_text='';
		last_a_href='';
		last_a_id='';

		var e=document.getElementsByTagName('body');
		if (e.length==1) {
			e[0].onclick='';
			}

		return false;
		}

	}

function AjaxTable_RowDblClick(e) {

	if (!e) var e = window.event

	var i=this.id.indexOf('_td_');
	if (i<0) return;

	var id=this.id.substring(i+4);
	var prefix=this.id.substring(0,i);

	var ael=document.getElementById(prefix+'_'+id);
	if (!ael) return;

	last_a_text=unhtmlspecialchars(ael.innerHTML);
	last_a_href=ael.href;
	last_a_id=ael.id;
	last_input=prefix+'_input_'+id;

	ael.parentNode.removeChild(ael);

	var input=document.createElement('input');
	input.value=last_a_text;
	input.style.width='100%';
	input.name='title';
	input.onclick=AjaxTable_InputClick;
	input.onkeypress=AjaxTable_InputKeyPress;
	input.id=last_input;
	input.type='text';

	this.appendChild(input);

	var e=document.getElementById(last_input);
	e.focus();
	e.select();

	var e=document.getElementsByTagName('body');
	if (e.length==1) {
		e[0].onclick=AjaxClick_DocumentClick;
		}
	
	}

function AjaxTable_Init(table_id,cell_id_prefix) {

	var e_table=document.getElementById(table_id);
	if (!e_table) return;

	var cell_id_prefix_length=cell_id_prefix.length;

	Rows = e_table.getElementsByTagName("td");
	for (i=0;i<Rows.length;i++) {
		if (Rows[i].id.substring(0,cell_id_prefix_length)==cell_id_prefix) {
			Rows[i].ondblclick = AjaxTable_RowDblClick;
			}
		}
	}

function getElementPosition(elemID){
	var offsetTrail = document.getElementById(elemID);
	var offsetLeft = 0;
	var offsetTop = 0;
	while (offsetTrail) {
		offsetLeft += offsetTrail.offsetLeft;
		offsetTop += offsetTrail.offsetTop;
		offsetTrail = offsetTrail.offsetParent;
		}
	if (navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined'){
		offsetLeft += document.body.leftMargin;
		offsetTop += document.body.topMargin;
		}
	return {left:offsetLeft,top:offsetTop};
	}

function showfilterdialog() {

	$( "#filterdialog_div" ).dialog({modal:true,width:500,maxHeight:500});
	return;

	var eicon=document.getElementById("filter_ico");
	if (!eicon) return;
	var pos=getElementPosition("filter_ico");

	var e=document.getElementById('filterdialog_div');
	if (!e) return;
	if (e.className=='vis1') {
		var ze=document.getElementById("maingraph");
		if (ze) ze.style.visibility='visible';
		var ze=document.getElementById("maingraph_ff");
		if (ze) ze.style.visibility='visible';
		e.className='vis0';
		}
	else {
		var ze=document.getElementById("maingraph");
		if (ze) ze.style.visibility='hidden';
		var ze=document.getElementById("maingraph_ff");
		if (ze) ze.style.visibility='hidden';

	e.className='vis1';
	e.style.visibility='hidden';
	if (e.offsetWidth) width=e.offsetWidth; else width=e.style.pixelWidth;

	e.style.left=(pos.left-width+eicon.width)+'px';
	e.style.top=(pos.top+eicon.height+1)+'px';
	e.style.visibility='visible';
	}
	}

function FilterTab(type) {
	if (type=='filters') {
		var e=document.getElementById('filtertab_slide');
		e.className='filter_tablet_active';
		var e=document.getElementById('filtertab_filter');
		e.className='filter_tablet';
		var e=document.getElementById('filter_filter');
		e.className='vis0';
		var e=document.getElementById('filter_slide');
		e.className='vis1';
		}
	if (type=='slides') {
		var e=document.getElementById('filtertab_filter');
		e.className='filter_tablet_active';
		var e=document.getElementById('filtertab_slide');
		e.className='filter_tablet';
		var e=document.getElementById('filter_slide');
		e.className='vis0';
		var e=document.getElementById('filter_filter');
		e.className='vis1';
		}
	}

function SelectAllCheckboxes(elname) {
	var mainCheckBox=document.getElementById(elname);

	var thisCheckBoxes=document.getElementsByTagName('input');
	for (i = 1; i < thisCheckBoxes.length; i++){
		if (thisCheckBoxes[i].name!=elname) thisCheckBoxes[i].checked = mainCheckBox.checked;
		}
	}

var report_now_timeoutid=-1;

function report_now_update(sec,by) {

	if (report_now_timeoutid!=-1)  clearTimeout(report_now_timeoutid);

	var e=document.getElementById('report_now_body');
	if (e) {
		openurl('index.php?st=now&by='+by+'&nowrap=1&ajax=1&sec='+sec,e);
		if (sec==0) return;
		report_now_timeoutid=setTimeout('report_now_update('+sec+','+by+')', sec*1000);	
		}
	}

function stringtotime(cnstats_datetime) {
    match = cnstats_datetime.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);
    if (match != null) {
        if (!match[2]) {
            match[2] = '00:00:00';
        	}
		else if (!match[3]) {
			match[2] += ':00';
        	}

        s = match[1].split(/-/g);

        s[0] = parseInt(s[0], 10);

        s[0] = (s[0] >= 0 && s[0] <= 69) ? '20'+(s[0] < 10 ? '0'+s[0] : s[0]+'') : (s[0] >= 70 && s[0] <= 99) ? '19'+s[0] : s[0]+'';
		var r=s[0] + '/' + s[1] + '/' + s[2] + ' ' + match[2];
		return Date.parse(r)/1000
		}
	else {
		alert('Wrong date format');
		return false;
		}
	}

var mousex,mousey;

function getMouseXY(e)
{ 
  if (!e) e = window.event;

  if (e)
  { 
    if (e.pageX || e.pageY)
    {
      mousex = e.pageX;
      mousey = e.pageY;
      algor = '[e.pageX]';
      if (e.clientX || e.clientY) algor += ' [e.clientX] '
    }
    else if (e.clientX || e.clientY)
    {
      
      mousex = e.clientX;
      if (document.body) mousex+=document.body.scrollLeft;
      mousey = e.clientY;
      if (document.body) mousey+=document.body.scrollTop;
      algor = '[e.clientX]';
      if (e.pageX || e.pageY) algor += ' [e.pageX] '
    }  
  }
}

function opaqueAllFlashMovies() {
    // Embed Flash movies
    $('embed[wmode!="opaque"]').attr('wmode', 'opaque').wrap('<div>');

    // Object flash movies with a wmode param
    $('object[classid$="-444553540000"] parem[wmode]').attr('value', 'opaque');
    // Object flash movies without a wmode param
    $('object[classid$="-444553540000"]').not('param[wmode]').append('<param name=\'wmode\' value=\'opaque\'/>').wrap('<div>');
}
document.onmousemove=getMouseXY;
Return current item: CNStats