From d0f05e0e9af7cbf2a3f24e6a606ea2284b8ea392 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Apr 2012 20:23:15 +0300 Subject: [PATCH] change some images + ban system almost done: now banned player cannot get access to berichte.php and to nachrichten.php but can send message to multihunter --- AC_OETags.js | 2 +- banned.php | 2 - berichte.php | 8 +++- nachrichten.php | 8 +++- uncrypt.js | 11 +++-- unx.js | 117 ++++++++++++++++++++++++++++++++++++++---------- 6 files changed, 113 insertions(+), 35 deletions(-) diff --git a/AC_OETags.js b/AC_OETags.js index 9257faf6..8329e72e 100644 --- a/AC_OETags.js +++ b/AC_OETags.js @@ -138,4 +138,4 @@ function writeFlashTags(id) document.writeln("allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" "); document.writeln("pluginspage=\"http://www.macromedia.com/go/getflashplayer\"> "); document.writeln(" "); -} \ No newline at end of file +} diff --git a/banned.php b/banned.php index b0cdbf4a..a54c6cbb 100644 --- a/banned.php +++ b/banned.php @@ -64,7 +64,6 @@ include("Templates/Admin/ban_msg.tpl"); include("Templates/quest.tpl"); include("Templates/news.tpl"); include("Templates/multivillage.tpl"); -include("Templates/links.tpl"); ?>
@@ -74,7 +73,6 @@ include("Templates/links.tpl");
diff --git a/berichte.php b/berichte.php index 82f7756a..157a4a9a 100644 --- a/berichte.php +++ b/berichte.php @@ -14,6 +14,7 @@ include("GameEngine/Village.php"); $start = $generator->pageLoadTimeStart(); $message->noticeType($_GET); $message->procNotice($_POST); +if($session->access != BANNED){ ?> @@ -113,4 +114,9 @@ echo round(($generator->pageLoadTimeEnd()-$start)*1000);
- \ No newline at end of file + + \ No newline at end of file diff --git a/nachrichten.php b/nachrichten.php index 94dad1bc..c7e301a0 100644 --- a/nachrichten.php +++ b/nachrichten.php @@ -17,6 +17,7 @@ $message->procMessage($_POST); if(isset($_GET['t'])){ $automation->isWinner(); } +if(($_GET['id'])==5 or $session->access!=BANNED){ //replace 5 with your admin's id ?> @@ -126,4 +127,9 @@ echo round(($generator->pageLoadTimeEnd()-$start)*1000);
- \ No newline at end of file + + \ No newline at end of file diff --git a/uncrypt.js b/uncrypt.js index d996eee9..0a3f8efc 100644 --- a/uncrypt.js +++ b/uncrypt.js @@ -2,6 +2,7 @@ var MooTools = { version: "1.2.5", build: "008d8f0f2fcc2044e54fdd3635341aaab274e757" }; + var Native = function (l) { l = l || {}; var a = l.name; @@ -4264,7 +4265,7 @@ Hash.implement({ } }); (function () { - var b = ["À", "à ", "Á", "á", "Â", "â", "Ã", "ã", "Ä", "ä", "Å", "å", "Ă", "ă", "Ą", "ą", "Ć", "ć", "Č", "č", "Ç", "ç", "Ď", "ď", "Đ", "đ", "È", "è", "É", "é", "Ê", "ê", "Ë", "ë", "Ě", "ě", "Ę", "ę", "Ğ", "ğ", "Ì", "ì", "Í", "í", "Î", "î", "Ï", "ï", "Ĺ", "ĺ", "Ľ", "ľ", "Ł", "ł", "Ñ", "ñ", "Ň", "ň", "Ń", "ń", "Ò", "ò", "Ó", "ó", "Ô", "ô", "Õ", "õ", "Ö", "ö", "Ø", "ø", "ő", "Ř", "ř", "Ŕ", "ŕ", "Š", "š", "Ş", "ş", "Ś", "ś", "Ť", "ť", "Ť", "ť", "Ţ", "ţ", "Ù", "ù", "Ú", "ú", "Û", "û", "Ü", "ü", "Ů", "ů", "Ÿ", "ÿ", "ý", "Ý", "Ž", "ž", "Ź", "ź", "Ż", "ż", "Þ", "þ", "Ð", "ð", "ß", "Œ", "œ", "Æ", "æ", "µ"]; + var b = ["A", "a", "", "", "", "", "A", "a", "", "", "A", "a", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "E", "e", "", "", "E", "e", "", "", "", "", "", "", "G", "g", "I", "i", "", "", "", "", "I", "i", "", "", "", "", "", "", "N", "n", "", "", "", "", "O", "o", "", "", "", "", "O", "o", "", "", "O", "o", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "U", "u", "", "", "U", "u", "", "", "", "", "Y", "y", "", "", "", "", "", "", "", "", "?", "?", "?", "?", "", "O", "o", "A", "a", ""]; var a = ["A", "a", "A", "a", "A", "a", "A", "a", "Ae", "ae", "A", "a", "A", "a", "A", "a", "C", "c", "C", "c", "C", "c", "D", "d", "D", "d", "E", "e", "E", "e", "E", "e", "E", "e", "E", "e", "E", "e", "G", "g", "I", "i", "I", "i", "I", "i", "I", "i", "L", "l", "L", "l", "L", "l", "N", "n", "N", "n", "N", "n", "O", "o", "O", "o", "O", "o", "O", "o", "Oe", "oe", "O", "o", "o", "R", "r", "R", "r", "S", "s", "S", "s", "S", "s", "T", "t", "T", "t", "T", "t", "U", "u", "U", "u", "U", "u", "Ue", "ue", "U", "u", "Y", "y", "Y", "y", "Z", "z", "Z", "z", "Z", "z", "TH", "th", "DH", "dh", "ss", "OE", "oe", "AE", "ae", "u"]; var d = { "[\xa0\u2002\u2003\u2009]": " ", @@ -7110,7 +7111,6 @@ Element.implement({ if (this.createTextRange) { var a = document.selection.createRange().duplicate(); a.moveStart("character", -this.value.length); - return a.text.length } return this.selectionEnd @@ -7361,7 +7361,6 @@ Element.NativeEvents = $extend(Element.NativeEvents, { Browser.Engines.isChrome = function () { return Browser.Engine.webkit && navigator.userAgent.toLowerCase().indexOf("chrome") != -1 }; -Browser.isIE9 = Browser.Engine.trident && Browser.Engine.trident6 && navigator.userAgent.toLowerCase().indexOf("msie 9.0") != -1; if (Browser.Engine.trident) { Element.implement({ insertAtCursor: function (b, a) { @@ -7483,7 +7482,7 @@ window.Travian = { onException: a.onException || Travian.emptyFunction }; if (!a.url) { - a.url = "ajax.php.htm" + a.url = "ajax.php" } if (a.data && a.data.cmd) { a.url = a.url + (a.url.indexOf("?") == -1 ? "?" : "&") + "cmd=" + a.data.cmd @@ -7630,7 +7629,7 @@ window.Travian = { }; Travian.ajax = Travian.ajax.wrap(function (b, a) { if (!a.url) { - a.url = "ajax.php.htm" + a.url = "ajax.php" } return b(a) }); @@ -7825,7 +7824,7 @@ var popupWidget = new Class({ var c = $$(this.popcontent())[0].getChildren()[1].getChildren("a.prevtxt"); var a = $$(this.popcontent())[0].getChildren()[1].getChildren("a.nexttxt"); var b = this; - if (d.get("href")[0].indexOf("tutorial.php.htm") != -1) { + if (d.get("href")[0].indexOf("tutorial.php") != -1) { d.addEvent("click", function (g) { g.stop(); b.getTour(d.get("href")) diff --git a/unx.js b/unx.js index 54ca9239..1a55b1bf 100644 --- a/unx.js +++ b/unx.js @@ -61,14 +61,42 @@ if(!(x=d[n])&&d.all)x=d.all[n];for(var i=0;!x&&iMove'+''+'
';pb.innerHTML=tc;uc();} -vc();if(!is_ie6&&!wc)return false;else return true;} + +function Popup(i,j,sc){ + if(typeof sc=='undefined'){sc='s';} + pb=document.getElementById("ce"); + if(pb!=null){ + var tc='
'+'Move'+''+'
'; + pb.innerHTML=tc;uc(); + } + vc(); + if(!is_ie6&&!wc)return false; + else return true; +} +function PopupMap(i){ + if(typeof sc=='undefined'){sc='s';} + pb=document.getElementById("ce"); + if(pb!=null){ + var tc=''; + pb.innerHTML=tc;uc2(); + } + vc(); + if(!is_ie6&&!wc)return false; + else return true; +} + function uc(){if($('drag')){return;} $$('.popup3')[0].grab(new Element('div',{'id':'drag'} ),'top').makeDraggable({'handle':'drag'} );if($$('body')[0].getStyle('direction').toLowerCase()=='rtl'){$$('.popup3')[0].setStyle('direction','rtl').getParent().setStyle('direction','ltr');} } +function uc2(){ + if($('drag')){return;} + $$('.popup_map')[0].grab(new Element('div',{'id':'drag'}),'top').makeDraggable({'handle':'drag'}); + if($$('body')[0].getStyle('direction').toLowerCase()=='rtl'){ + $$('.popup_map')[0].setStyle('direction','rtl').getParent().setStyle('direction','ltr'); + } +} function vc(){if(gb()<700||ib()<700){document.getElementById("ce").style.position='absolute';wc=true;} else{document.getElementById("ce").style.position='fixed';wc=false;} } @@ -85,20 +113,40 @@ if(yc==1){document.snd.dname.value=zc;} var $c=document.getElementById?1:0;var _c=document.all?1:0;var ad=(navigator.userAgent.indexOf("Mac")>-1)?1:0;var bd=(_c&&(!ad)&&(typeof(window.offscreenBuffering)!='undefined'))?1:0;var cd=bd;var dd=bd&&(window.navigator.userAgent.indexOf("SV1")!=-1);function changeOpacity(ed,opacity){if(bd){ed.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+(opacity*100)+')';} else if($c){ed.style.MozOpacity=opacity;} } -function fd(url,gd,hd,id){if(hd===undefined){hd='GET';} -var jd;if(window.XMLHttpRequest){jd=new XMLHttpRequest();} -else if(window.ActiveXObject){try{jd=new ActiveXObject("Msxml2.XMLHTTP");} -catch(e){try{jd=new ActiveXObject("Microsoft.XMLHTTP");} -catch(e){} -} -} -else{throw'Can not create XMLHTTP-instance';} -jd.onreadystatechange=function(){if(jd.readyState==4){if(jd.status==200){var kd=jd.getResponseHeader('Content-Type');kd=kd.substr(0,kd.indexOf(';'));switch(kd){case'application/json':gd((jd.responseText==''?null:eval('('+jd.responseText+')')));break;case'text/plain':case'text/html':gd(jd.responseText);break;default:throw'Illegal content type';} -} -else{throw'An error has occurred during request';} -} -} -;jd.open(hd,url,true);if(hd=='POST'){jd.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=utf-8');var ld=md(id);} + +function fd(url,gd,hd,id){ + if(hd===undefined){hd='GET';} + var jd; + if(window.XMLHttpRequest){jd=new XMLHttpRequest();} + else if(window.ActiveXObject){ + try{jd=new ActiveXObject("Msxml2.XMLHTTP");} + catch(e){ + try{jd=new ActiveXObject("Microsoft.XMLHTTP");} + catch(e){} + } + } + else{ + throw'Can not create XMLHTTP-instance'; + } + jd.onreadystatechange=function(){ + if(jd.readyState==4){ + if(jd.status==200){ + var kd=jd.getResponseHeader('Content-Type'); + kd=kd.substr(0,kd.indexOf(';')); + switch(kd){ + case'application/json':gd((jd.responseText==''?null:eval('('+jd.responseText+')')));break; + case'text/plain':case'text/html':gd(jd.responseText);break; + default:throw'Illegal content type'; + } + } + else{ + throw'An error has occurred during request'; + } + } + }; + jd.open(hd,url,true);if(hd=='POST'){ + jd.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=utf-8'); + var ld=md(id);} else{var ld=null;} jd.send(ld);} function md(nd){var od='';var pd=true;for(var qd in nd){od+=(pd?'':'&')+qd+'='+window.encodeURI(nd[qd]);if(pd){pd=false;} @@ -117,15 +165,34 @@ var ke=['mcx','mcy','x','y','map_infobox'];for(var i=0;i