console.log('wz=');
var module='';
var overlay_page='';
var profile_card_page='';
var last_overlay_update=0;
var cheater_list_step=0;
var filter_cheater=[0,0];
var cheaters_main_page='';
function getXMLHttp(){
var XMLHttp=null;
if (window.XMLHttpRequest) {
try {
XMLHttp=new XMLHttpRequest();
} catch (e) {}
}
else {
if (window.ActiveXObject){
try {
XMLHttp=new ActiveXObject('Msxml2.XMLHTTP');
}
catch (e) {
try {
XMLHttp=new ActiveXObject('Microsoft.XMLHTTP');
}
catch (e) {}
}
}
}
return XMLHttp;
}
function setGetParam(key,value) {
if (history.pushState) {
var params = new URLSearchParams(window.location.search);
params.set(key, value);
var newUrl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + params.toString();
window.history.pushState({path:newUrl},'',newUrl);
}
}
var lastScrollTop = 0;
function scroller(){
var st = window.pageYOffset || document.documentElement.scrollTop;
if (st > lastScrollTop){
if(st>100)document.getElementById('header').style.top='0px';
document.getElementById('header').style.position='absolute';
} else {
//document.getElementById('header').style.top=st+'px';
document.getElementById('header').style.position='fixed';
}
//console.log(lastScrollTop);
lastScrollTop = st <= 0 ? 0 : st;
}
current_user=[0,0];
var platforms=['','pc','ps4','xbox','act'];checking=0;
function ajax(operation,v1=null,v2=null,v3=null,v4=null,v5=null){
if(checking==1)return;
let add_path='';
if(v4==1)add_path='warzone/';
if(operation==1){v0=v1;v1=encodeURIComponent(v1.trim());if(v5==null)v5=-1;if(v5==-1)show_loader();current_user=[(v1),v2];aa='op='+operation+'&v1='+(v1)+'&v2='+v2+'&v3='+v3+'&v5='+v5;document.getElementById('player_search_block').innerHTML='';checking=1;}
if(operation==2){v0=v1;v1=encodeURIComponent(v1.trim());if(v5==null)v5=-1;if(v5==-1)show_loader();current_user=[(v1),v2];aa='op='+operation+'&v1='+(v1)+'&v2='+v2+'&v3='+v3+'&v5='+v5;checking=1;document.getElementById('card_message_box').innerHTML='';}
if(operation==3){v0=v1;v1=encodeURIComponent(v1.trim());if(v5==null)v5=-1;if(v5==-1)show_loader();current_user=[(v1),v2];aa='op='+operation+'&v1='+(v1)+'&v2='+v2+'&v3='+v3+'&v5='+v5;checking=1;document.getElementById('card_message_box').innerHTML='';}
if(operation==4){
let name=encodeURIComponent(document.getElementById('registration_name').value);
let mail=document.getElementById('registration_email').value;
let password=encodeURIComponent(document.getElementById('registration_password').value);
checking=1;
let typ=document.getElementById('reg_type').value;
aa='op='+operation+'&platform='+selected_cardplatform+'&name='+encodeURIComponent(name)+'&mail='+mail+'&password='+password+'&typ='+typ;
document.getElementById('card_message_box').innerHTML='';
}
if(operation==5){aa='op=5';}
if(operation==6){aa='op='+operation+'&email='+v1+'&password='+v2;}
if(operation==11){aa='op='+operation+'&email='+encodeURIComponent(v1);}
if(operation==12){aa='op='+operation+'&pass='+encodeURIComponent(v1)+'&token2='+encodeURIComponent(v2);}
if(operation==101){aa='op='+operation+'&name='+v1+'&pl='+v2+'&type='+v3;}
if(operation==7){aa='op='+operation+'&step='+v1+'&type='+v2+'&sort1='+filter_cheater[0]+'&platform='+filter_cheater[1]+'&name='+encodeURIComponent(v3)+'&platform2='+encodeURIComponent(v4);
document.getElementById('cheaters_loader').parentElement.removeChild(document.getElementById('cheaters_loader'));}
if(operation==8){aa='op='+operation+'&step='+v1+'&name='+encodeURIComponent(document.getElementById('search_cheater_name').value);
if(v1!=0)document.getElementById('cheaters_loader').parentElement.removeChild(document.getElementById('cheaters_loader'));}
if(operation==9){checking=1;aa='op='+operation+'&id='+suspect_id+'&type='+v1+'&data1='+encodeURIComponent(document.getElementById('evidence_data'+v1+'1').value)+'&data2='+encodeURIComponent(document.getElementById('evidence_data'+v1+'2').value);}
if(operation==10){aa='op='+operation+'&step='+v1+'&id='+v2;
document.getElementById('cheaters_loader').parentElement.removeChild(document.getElementById('cheaters_loader'));}
var XMLHttp = getXMLHttp();
if(operation<4)XMLHttp.open('POST','/'+add_path+'real_check.php',true);
if(operation==4){if(warzone==1)add_warzone='warzone/';else add_warzone='';XMLHttp.open('POST','/'+add_warzone+'registration_complete.php',true); }
if(operation==5)XMLHttp.open('POST','/card',true);
if(operation==6)XMLHttp.open('POST','/ajax',true);
if(operation==7)XMLHttp.open('POST','/warzone/cheats_worker',true);
if(operation==8)XMLHttp.open('POST','/warzone/cheats_worker',true);
if(operation==9)XMLHttp.open('POST','/warzone/cheats_worker',true);
if(operation==10)XMLHttp.open('POST','/warzone/cheats_worker',true);
if(operation==11){if(warzone==1)add_warzone='warzone/';else add_warzone='';XMLHttp.open('POST','/'+add_warzone+'password_reset',true); }
if(operation==12){if(warzone==1)add_warzone='warzone/';else add_warzone='';XMLHttp.open('POST','/'+add_warzone+'password_reset',true); }
if(operation==101)XMLHttp.open('POST','/warzone/check_overlay_stats',true);
XMLHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
XMLHttp.onreadystatechange = function(){
if (XMLHttp.readyState == 4){ if(XMLHttp.status == 200) {result=XMLHttp.responseText;checking=0;
if(operation==7){if(v1==0)document.getElementById('cheaters_listing').innerHTML='';document.getElementById('cheaters_listing').innerHTML+=result;
}
if(operation==8){
if(v1==0)document.getElementById('cheaters_listing').innerHTML='';
if(result==0)document.getElementById('cheaters_listing').innerHTML="There is no results for this search
Please try to insert the part of nickname (at least 3 letters)
";else document.getElementById('cheaters_listing').innerHTML+=result;
}
if(operation==11){//alert(result);
//if(result==0)
document.getElementById('card_message_box').innerHTML="If there is a user with this e-mail then mail with the password reset link will be send during next few minutes
";
}
if(operation==12){if(result==0){document.getElementById('card_message_box').innerHTML='Sorry, but token was not found';return;}
json=JSON.parse(result);
//console.log(json);
if(json[0]==1)document.location=json[1];
}
if(operation==10){document.getElementById('cheaters_listing').innerHTML+=result;}
if(operation==9)
{if(result==1)show_hover(3);else document.getElementById('evidence_data'+v1+'_result').innerHTML=result;
}
if(operation==1){//console.log('result');
json=JSON.parse(result);
if(json[1]>0){setTimeout(function(){ajax(1,v0,json[2],0,v4,json[1]);},3000);return '';
}else {result=json[0];}
document.getElementById('main_hover').style.display='none';
if(result=='1'){
//console.log('ZBS');return '';
module='';
if(overlay_page==1)module='/stream_overlay';
if(profile_card_page==1)module='/profile_card';
if(cheaters_main_page==1)module='/cheaters_report';
document.location='/'+add_path+'profile/'+platforms[current_user[1]]+'/'+current_user[0]+module;
}
if(result>100)document.location='/'+add_path+'profile/'+platforms[result[2]]+'/'+current_user[0]+'/'+module;
if(result==-2||result==-1){
document.getElementById('player_search_block').innerHTML='Sorry but such profile was not found. Please check entered username and try again';
document.getElementById('player_search_block').style.color='#ff0000';
}
if(result==0||result==-3){
document.getElementById('player_search_block').innerHTML='Sorry but Activision servers are currently overloaded. Please try again in few minutes';
document.getElementById('player_search_block').style.color='#ff0000';
}
console.log(result);
//alert(result);
}
if(operation==101){
json=JSON.parse(result);
if(json.length>5){for(i=0;i<=6;i++){
for(i2=0;i2<=2;i2++){if(!json[i][i2])continue;
what=json[i][i2];
console.log('['+(i)+']['+i2+'] - '+what);
document.getElementById('overlay_filed_'+i+''+i2).innerHTML=what;
}
}
overlay_t=json[7];
console.log('overlay_t='+overlay_t);
setTimeout (function() {get_data();},overlay_t);
last_overlay_update=Math.floor(Date.now() / 1000);
}else overlay_t=60000;
}
if(operation==2||operation==3){
json=JSON.parse(result);
if(json[1]>0){setTimeout(function(){ajax(1,v0,json[2],0,v4,json[1]);},1000);return '';
}else {result=json[0];}
document.getElementById('main_hover').style.display='none';
if(result=='1'){
if(operation==2)document.location='/registration/'+current_user[1]+'/'+current_user[0]+'';
if(operation==3){ajax(4);}
}
if(result==-2){
document.getElementById('card_message_box').innerHTML='Sorry but such profile was not found. Please check entered username and try again';
document.getElementById('card_message_box').style.color='#ff0000';
}
if(result==0||result==-3){
document.getElementById('card_message_box').innerHTML='Sorry but Activision servers are currently overloaded. Please try again in few minutes';
document.getElementById('card_message_box').style.color='#ff0000';
}
console.log(result);
}
if(operation==4){
json=JSON.parse(result);
if(json[0]!=1)document.getElementById('card_message_box').innerHTML=json[1];else document.location.href=""+json[1];
}
if(operation==6){
json=JSON.parse(result);
if(json[0]!=1)document.getElementById('card_message_box').innerHTML=json[1];else document.location.href=""+json[1];
}
if(operation==5){
let src=document.getElementById('card_img').src;
// document.getElementById('card_img').src='';
document.getElementById('card_img').src=src+'?'+String(Math.random(0,1)).substr(2,8);
//alert(result);
}
}}}
XMLHttp.send(aa);
}
function copy22(str){
let tmp = document.createElement('INPUT'),
focus = document.activeElement;
tmp.value = str;
document.body.appendChild(tmp);
tmp.select();
document.execCommand('copy');
document.body.removeChild(tmp);
focus.focus();
}
function setCookie(name,value,days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
function hide_reminder(){
setCookie('hide_reminder',1,1);
document.getElementById('reminder').style.display='none';
}
function show_loader(){
document.getElementById('main_hover').style.display='block';
document.getElementById('loader_bar').style.transition='';
document.getElementById('loader_bar').style.width='0px';
setTimeout(function(){document.getElementById('loader_bar').style.width='0px';document.getElementById('loader_bar').style.transition='width 40s';document.getElementById('loader_bar').style.width='100%';},1200);
}
function change_cheaters_filter(n,v,type){
filter_cheater[n]=v;
ajax(7,0,type);
}
function show_hover(n){
document.getElementById('cheaters_hover').style.display='block';
document.getElementById('cheaters_hover_content3').style.display='none';
document.getElementById('cheaters_hover_content1').style.display='none';
document.getElementById('cheaters_hover_content2').style.display='none';
document.getElementById('cheaters_hover_content'+n).style.display='block';
}
function openInNewTab(url) {
var win = window.open(url, '_blank');
win.focus();
}
function setCookie(name,value,days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
document.cookie = name+'=; Max-Age=-99999999;';
}