From 1b7be6d31babc47c76db2c610f3364e39d05e4b8 Mon Sep 17 00:00:00 2001 From: hecht Date: Mon, 7 Nov 2011 21:10:08 +0000 Subject: [PATCH] changed the way of defining the path ... now it should also be able to place the installation of ag in a different directory! --- ag/abholen.php | 20 ++- ag/ag_popupchat.php | 23 +-- ag/aktiv.php | 15 +- ag/anmeldung.php | 13 +- ag/arena.php | 21 +-- ag/auktion.php | 13 +- ag/auser.php | 9 +- ag/c_kampf_anzeige.php | 60 ------- ag/char.php | 45 ++--- ag/char_index.php | 11 +- ag/char_overview.php | 43 ++--- ag/char_profil.php | 35 ++-- ag/char_profil2.php | 21 +-- ag/clan/add.php | 10 +- ag/clan/c_kampf.php | 4 +- ag/clan/c_kampf_anzeige.php | 6 +- ag/clan/c_markt.php | 10 +- ag/clan/c_ranglist.php | 6 +- ag/clan/c_ware.php | 12 +- ag/clan/clan_info.php | 6 +- ag/clan/kampf_info.php | 14 +- ag/clan/new.php | 10 +- ag/clan/post.php | 10 +- ag/clan/spende.php | 8 +- ag/clan_kampf.php | 191 --------------------- ag/dragonballs.php | 27 +-- ag/dropdownmenu.php | 29 ---- ag/event_kampf_anzeige.php | 7 +- ag/faq.php | 3 +- ag/gfx/gfx_config.php | 4 +- ag/gm/gm_seite.php | 48 +++--- ag/gm/include/npc.inc.php | 2 +- ag/gm/log.php | 2 +- ag/h_turnier.php | 5 +- ag/halloffame.php | 11 +- ag/img.php | 7 +- ag/inclu/awards.inc.php | 2 +- ag/inclu/char.php | 4 +- ag/inclu/partner.inc.php | 2 +- ag/inclu/toplists.inc.php | 2 +- ag/inclu/user-controll.php | 4 +- ag/include/arena.inc.php | 2 +- ag/include/attackenset.inc.php | 2 +- ag/include/auktion_functions.inc.php | 42 ++--- ag/include/char.inc.php | 4 +- ag/include/char_profil.inc.php | 2 +- ag/include/clan.inc.php | 4 +- ag/include/clan_fights.inc.php | 20 +-- ag/include/config.inc.php | 17 +- ag/include/config/settings_example.inc.php | 2 +- ag/include/defines.inc.php | 2 +- ag/include/designfunctions.inc.php | 4 +- ag/include/erstellfunctions.inc.php | 10 +- ag/include/event.inc.php | 4 +- ag/include/exp.inc.php | 2 +- ag/include/faq.inc.php | 4 +- ag/include/halloffame.inc.php | 2 +- ag/include/img.inc.php | 6 +- ag/include/kampf_anzeige.inc.php | 4 +- ag/include/kampf_anzeige.php | 2 +- ag/include/kampf_wrapper.inc.php | 50 +++--- ag/include/messagefunctions.inc.php | 8 +- ag/include/races.inc.php | 4 +- ag/include/schatz.inc.php | 56 +++--- ag/include/user.inc.php | 4 +- ag/include/usergroup.inc.php | 4 +- ag/index.php | 23 +-- ag/info.php | 13 +- ag/info/agchat.php | 2 +- ag/info/attacken.php | 6 +- ag/info/items.php | 4 +- ag/info/lern.php | 18 +- ag/item.php | 27 +-- ag/kampf2.php | 71 ++++---- ag/kampf4.php | 37 ++-- ag/kampf_clan.php | 55 +++--- ag/kampf_list.php | 18 +- ag/last_fight.php | 5 +- ag/last_fight1.php | 17 +- ag/last_fight2.php | 11 +- ag/last_fight3.php | 17 +- ag/lernpunkte.php | 21 +-- ag/liga1.php | 7 +- ag/liga_kampf_anzeige.php | 9 +- ag/login.php | 8 +- ag/login2.php | 17 +- ag/markt.php | 15 +- ag/nachricht.php | 29 ++-- ag/news.php | 9 +- ag/online.php | 5 +- ag/path.inc.php | 23 +++ ag/profil.php | 19 +- ag/pw.php | 3 +- ag/ranglist.php | 11 +- ag/schatz.php | 37 ++-- ag/schatz3.php | 22 +-- ag/schatz_suche.php | 3 +- ag/sp_item.php | 43 ++--- ag/support.php | 3 +- ag/test.php | 14 +- ag/training.php | 13 +- ag/turnier.php | 45 ++--- ag/turnier2.php | 13 +- ag/umfrage.php | 19 +- ag/wanted.php | 11 +- ag/wanted_kampf_anzeige.php | 9 +- 106 files changed, 784 insertions(+), 984 deletions(-) delete mode 100644 ag/c_kampf_anzeige.php delete mode 100644 ag/clan_kampf.php delete mode 100644 ag/dropdownmenu.php create mode 100644 ag/path.inc.php diff --git a/ag/abholen.php b/ag/abholen.php index e56d8d7..52fa20d 100644 --- a/ag/abholen.php +++ b/ag/abholen.php @@ -5,11 +5,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php'); + +include_once('path.inc.php'); // get the path ;) +include_once(ROOT_PATH.'/include/config.inc.php'); +include_once(ROOT_PATH.'/include/char.inc.php'); +include_once(ROOT_PATH.'/include/designfunctions.inc.php'); +include_once(ROOT_PATH.'/include/parse.inc.php'); +include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php'); // GET-Section // Kritisch (SQL-Injections) @@ -83,7 +85,7 @@ echo " $kampf_a1[name] vs. $kampf_a2[name]"; if(s>59){ m=Math.floor(s/60);s=s-m*60 } - if(m>59){ + if(m>59){ h=Math.floor(m/60);m=m-h*60 } if(s<10){ @@ -97,7 +99,7 @@ echo " $kampf_a1[name] vs. $kampf_a2[name]"; window.setTimeout('t();',950); } window.onload=t; - + @@ -133,7 +135,7 @@ echo " $kampf_a[c1name] vs. $kampf_a[name]
 
"; echo 'anzeigen'; } else{ ?> - + @@ -164,7 +166,7 @@ echo "

Schatz Suche
 
"; echo 'anzeigen'; } else{ ?> - + diff --git a/ag/ag_popupchat.php b/ag/ag_popupchat.php index b598794..d89e55c 100644 --- a/ag/ag_popupchat.php +++ b/ag/ag_popupchat.php @@ -8,8 +8,9 @@ session_start(); $nodisturb = 'YES'; -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/messagefunctions.inc.php'); +include_once('path.inc.php'); // get the path ;) +include_once (ROOT_PATH . '/include/config.inc.php'); +include_once (ROOT_PATH . '/include/messagefunctions.inc.php'); // Die Nachricht muss nicht geparst werden! @@ -42,13 +43,13 @@ if(isset($user_ida['nickname'])){ $usr = mysql_fetch_assoc(mysql_query('Select * from anon_chatter where ip = \''.$_SESSION['anon_ip'].'\'')); } $user_ida['id'] = $usr['anon_id']; - $user_ida['nickname'] = 'anon_' . $usr['anon_id']; + $user_ida['nickname'] = 'anon_' . $usr['anon_id']; $anon_block = $usr['muted']==0?false:true; mysql_query('UPDATE anon_chatter SET online = now() WHERE anon_ip = '.$usr['anon_id']); } -// +// if (isset($_GET['send'])) { if(!$trueuser && $_REQUEST['myself'] != $user_ida['nickname']){ // sendChatMessage($user_ida, '***SPAM***'.$_GET['send']); @@ -98,7 +99,7 @@ if (isset($_GET['send'])) { alert("Nachricht konnte nicht versendet werden! Chat wird neu gestartet!"); window.location.reload(); } - + } function anzeigenChat(originalRequest ) { var index = originalRequest.responseText.indexOf(";"); @@ -108,9 +109,9 @@ if (isset($_GET['send'])) { } if(!Number(originalRequest.responseText.substring(0,index))){ receiving = false; - return; + return; } else{ - lastmessageid = originalRequest.responseText.substring(0,index); + lastmessageid = originalRequest.responseText.substring(0,index); } var text = originalRequest.responseText.substring(index+1); var newMessages=0, newPos=0; @@ -133,7 +134,7 @@ if (isset($_GET['send'])) { receiving = false; return; } - + function loadData(){ if(--aktiv == 0){ alert('Du wurdest als Inaktiv erkannt, Ok anklicken um wieder Nachrichten zu empfangen!'); @@ -147,14 +148,14 @@ if (isset($_GET['send'])) { var myAjax = new Ajax.Request( "?me=blablubb&id="+lastmessageid, { method: 'get', onComplete: anzeigenChat }); } } - + function activate(){ document.forms["myForm2"].style.visibility = "hidden"; return false; } - + setInterval("loadData();",); - + diff --git a/ag/aktiv.php b/ag/aktiv.php index ab0f75f..b518b76 100644 --- a/ag/aktiv.php +++ b/ag/aktiv.php @@ -5,12 +5,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/exp.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/messagefunctions.inc.php'); +include_once('path.inc.php'); // get the path ;) +include_once(ROOT_PATH.'/include/config.inc.php'); +include_once(ROOT_PATH.'/include/designfunctions.inc.php'); +include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php'); +include_once(ROOT_PATH.'/include/parse.inc.php'); +include_once(ROOT_PATH.'/include/exp.inc.php'); +include_once(ROOT_PATH.'/include/messagefunctions.inc.php'); // GET-Section // Kritisch (SQL-Injections) @@ -25,7 +26,7 @@ if($charm) { if(!$user_k['username']) { displayErrorMessage(NULL,'Account konnte nicht aktiviert werden!', displayHistoryBackLink()); exit; - } + } #########USER AKTIVIERUNG diff --git a/ag/anmeldung.php b/ag/anmeldung.php index a792911..fb1032f 100644 --- a/ag/anmeldung.php +++ b/ag/anmeldung.php @@ -5,11 +5,12 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config/db.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/speed_config.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php'); +include_once('path.inc.php'); // get the path ;) +include_once (ROOT_PATH . '/include/config/db.inc.php'); +include_once (ROOT_PATH . '/include/config/speed_config.inc.php'); +include_once (ROOT_PATH . '/include/designfunctions.inc.php'); +include_once (ROOT_PATH . '/include/fehlerausgabe.inc.php'); +include_once (ROOT_PATH . '/include/parse.inc.php'); // GET-Section // Kritisch (SQL-Injections) @@ -95,7 +96,7 @@ if ($charm) { $zeit = time(); $serial_1 = number_format($serial, 0, '', '-'); - $aktivierungslink = $GLOBALS['server_url_long'] . '/ag/index.php?as=aktiv&charm=1&nick_name=' . $nick_name . '&serial=' . $serial_1; + $aktivierungslink = $GLOBALS['server_url_long'] .ROOT_URL.'/index.php?as=aktiv&charm=1&nick_name=' . $nick_name . '&serial=' . $serial_1; $inhalt = 'Zugangsdaten,\n\nSie lauten:\n\nUsername: ' . $nick_name . ' \n\nPasswort: ' . $pw_1 . '\n Aktivierungsnummer: ' . $serial_1 . ' \n\n Bitte geben sie die Aktivierungsnummer auf der Seite ein oder klicken sie folgenden Link\n\n' . $aktivierungslink . '\n\nViel Spass beim Spielen!'; mail($mail, 'Animegame', 'Zugangsdaten,' . "\n\n" . ' Sie lauten: ' . "\n\n" . 'Username: ' . $nick_name . ' ' . "\n" . ' Passwort: ' . $pw_1 . ' ' . "\n\n" . ' Aktivierungsnummer: ' . $serial_1 . ' ' . "\n\n" . ' Bitte geben sie die Aktivierungsnummer innerhalb von 14 Tagen auf der Seite ein oder klicken sie auf folgenden Link' . "\n" . ' ' . $aktivierungslink . ' ' . "\n\n" . 'Viel Spass beim Spielen!', "From: " . "Vegeta" . "\nReply-To: " . $GLOBALS['email_webmaster'] . "\nX-Mailer: PHP/" . phpversion()); diff --git a/ag/arena.php b/ag/arena.php index 5dcd1fa..ca0c4cd 100644 --- a/ag/arena.php +++ b/ag/arena.php @@ -5,12 +5,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/arena.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/exp.inc.php'); +include_once('path.inc.php'); // get the path ;) +include_once(ROOT_PATH.'/include/config.inc.php'); +include_once(ROOT_PATH.'/include/designfunctions.inc.php'); +include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php'); +include_once(ROOT_PATH.'/include/arena.inc.php'); +include_once(ROOT_PATH.'/include/parse.inc.php'); +include_once(ROOT_PATH.'/include/exp.inc.php'); // GET-Section // Kritisch (SQL-Injections) @@ -146,7 +147,7 @@ function displayAusbau($arena){ -'; if($arena['skill'] < $cm + $hm + $lu){ displayErrorMessage(NULL, 'Nicht genug Skill-Points!', displayHistoryBackLink()); @@ -295,7 +296,7 @@ if($charmax !== NULL || $hausmeister !== NULL || $luxus !== NULL){ - +?> Startgebot - +   diff --git a/ag/auser.php b/ag/auser.php index cc19fe7..de39d49 100644 --- a/ag/auser.php +++ b/ag/auser.php @@ -8,10 +8,11 @@ ?> "; -while($kampf1 = mysql_fetch_array($kampfs1)) { - -$char_1 = mysql_Fetch_array(mysql_query("SELECT name, hp, mp, bild, besitzer, id FROM chars WHERE id='$kampf1[char1]' LIMIT 1")); -$char_2 = mysql_Fetch_array(mysql_query("SELECT name, hp, mp, bild, besitzer, id FROM chars WHERE id='$kampf1[char2]' LIMIT 1")); - -$spleoic = "clan"; - -$starke1 = explode(",", $kampf1[starke1]); -$starke2 = explode(",", $kampf1[starke2]); -$ver1 = explode(",", $kampf1[ver1]); -$ver2 = explode(",", $kampf1[ver2]); -$speed1 = explode(",", $kampf1[speed1]); -$speed2 = explode(",", $kampf1[speed2]); -$ausdauer1 = explode(",", $kampf1[ausdauer1]); -$ausdauer2 = explode(",", $kampf1[ausdauer2]); - -$schaden1 = explode(",", $kampf1[schaden1]); -$schaden2 = explode(",", $kampf1[schaden2]); -$attacke1 = explode(",", $kampf1[attacke1]); -$attacke2 = explode(",", $kampf1[attacke2]); - -$hp1 = explode(",", $kampf1[hp1]); -$hp2 = explode(",", $kampf1[hp2]); -$mp1 = explode(",", $kampf1[mp1]); -$mp2 = explode(",", $kampf1[mp2]); - -$a_hp1 = explode(",", $char_1[hp]); -$a_hp2 = explode(",", $char_2[hp]); -$a_mp1 = explode(",", $char_1[mp]); -$a_mp2 = explode(",", $char_2[mp]); -$runde = 1; - -include($_SERVER['DOCUMENT_ROOT'].'ag/include/kampf_anzeige.php'); -} -*/ -?> diff --git a/ag/char.php b/ag/char.php index 4d09bfd..0aac99e 100644 --- a/ag/char.php +++ b/ag/char.php @@ -11,13 +11,14 @@ * TODO: Alle "" Strings in '' Strings umwandeln * TODO: Funktioneller Aufruf, damit exit-Tags verschwinden koennen und somit der Chat angezeigt werden kann!! */ -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/erstellfunctions.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/usergroup.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/exp.inc.php'); +include_once('path.inc.php'); // get the path ;) +include_once(ROOT_PATH.'/include/config.inc.php'); +include_once(ROOT_PATH.'/include/designfunctions.inc.php'); +include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php'); +include_once(ROOT_PATH.'/include/erstellfunctions.inc.php'); +include_once(ROOT_PATH.'/include/parse.inc.php'); +include_once(ROOT_PATH.'/include/usergroup.inc.php'); +include_once(ROOT_PATH.'/include/exp.inc.php'); // GET-Section @@ -71,11 +72,11 @@ function handleErstelleCharRequestOfTestUser($user, $type, $name, $bild, $lvl, $ $type != 'Namekianer' && $type != 'Pirat' && $type != 'Schwertkämpfer' && $type != 'Grandline Maschine' && $type != 'Kaioshin' && $type != 'Shichibukai'){ displayErrorMessage(NULL,'Rasse kann nicht erstellt werden!',displayHistoryBackLink()); return; - } + } if(!is_numeric($hp) || !is_numeric($mp) || !is_numeric($str) || !is_numeric($def) || !is_numeric($spd) || !is_numeric($end) || !is_numeric($lck)) { displayErrorMessage(NULL,'Ungültige Eingabe bei den Stats!',displayHistoryBackLink()); return; - } + } if($lp < ($hp+$mp+$str+$def+$spd+$end+$lck)) { displayErrorMessage(NULL,'Es wurden mehr Lernpunkte ausgegeben als eigentlich möglich!',displayHistoryBackLink()); return; @@ -146,14 +147,14 @@ function handleSecondPhase($type, $name){ function handleSecondPhaseForTester($type, $name){ ?>

- - + + - + @@ -215,7 +216,7 @@ function handleThirdPhaseForTester($type, $name, $char_lvl){ ?> - + @@ -224,19 +225,19 @@ function handleThirdPhaseForTester($type, $name, $char_lvl){ style="border-collapse: collapse" bordercolor="#111111" width="100%" height="20"> - - - - - + - - - + + + + + + + - + diff --git a/ag/char_index.php b/ag/char_index.php index 85796a8..41d638b 100644 --- a/ag/char_index.php +++ b/ag/char_index.php @@ -13,10 +13,11 @@ * TODO: Funktioneller Aufruf, damit exit-Tags verschwinden koennen und somit der Chat angezeigt werden kann!! */ -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/char.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php'); +include_once('path.inc.php'); // get the path ;) +include_once (ROOT_PATH . '/include/config.inc.php'); +include_once (ROOT_PATH . '/include/char.inc.php'); +include_once (ROOT_PATH . '/include/fehlerausgabe.inc.php'); +include_once (ROOT_PATH . '/include/parse.inc.php'); // GET-Section // Kritisch (SQL-Injections) @@ -52,7 +53,7 @@ if(count($chars) == 0){ ?> +?> '; - + if($i==3){ echo '
Charakter erstellen (2/3)Charakter erstellen (2/3)
Rasse:
Charakter erstellen (3/3)
CharakterTyp: Charakter erstellen (3/3)
Charakterlevel:
CharakterTyp:
Charakterlevel:
verfügbare LP:
HP (1LP = 10HP):
Du hast noch keine Chars!
diff --git a/ag/char_overview.php b/ag/char_overview.php index 9d44668..00aa127 100644 --- a/ag/char_overview.php +++ b/ag/char_overview.php @@ -14,10 +14,11 @@ */ -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php'); +include_once('path.inc.php'); // get the path ;) +include_once(ROOT_PATH.'/include/config.inc.php'); +include_once(ROOT_PATH.'/include/designfunctions.inc.php'); +include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php'); +include_once(ROOT_PATH.'/include/char.inc.php'); $chars = getCharsOfUser($user_ida['id']); @@ -25,7 +26,7 @@ include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php'); foreach($chars as $my_charz){ // $hp = explode(",", $my_charz[hp]); // $mp = explode(",", $my_charz[mp]); -// +// // $POWERLEVEL5 = $my_charz['starke']+$my_charz['verteidigung']+$my_charz['speed']+$my_charz['ausdauer']+$my_charz['glueck'] + $hp[1]/10 + $mp[1]/5; $POWERLEVEL5 = $my_charz['starke']+$my_charz['verteidigung']+$my_charz['speed']+$my_charz['ausdauer']+$my_charz['glueck']; if($my_charz['fusion']=="ja"){ @@ -41,23 +42,23 @@ include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php'); $hptemp = explode(",", $my_charz['hp']); $hpleft[$char_zahl] = $hptemp['0'] / $hptemp['1'] * 100; $mptemp = explode(",", $my_charz['mp']); - $mpleft[$char_zahl] = $mptemp['0'] / $mptemp['1'] * 100; + $mpleft[$char_zahl] = $mptemp['0'] / $mptemp['1'] * 100; $exptemp = explode(",", $my_charz['exp']); $room = mysql_query('SELECT ci.name FROM clan_item ci inner join clan_ware cw on ci.id = cw.item_id WHERE cw.id='.$my_charz['clan_train']); $clanroom=mysql_fetch_assoc($room); if($clanroom['name']=="") - $clanroom['name']="kein"; - + $clanroom['name']="kein"; + $temproom="
Trainingsraum: ".$clanroom['name'].""; - + $hp = "HP: ".$hptemp['0']." / ".$hptemp['1']; if($my_charz['status'] == "Schatz Suche") $statustemp = "Schatz%20Suche"; else $statustemp = $my_charz['status']; - - + + if($my_charz['kampf_item'] != NULL && $my_charz['kampf_item'] != ',,,,'){ // echo 'Problematic Entry = '.$chara_1['kampf_item'].'
'; $char1_buffs = mysql_fetch_assoc(mysql_query('SELECT sum(i.hp) as hp, sum(i.mp) as mp, sum(i.starke) as starke, sum(i.verteidigung) as verteidigung, sum(i.speed) as speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id IN (' . $my_charz['kampf_item'] . ')')); @@ -67,7 +68,7 @@ include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php'); $c_speed = $char1_buffs['speed']==0?$my_charz['speed']:($my_charz['speed']).' (+'.$char1_buffs['speed'].')'; $c_ausdauer = $char1_buffs['ausdauer']==0?$my_charz['ausdauer']:($my_charz['ausdauer']).' (+'.$char1_buffs['ausdauer'].')'; $c_glueck = $char1_buffs['glueck']==0?$my_charz['glueck']:($my_charz['glueck']).' (+'.$char1_buffs['glueck'].')'; - + $mp = "MP: ".$mptemp['0']." / ".$mptemp['1']; $exp = "Exp: ".$exptemp['0']." / ".$exptemp['1']; if($my_charz['status'] == 'Frei' ){ @@ -87,24 +88,24 @@ include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php'); $werte = "Stärke: ".$c_starke."
Verteidigung: ".$c_verteidigung."
Geschwindigkeit: ".$c_speed."
Ausdauer: ".$c_ausdauer."
Glück: ".$c_glueck; $lp = "
Lernpunkte: ".$my_charz['lernpunkte'].""; $tp = "Trainingspunkte: ".$my_charz['training_points']."".$temproom; - + //$temp = $statustemp.""; $temp2 = "Level: ".$my_charz['level']."
Powerlevel: $POWERLEVEL5
Typ: ".$my_charz['type']."
Rasse: ".$my_charz['rasse'].$fusi.$frucht.$lp."
$tp

$hp
$mp
$exp

$werte"; $popup[$char_zahl] = $temp.'
'.''.$my_charz['name'].'
'.$temp2; $status[$char_zahl]= $my_charz['status']; - + $char_zahl++; } $visiblechars = 8; - + for($i=$char_zahl;$i<$visiblechars;$i++){ $CHARAKTER_NAME[$i] = "Kein Charakter"; $CHARAKTER_VERWALTUNG[$i] = "none"; $CHARAKTER_LERNPUNKTE[$i] = "none"; $CHARAKTER_TRAINING[$i] = "none"; $CHARAKTER_STATUS[$i] = "none"; - $CHARAKTER_SCHATZ[$i] = "none"; + $CHARAKTER_SCHATZ[$i] = "none"; } if(!$chars_bilds['0']) { $chars_bilds['0'] = "bilder/Char.gif"; } @@ -126,10 +127,10 @@ if(!$chars_bilds['7']) { $chars_bilds['7'] = "bilder/Char.gif"; } { if($chars_bilds[$i]!='bilder/Char.gif') { - + echo '

'; echo ''; - + echo ''; if($hpleft[$i] > 1) echo ''; @@ -142,9 +143,9 @@ if(!$chars_bilds['7']) { $chars_bilds['7'] = "bilder/Char.gif"; } if($mpleft[$i] < 100) echo ''; echo '
'; - + echo $popup[$i].'

'; } @@ -199,5 +200,5 @@ if(!$chars_bilds['7']) { $chars_bilds['7'] = "bilder/Char.gif"; } }; - +
\ No newline at end of file diff --git a/ag/char_profil.php b/ag/char_profil.php index 6cbf220..e86e050 100644 --- a/ag/char_profil.php +++ b/ag/char_profil.php @@ -6,13 +6,14 @@ * */ -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/config.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/designfunctions.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/fehlerausgabe.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/parse.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/char_profil.inc.php'); //Allgemeine Funktionen für die Char darstellung -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/defines.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/attackenset.inc.php'); +include_once('path.inc.php'); // get the path ;) +include_once(ROOT_PATH.'//include/config.inc.php'); +include_once(ROOT_PATH.'//include/designfunctions.inc.php'); +include_once(ROOT_PATH.'//include/fehlerausgabe.inc.php'); +include_once(ROOT_PATH.'//include/parse.inc.php'); +include_once(ROOT_PATH.'//include/char_profil.inc.php'); //Allgemeine Funktionen für die Char darstellung +include_once(ROOT_PATH.'//include/defines.inc.php'); +include_once(ROOT_PATH.'//include/attackenset.inc.php'); defineIfNotDefined('MAX_ROUNDS', 10); @@ -32,7 +33,7 @@ function stelledar($char_id,$user_ida,$name) { //Attackensets laden $clanfight_attset = getCharAttackSet($char_id, CLANKAMPF); $normfight_attset = getCharAttackSet($char_id, NORMALKAMPF); - + //TODO:prüfen ob man nicht auch den name aus $learned_atts holen kann $clanfight_attset_name = getAttackNamesFromAttackSet($clanfight_attset); $normfight_attset_name = getAttackNamesFromAttackSet($normfight_attset); @@ -316,7 +317,7 @@ function stelledar($char_id,$user_ida,$name) {
'; echo '
weiter...
'; } else { @@ -379,11 +380,11 @@ function eintragen($char_id,$name,$user_ida) { } } -if ($_POST['submit']==1) { - eintragen($char_id,$name,$user_ida); -} elseif ($char_id) { - stelledar($char_id,$user_ida,$name); +if ($_POST['submit']==1) { + eintragen($char_id,$name,$user_ida); +} elseif ($char_id) { + stelledar($char_id,$user_ida,$name); } else { - echo 'Leider wurde die Seite nicht korrekt aufgerufen! Rufen Sie die Seite bitte korrekt auf'; + echo 'Leider wurde die Seite nicht korrekt aufgerufen! Rufen Sie die Seite bitte korrekt auf'; } ?> \ No newline at end of file diff --git a/ag/char_profil2.php b/ag/char_profil2.php index d9ad196..a44ea24 100644 --- a/ag/char_profil2.php +++ b/ag/char_profil2.php @@ -5,11 +5,12 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/config.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/designfunctions.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/fehlerausgabe.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/parse.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/char.inc.php'); +include_once('path.inc.php'); // get the path ;) +include_once(ROOT_PATH.'//include/config.inc.php'); +include_once(ROOT_PATH.'//include/designfunctions.inc.php'); +include_once(ROOT_PATH.'//include/fehlerausgabe.inc.php'); +include_once(ROOT_PATH.'//include/parse.inc.php'); +include_once(ROOT_PATH.'//include/char.inc.php'); $char_id = validateUnsignedInteger($_REQUEST['char_id'], null); $char = getChar($char_id); @@ -25,31 +26,31 @@ $char = getChar($char_id); Helm - + Rüstung - + Schild - + Schwert - + Schuhe - + diff --git a/ag/clan/add.php b/ag/clan/add.php index 4abc040..2710d45 100644 --- a/ag/clan/add.php +++ b/ag/clan/add.php @@ -5,11 +5,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/config.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/clan.inc.php'); +include_once (ROOT_PATH . '/include/config.inc.php'); +include_once (ROOT_PATH . '/include/fehlerausgabe.inc.php'); +include_once (ROOT_PATH . '/include/designfunctions.inc.php'); +include_once (ROOT_PATH . '/include/parse.inc.php'); +include_once (ROOT_PATH . '/include/clan.inc.php'); // GET-Section // Kritisch (SQL-Injections) diff --git a/ag/clan/c_kampf.php b/ag/clan/c_kampf.php index 40fde18..1689760 100644 --- a/ag/clan/c_kampf.php +++ b/ag/clan/c_kampf.php @@ -13,8 +13,8 @@ } @@ -51,7 +51,7 @@ $a_mp2 = explode(",", $char_2[mp]); $runde = 1; // TODO: include_one und danach Funktionsaufruf!! -include($_SERVER['DOCUMENT_ROOT'].'ag/include/kampf_anzeige.php'); +include(ROOT_PATH.'/include/kampf_anzeige.php'); displayErrorMessage(NULL,$fehler_m,$weiter_an); diff --git a/ag/clan/c_markt.php b/ag/clan/c_markt.php index 5c9b885..60aa986 100644 --- a/ag/clan/c_markt.php +++ b/ag/clan/c_markt.php @@ -6,11 +6,11 @@ * */ -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/clan.inc.php'); +include_once(ROOT_PATH.'/include/config.inc.php'); +include_once(ROOT_PATH.'/include/designfunctions.inc.php'); +include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php'); +include_once (ROOT_PATH . '/include/parse.inc.php'); +include_once(ROOT_PATH.'/include/clan.inc.php'); // GET-Section diff --git a/ag/clan/c_ranglist.php b/ag/clan/c_ranglist.php index 352c0d9..4ef7135 100644 --- a/ag/clan/c_ranglist.php +++ b/ag/clan/c_ranglist.php @@ -6,9 +6,9 @@ * */ -include_once($_SERVER['DOCUMENT_ROOT'].'/ag/include/config.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/parse.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/designfunctions.inc.php'); +include_once(ROOT_PATH.'//include/config.inc.php'); +include_once (ROOT_PATH . '//include/parse.inc.php'); +include_once (ROOT_PATH . '//include/designfunctions.inc.php'); // GET-Section // Kritisch (SQL-Injections) diff --git a/ag/clan/c_ware.php b/ag/clan/c_ware.php index 2333e35..0ec25bf 100644 --- a/ag/clan/c_ware.php +++ b/ag/clan/c_ware.php @@ -7,9 +7,9 @@ * */ -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php'); -include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php'); -include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.inc.php'); +include_once(ROOT_PATH.'/include/config.inc.php'); +include_once(ROOT_PATH.'/include/char.inc.php'); +include_once (ROOT_PATH . '/include/parse.inc.php'); // GET-Section // Kritisch (SQL-Injections) $char_id = validateUnsignedInteger($_GET['char_id'], null); @@ -19,11 +19,11 @@ $c_ware = validateUnsignedInteger($_GET['c_ware'], null); $charm = $_GET['charm']; if(!$char_id) { - include($_SERVER['DOCUMENT_ROOT'].'ag/char_index.php'); + include(ROOT_PATH.'/char_index.php'); exit; } -if($charm) { +if($charm) { mysql_query("UPDATE chars SET clan_train='$c_ware' WHERE id='$char_id' AND besitzer='$user_ida[id]' LIMIT 1"); } @@ -67,7 +67,7 @@ echo "