var pge = 0; var newsAlerts; var newsSounds; var newsTime = 0; var u = ; var c = ; var pro = ; function betaon(){ $.post('../../scripts/betaon.php',{c:c,u:u},function(){}); document.getElementById("settingsbetaon").style.display='none'; document.getElementById("settingsbetaoff").style.display='block'; } function betaoff(){ $.post('../../scripts/betaoff.php',{c:c,u:u},function(){}); document.getElementById("settingsbetaon").style.display='block'; document.getElementById("settingsbetaoff").style.display='none'; } function casteron(){ $('#regpopcontent').load('../../scripts/casteron.php',{u:u,c:c},function(){}); document.getElementById("settingscasteron").style.display='none'; document.getElementById("settingscasteroff").style.display='block'; } function casteroff(){ $('#regpopcontent').load('../../scripts/casteroff.php',{u:u,c:c},function(){}); document.getElementById("settingscasteron").style.display='block'; document.getElementById("settingscasteroff").style.display='none'; } function openWallet(){ $('#regpopcontent').html(''); var elem2 = document.getElementById('regpopbox'); elem2.style.visibility='visible'; var elem3 = document.getElementById('regpopcontent'); elem3.style.visibility='visible'; $('#regpopcontent').load('../../popups/wallet.php',{u:u,c:c},function(){}); } function soundson(){ $.post('../../scripts/vipsounds.php',{c:c,u:u},function(){}); document.getElementById("vipsoundson").style.display='none'; document.getElementById("vipsoundsoff").style.display='block'; vipsounds = 1; } function soundsoff(){ $.post('../../scripts/vipsounds.php',{c:c,u:u},function(){}); document.getElementById("vipsoundson").style.display='block'; document.getElementById("vipsoundsoff").style.display='none'; vipsounds = 0; } function newssoundson(){ $.post('../../scripts/newssounds.php',{c:c,u:u},function(){}); document.getElementById("newssoundson").style.display='none'; document.getElementById("newssoundsoff").style.display='block'; newsSounds = 1; } function newssoundsoff(){ $.post('../../scripts/newssounds.php',{c:c,u:u},function(){}); document.getElementById("newssoundson").style.display='block'; document.getElementById("newssoundsoff").style.display='none'; newsSounds = 0; } function procamson(){ $.post('../../scripts/procams.php',{c:c,u:u},function(){}); document.getElementById("procamson").style.display='none'; document.getElementById("procamsoff").style.display='block'; if (pge==u){ //send function to server sendcamson(); } } function procamsoff(){ $.post('../../scripts/procams.php',{c:c,u:u},function(){}); document.getElementById("procamson").style.display='block'; document.getElementById("procamsoff").style.display='none'; if (pge==u){ //send function to server sendcamsoff(); } } function procamsquickoff(){ $.post('../../scripts/procams.php',{c:c,u:u},function(){}); if (pge==u){ //send function to server sendcamsoff(); } } function pageprocamson(){ $("#proCams").animate({height: '158px', marginTop: '10px'}, "fast"); setTimeout(function() {$("#proCams").removeAttr('style').css('marginTop','10px');}, 300); $("#proCams").html('
'); if (u==pge){ $('#proCams').prepend($('')); } } function pageprocamsoff(){ $("#proCams").animate({height: '0px', marginTop: '0px'}, "fast"); $("#proCams").html(""); } function vipalertpopup(){ if (vipsounds==1){ try { var vipblip = new Audio('/notifications/vipalert.mp3'); vipblip.play(); } catch (e){} newsTime = newsTime+1; $("#vipalertbubble").css('background-color', 'rgb(200, 100, 100)'); $("#vipalertbubble").css('border-style', 'solid'); $("#vipalertbubble").css('padding', '10px'); $("#vipalertbubble").css('width', '310px'); $("#vipalertbubble").fadeIn(10); $("#vipalertbubble").animate({height: '20px'}, "fast"); $("#vipalertbubble").html('
New VIP Access Request!
'); setTimeout(function(){ if (newsTime<=1){ $("#vipalertbubble").fadeOut(750); $("#vipalertbubble").html(''); $("#vipalertbubble").css('boder-style', 'none'); newsTime = 0; }else{ newsTime = newsTime-1; } }, 4000); } } function newsalert(data,type){ if (newsAlerts==1){ newsTime = newsTime+1; if (type==1){$("#vipalertbubble").css('background-color', '#BBBBBB');} if (type==2){$("#vipalertbubble").css('background-color', '#3399FF');} if (type==3){$("#vipalertbubble").css('background-color', '#00AA00');} $("#vipalertbubble").css('border-style', 'solid'); $("#vipalertbubble").css('padding', '10px'); $("#vipalertbubble").css('width', '310px'); $("#vipalertbubble").fadeIn(10); $("#vipalertbubble").animate({height: '20px'}, "fast"); $("#vipalertbubble").html('
'+data+'
'); setTimeout(function(){ if (newsTime<=1){ $("#vipalertbubble").fadeOut(750); $("#vipalertbubble").html(''); $("#vipalertbubble").css('border-style', 'none'); newsTime = 0; }else{ newsTime = newsTime-1; } }, 4000); if (newsSounds==1){ var newsalertblip = new Audio('/notifications/popup.mp3'); newsalertblip.play(); } } } function friendspopup(type){ $('#regpopcontent').html(''); //var elem1 = document.getElementById('regpopholder'); //elem1.style.visibility='visible'; var elem2 = document.getElementById('regpopbox'); elem2.style.visibility='visible'; var elem3 = document.getElementById('regpopcontent'); elem3.style.visibility='visible'; $('#regpopcontent').load('../popups/friendslist.php',{u:u,c:c,p:pge,type:type},function(){}); } function subsalert(){ $('#regpopcontent').html(''); //var elem1 = document.getElementById('regpopholder'); //elem1.style.visibility='visible'; var elem2 = document.getElementById('regpopbox'); elem2.style.visibility='visible'; var elem3 = document.getElementById('regpopcontent'); elem3.style.visibility='visible'; $('#regpopcontent').load('../popups/subalert.php',{u:u,c:c,p:pge,pro:pro},function(){}); } function subspopup(type){ $('#regpopcontent').html(''); //var elem1 = document.getElementById('regpopholder'); //elem1.style.visibility='visible'; var elem2 = document.getElementById('regpopbox'); elem2.style.visibility='visible'; var elem3 = document.getElementById('regpopcontent'); elem3.style.visibility='visible'; $('#regpopcontent').load('../popups/sublist.php',{u:u,c:c,p:pge,pro:pro,type:type},function(){}); } function pendingpopup(){ $('#regpopcontent').html(''); //var elem1 = document.getElementById('regpopholder'); //elem1.style.visibility='visible'; var elem2 = document.getElementById('regpopbox'); elem2.style.visibility='visible'; var elem3 = document.getElementById('regpopcontent'); elem3.style.visibility='visible'; $('#regpopcontent').load('../popups/pendingfriendslist.php',{u:u,c:c},function(){}); } function bannedpopup(type){ $('#regpopcontent').html(''); //var elem1 = document.getElementById('regpopholder'); //elem1.style.visibility='visible'; var elem2 = document.getElementById('regpopbox'); elem2.style.visibility='visible'; var elem3 = document.getElementById('regpopcontent'); elem3.style.visibility='visible'; $('#regpopcontent').load('../popups/bannedlist.php',{u:u,c:c,p:pge,type:type},function(){}); } function settingspopup(){ $('#regpopcontent').html(''); //var elem1 = document.getElementById('regpopholder'); //elem1.style.visibility='visible'; var elem2 = document.getElementById('regpopbox'); elem2.style.visibility='visible'; var elem3 = document.getElementById('regpopcontent'); elem3.style.visibility='visible'; $('#regpopcontent').load('../popups/settings.php',{u:u,c:c},function(){}); } function addpending(me,friend){ $.post('../../scripts/friendrequest.php',{c:c,u:u,p:friend},function(){}); document.getElementById("friend"+friend).style.display='none'; } function deletepending(me,friend){ $.post('../../scripts/unfriend.php',{c:c,u:u,p:friend},function(){}); document.getElementById("friend"+friend).style.display='none'; } function uploadavatar(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/uploadavatar.php',{u:u,c:c},function(){}); } function deleteavatar(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/deleteavatar.php',{u:u,c:c},function(){}); } function uploadbackground(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/uploadbackground.php',{u:u,c:c},function(){}); } function deletebackground(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/deletebackground.php',{u:u,c:c},function(){}); } function uploadbanner(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/uploadbanner.php',{u:u,c:c},function(){}); } function deletebanner(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/deletebanner.php',{u:u,c:c},function(){}); } function deletebanned(ban){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/deletebanned.php',{u:u,c:c,ban:ban},function(){}); } function removepic(type){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../scripts/removepicture.php',{u:u,c:c,type:type},function(){}); } function changebio(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/changebio.php',{u:u,c:c},function(){}); } function removebio(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/removebio.php',{u:u,c:c},function(){}); } function deleteconfirmation(info,data,notify){ $('#regpopcontent').html(''); //var elem1 = document.getElementById('regpopholder'); //elem1.style.visibility='visible'; var elem2 = document.getElementById('regpopbox'); elem2.style.visibility='visible'; var elem3 = document.getElementById('regpopcontent'); elem3.style.visibility='visible'; $('#regpopcontent').load('../../popups/deleteconfirmation.php',{u:u,c:c,info:info,data:data,notify:notify},function(){}); } function friendson(){ $.post('../../scripts/friendson.php',{c:c,u:u},function(){}); document.getElementById("settingsfriendson").style.display='none'; document.getElementById("settingsfriendsoff").style.display='block'; } function friendsoff(){ $.post('../../scripts/friendsoff.php',{c:c,u:u},function(){}); document.getElementById("settingsfriendson").style.display='block'; document.getElementById("settingsfriendsoff").style.display='none'; } function subson(){ $.post('../../scripts/subson.php',{c:c,u:u},function(){}); document.getElementById("settingssubsson").style.display='none'; document.getElementById("settingssubssoff").style.display='block'; } function subsoff(){ $.post('../../scripts/subsoff.php',{c:c,u:u},function(){}); document.getElementById("settingssubsson").style.display='block'; document.getElementById("settingssubssoff").style.display='none'; } function subalertson(subalertid){ $.post('../../scripts/subalertson.php',{c:c,u:u,s:subalertid},function(){}); document.getElementById("subalertson"+subalertid).style.display='none'; document.getElementById("subalertsoff"+subalertid).style.display='block'; } function subalertsoff(subalertid){ $.post('../../scripts/subalertsoff.php',{c:c,u:u,s:subalertid},function(){}); document.getElementById("subalertson"+subalertid).style.display='block'; document.getElementById("subalertsoff"+subalertid).style.display='none'; } function socialon(){ $.post('../../scripts/socialon.php',{c:c,u:u},function(){}); document.getElementById("settingssocialon").style.display='none'; document.getElementById("settingssocialoff").style.display='block'; } function socialoff(){ $.post('../../scripts/socialoff.php',{c:c,u:u},function(){}); document.getElementById("settingssocialon").style.display='block'; document.getElementById("settingssocialoff").style.display='none'; } function wallon(){ $.post('../../scripts/wallon.php',{c:c,u:u},function(){}); document.getElementById("settingswallon").style.display='none'; document.getElementById("settingswalloff").style.display='block'; } function walloff(){ $.post('../../scripts/walloff.php',{c:c,u:u},function(){}); document.getElementById("settingswallon").style.display='block'; document.getElementById("settingswalloff").style.display='none'; } function changewall(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/changewall.php',{u:u,c:c},function(){}); } function removewall(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/removewall.php',{u:u,c:c},function(){}); } function showvisitors(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/showvisitors.php',{u:u,c:c},function(){}); } function showstreamkey(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/showstreamkey.php',{u:u,c:c},function(){}); } function changeemail(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/changeemail.php',{u:u,c:c},function(){}); } function changepassword(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/changepassword.php',{u:u,c:c},function(){}); } function sendpwd(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../scripts/passwordreset.php',{u:u},function(){}); } function deleteaccount(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/deleteaccount.php',{u:u,c:c},function(){}); } function removeaccountfinal(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/removeaccountfinal.php',{u:u,c:c},function(){}); } function browseoff(){ $.post('../../scripts/safebrowse.php',{c:c,u:u},function(){}); document.getElementById("settingsbrowseoff").style.display='block'; document.getElementById("settingsbrowseon").style.display='none'; } function browseon(){ $.post('../../scripts/safebrowse.php',{c:c,u:u},function(){}); document.getElementById("settingsbrowseoff").style.display='none'; document.getElementById("settingsbrowseon").style.display='block'; } /*------------------------Change Email settings----------------------------*/ function changebulkemail(data){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/changebulkemail.php',{u:u,c:c,t:data},function(){}); } function marketingon(){ $('#regpopcontent').html(''); var t = "marketingon"; $('#regpopcontent').load('../../popups/changebulkemailset.php',{u:u,c:c,t:t},function(){}); } function marketingoff(){ $('#regpopcontent').html(''); var t = "marketingoff"; $('#regpopcontent').load('../../popups/changebulkemailset.php',{u:u,c:c,t:t},function(){}); } function allsubson(){ $('#regpopcontent').html(''); var t = "allsubson"; $('#regpopcontent').load('../../popups/changebulkemailset.php',{u:u,c:c,t:t},function(){}); } function allsubsoff(){ $('#regpopcontent').html(''); var t = "allsubsoff"; $('#regpopcontent').load('../../popups/changebulkemailset.php',{u:u,c:c,t:t},function(){}); } /*------------------------youtube----------------------------*/ function changeyoutube(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/changeyoutube.php',{u:u,c:c},function(){}); } function deleteyoutube(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/deleteyoutube.php',{u:u,c:c},function(){}); } function removeyoutube(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/removeyoutube.php',{u:u,c:c},function(){}); } /*------------------------twitter----------------------------*/ function changetwitter(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/changetwitter.php',{u:u,c:c},function(){}); } function deletetwitter(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/deletetwitter.php',{u:u,c:c},function(){}); } function removetwitter(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/removetwitter.php',{u:u,c:c},function(){}); } /*------------------------facebook----------------------------*/ function changefacebook(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/changefacebook.php',{u:u,c:c},function(){}); } function deletefacebook(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/deletefacebook.php',{u:u,c:c},function(){}); } function removefacebook(){ $('#regpopcontent').html(''); $('#regpopcontent').load('../../popups/removefacebook.php',{u:u,c:c},function(){}); } function uploadfile(){ $("#file").click(); $(document).ready(function(){ $("#file").change(function(){ getFileName($(this).attr("id")); }); }); } getFileName = function(id){ var str = ''; var files = document.getElementById(id).files; for (var i = 0; i < files.length; i++){ str += files[i].name; } $("#filename").text(str); } var ignoreListCookie = function(cookieName) { var ignoreCookie = $.cookie(cookieName); var ignoreItems = ignoreCookie ? ignoreCookie.split(/,/) : new Array(); return { "add": function(val) { ignoreItems.push(val); $.cookie(cookieName, ignoreItems.join(','), {expires:10000}); }, "remove": function (val) { indx = ignoreItems.indexOf(val); if(indx!=-1) ignoreItems.splice(indx, 1); $.cookie(cookieName, ignoreItems.join(','), {expires:10000}); }, "clear": function() { ignoreItems = null; $.cookie(cookieName, null, {expires:10000}); }, "items": function() { return ignoreItems; } } } var cookieList = new ignoreListCookie("_ivcl");