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){
?>
';
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
- Nichts
+ Nichts
Rüstung
- Nichts
+ Nichts
Schild
- Nichts
+ Nichts
Schwert
- Nichts
+ Nichts
Schuhe
- Nichts
+ Nichts
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 "$row[name] (".displayMoney($row['nutzkosten
}
?>
-
+
diff --git a/ag/clan/clan_info.php b/ag/clan/clan_info.php
index 7946cef..af46329 100644
--- a/ag/clan/clan_info.php
+++ b/ag/clan/clan_info.php
@@ -6,9 +6,9 @@
*
*/
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/clan.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/clan_fights.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
+include_once(ROOT_PATH.'/include/clan.inc.php');
+include_once(ROOT_PATH.'/include/clan_fights.inc.php');
+include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
// GET-Section
diff --git a/ag/clan/kampf_info.php b/ag/clan/kampf_info.php
index edacfd6..4ea4043 100644
--- a/ag/clan/kampf_info.php
+++ b/ag/clan/kampf_info.php
@@ -6,9 +6,9 @@
*
*/
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/clan.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
+include_once(ROOT_PATH.'/include/clan.inc.php');
+include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
+include_once(ROOT_PATH.'/include/parse.inc.php');
//Get-Section
if(isset($_GET['action'])) {
@@ -83,7 +83,11 @@ function getFightType($id) {
function displayClanFightMenu($user) {
$user_clan = getClan($user['clan']);
- $clans = getAllClans();
+// $clans = getAllClans();
+ $clans_tmp = getClanFightCapableClanIds();
+ foreach ($clans_tmp as $clan_tmp_id) {
+ $clans[] = getClan($clan_tmp_id);
+ }
$challenges = getOpenChallengeRequests($user_clan['id']);
$test = getOpenChallengeIDs($user_clan['id']);
?>
@@ -140,7 +144,7 @@ function displayClanFightMenu($user) {
}
?>
-
-
-
- time()) {
- displayErrorMessage(NULL, 'Der Kampf ist noch nicht vorbei!', displayHistoryBackLink());
- exit;
-}
-
-while ($pl < 3) {
- $pl2 = $pl +1;
- $kampf1 = mysql_Fetch_array(mysql_query("SELECT * FROM clan_kampf WHERE char1='$c_a1[$pl]' OR char2='$c_a1[$pl]' AND x_satz='$kampf9[x_satz]' LIMIT 1"));
- $user = mysql_fetch_array(mysql_query("SELECT id, geld FROM user WHERE nickname='$name' LIMIT 1"));
-
- $char_1 = getChar($kampf1['char1']);mysql_Fetch_array(mysql_query("SELECT c.name, c.hp, c.mp, c.bild, c.id, u.clan FROM chars c LEFT JOIN user u ON(c.besitzer=u.id) WHERE c.id='$kampf1[char1]' LIMIT 1"));
- $char_2 = getChar($kampf1['char1']);mysql_Fetch_array(mysql_query("SELECT c.name, c.hp, c.mp, c.bild, c.id, u.clan FROM chars c LEFT JOIN user u ON(c.besitzer=u.id) WHERE c.id='$kampf1[char2]' LIMIT 1"));
-
- $arena = mysql_Fetch_array(mysql_query("SELECT name, besitzer, history_besucher, history_geld FROM arena WHERE id='$kampf1[arena_name]' LIMIT 1"));
- $my_charakter = mysql_fetch_array(mysql_Query("SELECT name, siege, niederlagen, liga_siege, liga_niederlagen, preis, dead_list, besitzer FROM chars WHERE id='$char_id' LIMIT 1"));
-
- $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');
-
- if ($kampf1[win] == "$char_1[name]") {
- $clan1++;
- }
- if ($kampf1[win] == "$char_2[name]") {
- $clan2++;
- }
-
- if (!$kampf1[db_satz]) {
- $pluto++;
- }
-
- $runde = $runde -1;
-
- if ($kampf1[db_satz] == $char_id) {
- $char_infos = mysql_fetch_Array(mysql_query("SELECT name, id, hp, mp, exp FROM chars WHERE id='$char_id' LIMIT 1"));
-
- $alt_exp = explode(",", $char_infos[exp]);
-
- if ($kampf1[char1] == $char_id) {
- $new_exp = $alt_exp[0] + $kampf1[exp1];
- $new_geld = $user[geld] + $kampf1[geld1] + $ex_geld;
- $new_hp = $hp1[$runde];
- $new_mp = $mp1[$runde];
- if ($new_hp < 1) {
- $new_hp = 1;
- }
- if ($new_mp < 1) {
- $new_mp = 1;
- }
- if ($new_hp > $hp1[1]) {
- $new_hp = $hp1[1];
- }
- if ($new_mp > $mp1[1]) {
- $new_mp = $mp1[1];
- }
- mysql_query("UPDATE chars SET status='Frei', mp='$new_mp,$a_mp1[1]', hp='$new_hp,$a_hp1[1]', exp='$new_exp,$alt_exp[1]' WHERE id='$char_id' LIMIT 1");
- } else {
-
- $new_exp = $alt_exp[0] + $kampf1[exp2];
- $new_geld = $user[geld] + $kampf1[geld2] + $ex_geld;
- $new_hp = $hp2[$runde];
- $new_mp = $mp2[$runde];
- if ($new_hp < 1) {
- $new_hp = 1;
- }
- if ($new_mp < 1) {
- $new_mp = 1;
- }
- if ($new_hp > $hp2[1]) {
- $new_hp = $hp2[1];
- }
- if ($new_mp > $mp2[1]) {
- $new_mp = $mp2[1];
- }
- mysql_query("UPDATE chars SET status='Frei', mp='$new_mp,$a_mp2[1]', hp='$new_hp,$a_hp2[1]', exp='$new_exp,$alt_exp[1]' WHERE id='$char_id' LIMIT 1");
- }
-
- ###################################################CHARAKTER WIN
-
- if ($kampf1[win] == "$my_charakter[name]") {
- $new_siege = $my_charakter[siege] + 1;
-
- mysql_query("UPDATE chars SET siege='$new_siege' WHERE id='$char_id'");
- } else {
-
- ###################################################CHARAKTER LOSE
- $new_niederlage = $my_charakter[niederlage] + 1;
-
- mysql_query("UPDATE chars SET niederlage='$new_niederlage' WHERE id='$char_id'");
- }
-
- include ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/exp.php');
-
- mysql_query("UPDATE user SET geld='$new_geld' WHERE id='$user[id]' LIMIT 1");
- mysql_query("UPDATE clan_kampf SET db_satz='' WHERE db_satz='$char_id'");
-
- }
-
- $pl++;
-}
-
-$clan_name1 = mysql_fetch_Array(mysql_query("SELECT clanname, siege, niederlagen, id FROM clan WHERE id='$char_1[clan]' LIMIT 1"));
-$clan_name2 = mysql_fetch_Array(mysql_query("SELECT clanname, siege, niederlagen, id FROM clan WHERE id='$char_2[clan]' LIMIT 1"));
-
-if ($c_a1[0] == $kampf9[char1] OR $c_a1[1] == $kampf9[char1] OR $c_a1[2] == $kampf9[char1]) {
-
- if ($clan1 > $clan2) {
- $new_siegea1 = $clan_name1[siege] + 1;
- $clan_sieger = $clan_name1[clanname];
- if ($pluto == -1) {
- mysql_Query("UPDATE clan SET siege='$new_siegea1' WHERE id='$clan_name1[id]' LIMIT 1");
- }
-
- } else {
- $clan_sieger = $clan_name2[clanname];
- $new_niederlage1 = $clan_name1[niederlagen] + 1;
- if ($pluto == -1) {
- mysql_Query("UPDATE clan SET niederlagen='$new_niederlage1' WHERE id='$clan_name1[id]' LIMIT 1");
- }
- }
-
-} else {
-
- if ($clan1 < $clan2) {
- $new_siegea1 = $clan_name2[siege] + 1;
- $clan_sieger = $clan_name2[clanname];
- if ($pluto == -1) {
- mysql_Query("UPDATE clan SET siege='$new_siegea1' WHERE id='$clan_name2[id]' LIMIT 1");
- }
- } else {
- $clan_sieger = $clan_name1[clanname];
- $new_niederlage1 = $clan_name2[niederlagen] + 1;
- if ($pluto == -1) {
- mysql_Query("UPDATE clan SET niederlagen='$new_niederlage1' WHERE id='$clan_name2[id]' LIMIT 1");
- }
- }
-}
-if ($pluto == 1) {
- mysql_query("DELETE FROM clan_kampf WHERE x_satz='$user_ida[clan]'");
-}
-
-echo "Clan Sieger: $clan_sieger";
-*/
-?>
\ No newline at end of file
diff --git a/ag/dragonballs.php b/ag/dragonballs.php
index cd149c9..863fe4d 100644
--- a/ag/dragonballs.php
+++ b/ag/dragonballs.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/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/erstellfunctions.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/semaphore.inc.php');
+include_once('path.inc.php'); // get the path ;)
+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/erstellfunctions.inc.php');
+include_once(ROOT_PATH.'/include/semaphore.inc.php');
// GET-Section
// Kritisch (SQL-Injections)
@@ -49,8 +50,8 @@ function wuenscheTeufelsfrucht($user){
}
$natur_frucht = mysql_query('SELECT item, id,verteilung FROM wochen_markt WHERE art=\'natur\' order by id'); ///wieviel TF gibt es?.
$value = mt_rand(1,100);
-
-
+
+
$peak = 0;
while($row = mysql_fetch_assoc($natur_frucht)){
$peak += $row['verteilung'];
@@ -72,12 +73,12 @@ function wuenscheSpecialChar($user, $specialcharname, $newname = ''){
displayErrorMessage(NULL,'Es koennen nur Kaioshin und Shichibukai gewünscht werden!!',displayHistoryBackLink());
return false;
}
-
+
if($newname == ''){
displayErrorMessage(NULL,'Der Name ist ungueltig!!',displayHistoryBackLink());
return false;
}
-
+
// Hat der User überhaupt das Item ???
$qry = mysql_query('SELECT count(*) AS anzahl FROM sp_ware WHERE item='.$spitem.' AND user='.$user['id']);
$row = mysql_fetch_assoc($qry);
@@ -107,7 +108,7 @@ function wuenscheSpecialChar($user, $specialcharname, $newname = ''){
function wuenscheUserRename($user, $newname){
$sql = 'Insert into user_rename(pre_name, post_name, datum, userid, wunsch) values(\''.$user['nickname'].'\', \''.$newname.'\', now(), '.$user['id'].', 1)';
- mysql_query($sql);
+ mysql_query($sql);
mysql_query('Update user set nickname = \''.$newname.'\' WHERE id = '.$user['id']);
return true;
}
@@ -117,7 +118,7 @@ function worker($charm,$wunsch,$user,$newname){
// Wichtig, die Semaphore!!
if(!semaphoreUP($ressource)){ // TRUE, diese Anfrage darf bearbeitet werden
displayErrorMessage(NULL,'Verarbeitung gerade in Gange, bitte warten...', displayHistoryBackLink());
- return;
+ return;
}
$dragonballs = mysql_fetch_assoc(mysql_query('SELECT count(id) as anzahl FROM sp_ware WHERE user='.$user['id'].' AND item=11'));
@@ -129,7 +130,7 @@ function worker($charm,$wunsch,$user,$newname){
$sql = 'DELETE FROM sp_ware WHERE item=11 AND user='.$user['id'].' LIMIT 7';
mysql_query($sql);
-
+
$result = true;
if($charm == 1) {
if($wunsch == 1) {
diff --git a/ag/dropdownmenu.php b/ag/dropdownmenu.php
deleted file mode 100644
index 4c11abb..0000000
--- a/ag/dropdownmenu.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- Charakter auswählen...
- $row[name]>";
- }
- ?>
-
-
\ No newline at end of file
diff --git a/ag/event_kampf_anzeige.php b/ag/event_kampf_anzeige.php
index 25ba42e..9bc55a0 100644
--- a/ag/event_kampf_anzeige.php
+++ b/ag/event_kampf_anzeige.php
@@ -6,9 +6,10 @@
*
*/
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/db.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/kampf_anzeige.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/kampf_anzeige.inc.php');
+include_once(ROOT_PATH.'/include/parse.inc.php');
$event_id = validateUnsignedInteger($_GET['event_id'], null);
$event_fight_id = validateUnsignedInteger($_GET['event_fight_id'], null);
diff --git a/ag/faq.php b/ag/faq.php
index be9a5e4..50ec840 100644
--- a/ag/faq.php
+++ b/ag/faq.php
@@ -14,7 +14,8 @@
* Zuletzt verändert: 03.10.2007
*******************************************************************************/
-include_once "include/faq.inc.php";
+include_once('path.inc.php'); // get the path ;)
+include_once ROOT_PATH.'include/faq.inc.php';
$themes = getTableOfContents(' <###ROW###>',' ###ROW###> ');
$content = getContext('','',' ',' ');
?>
diff --git a/ag/gfx/gfx_config.php b/ag/gfx/gfx_config.php
index e750610..b15802d 100644
--- a/ag/gfx/gfx_config.php
+++ b/ag/gfx/gfx_config.php
@@ -6,8 +6,8 @@
*
*/
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
+include_once(ROOT_PATH.'/include/designfunctions.inc.php');
+include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
function checkref() {
diff --git a/ag/gm/gm_seite.php b/ag/gm/gm_seite.php
index fe82de7..05d4365 100644
--- a/ag/gm/gm_seite.php
+++ b/ag/gm/gm_seite.php
@@ -17,25 +17,25 @@ session_start();
* Zuletzt verändert: 03.10.2007
*******************************************************************************/
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/db.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/bann.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/faq.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/user.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/usergroup.inc.php');
+include_once(ROOT_PATH.'/include/config/db.inc.php');
+include_once(ROOT_PATH.'/include/designfunctions.inc.php');
+include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
+include_once(ROOT_PATH.'/include/bann.inc.php');
+include_once(ROOT_PATH.'/include/faq.inc.php');
+include_once(ROOT_PATH.'/include/parse.inc.php');
+include_once(ROOT_PATH.'/include/user.inc.php');
+include_once(ROOT_PATH.'/include/usergroup.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/attacken.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/bilderschau.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/clan.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/info.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/item.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/monster.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/npc.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/shop.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/user.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/tournament.inc.php');
+include_once(ROOT_PATH.'/gm/include/attacken.inc.php');
+include_once(ROOT_PATH.'/gm/include/bilderschau.inc.php');
+include_once(ROOT_PATH.'/gm/include/clan.inc.php');
+include_once(ROOT_PATH.'/gm/include/info.inc.php');
+include_once(ROOT_PATH.'/gm/include/item.inc.php');
+include_once(ROOT_PATH.'/gm/include/monster.inc.php');
+include_once(ROOT_PATH.'/gm/include/npc.inc.php');
+include_once(ROOT_PATH.'/gm/include/shop.inc.php');
+include_once(ROOT_PATH.'/gm/include/user.inc.php');
+include_once(ROOT_PATH.'/gm/include/tournament.inc.php');
function logaction($message){
$sql = 'Insert into gm_actions(userid, time, message, ip) values('.$_SESSION['user'].', now(), \''.$message.'\', \''.$_SERVER['REMOTE_ADDR'].'\')';
@@ -66,15 +66,15 @@ function loginUser($user,$pass){
if(checkLoginPassword($user,$pass)){
$test = 'SELECT * from user where nickname = \''.$user.'\'';
$qry = mysql_query($test);
- $result = mysql_fetch_assoc($qry);
+ $result = mysql_fetch_assoc($qry);
$usergroups = getUserGroups($user);
-
+
if(isUserInGroup($usergroups, ADMIN)) {
$_SESSION['user'] = $result['id'];
$_SESSION['username'] = $result['nickname'];
$_SESSION['password'] = $result['passwort'];
$_SESSION['usergroups'] = $usergroups;
- echo 'Zum Hauptmenu ';
+ echo 'Zum Hauptmenu ';
return true;
}
return false;
@@ -244,15 +244,15 @@ if(checkLoginData($_SESSION['user'],$_SESSION['password'])){
showActionLog();
} else if($_REQUEST['choose'] == 'cheat'){
displayCheater($_REQUEST['action'], $_REQUEST['from'], $_REQUEST['until'], $_REQUEST['user1'], $_REQUEST['user2'], $_REQUEST['tradeid'], $_REQUEST['verify']);
- } else if($_REQUEST['choose'] == 'npc'){
+ } else if($_REQUEST['choose'] == 'npc'){
displayNPC($_REQUEST['action'], $_REQUEST['task'], $_REQUEST['charid'], $_REQUEST['table'], $_REQUEST['page'], $_REQUEST['data'], $_REQUEST['att_ids']);
} else if($_REQUEST['choose'] == 'shop'){
- displayShop($_REQUEST['action'], $_REQUEST['s_id'],$_REQUEST['info'], $_REQUEST['s_name'] , $_REQUEST['s2_name'], $_REQUEST['s3_name'], $_REQUEST['s_typ'], $_REQUEST['preis'], $_REQUEST['frei'], $_REQUEST['anzahl']);
+ displayShop($_REQUEST['action'], $_REQUEST['s_id'],$_REQUEST['info'], $_REQUEST['s_name'] , $_REQUEST['s2_name'], $_REQUEST['s3_name'], $_REQUEST['s_typ'], $_REQUEST['preis'], $_REQUEST['frei'], $_REQUEST['anzahl']);
} else if($_REQUEST['choose'] == 'usergroups'){
displayUserGroups($_REQUEST['action'] ,$_REQUEST['uname'] ,$_REQUEST['ugname'], $_REQUEST['delete'], $_REQUEST['add']);
} else if($_REQUEST['choose'] == 'tournament'){
displayTournamentOptions($_REQUEST['action'], $_REQUEST['klein'], $_REQUEST['wochen']);
- }else {
+ }else {
displayOptions();
}
} else if(isset($_POST['user'])){
diff --git a/ag/gm/include/npc.inc.php b/ag/gm/include/npc.inc.php
index dd47660..004c148 100644
--- a/ag/gm/include/npc.inc.php
+++ b/ag/gm/include/npc.inc.php
@@ -9,7 +9,7 @@
?>
'."\n";
$old = $row['art'];
}
-
+
$eventhighscore[$row['art']] .= ''."\n";
$eventhighscore[$row['art']] .= ' '.$row['datum'].' '."\n";
if(!is_null($row['charid'])){
@@ -63,7 +64,7 @@ while($row = mysql_fetch_assoc($qry)){
} else{
$eventhighscore[$row['art']] .= ' '.$row['username'].' '."\n";
}
- $eventhighscore[$row['art']] .= ' '."\n";
+ $eventhighscore[$row['art']] .= ''."\n";
}
// Now echo the stuff!!
diff --git a/ag/img.php b/ag/img.php
index 2ee9196..df11891 100644
--- a/ag/img.php
+++ b/ag/img.php
@@ -5,9 +5,10 @@
* @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/parse.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/img.inc.php');
+include_once('path.inc.php'); // get the path ;)
+include_once(ROOT_PATH.'/include/config.inc.php');
+include_once(ROOT_PATH.'/include/parse.inc.php');
+include_once(ROOT_PATH.'/include/img.inc.php');
// Die möglichen Zeichen
// Einziger Übergabewert (und der ist auch noch kritisch!!)
diff --git a/ag/inclu/awards.inc.php b/ag/inclu/awards.inc.php
index d8260fa..24f02bb 100644
--- a/ag/inclu/awards.inc.php
+++ b/ag/inclu/awards.inc.php
@@ -6,6 +6,6 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/awards.inc.php');
+include_once(ROOT_PATH.'/include/config/awards.inc.php');
echo join(' '."\n", $awards);
?>
\ No newline at end of file
diff --git a/ag/inclu/char.php b/ag/inclu/char.php
index 6969462..a4a39d0 100644
--- a/ag/inclu/char.php
+++ b/ag/inclu/char.php
@@ -6,8 +6,8 @@
*
*/
- include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php');
- include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/ads.inc.php');
+ include_once(ROOT_PATH.'/include/char.inc.php');
+ include_once(ROOT_PATH.'/include/ads.inc.php');
$char_zahl = 0;
$chars = getCharsOfUser($user_ida['id']);
diff --git a/ag/inclu/partner.inc.php b/ag/inclu/partner.inc.php
index 9afc7d2..3027d1a 100644
--- a/ag/inclu/partner.inc.php
+++ b/ag/inclu/partner.inc.php
@@ -6,6 +6,6 @@
*
*/
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/partner.inc.php');
+include_once(ROOT_PATH.'/include/config/partner.inc.php');
echo join(' '."\n", $partner);
?>
\ No newline at end of file
diff --git a/ag/inclu/toplists.inc.php b/ag/inclu/toplists.inc.php
index 8dc51d3..5e52673 100644
--- a/ag/inclu/toplists.inc.php
+++ b/ag/inclu/toplists.inc.php
@@ -6,7 +6,7 @@
*
*/
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config/toplists.inc.php');
+include_once(ROOT_PATH.'/include/config/toplists.inc.php');
?>
-
+
+
';
+ echo '';
mysql_query('UPDATE arena SET steuerlasten = steuerlasten - '.$tilgung. ' WHERE besitzer ='.$user['id']);
} else{
mysql_query('UPDATE user SET geld=' . $new_geld . ' WHERE id=' . $user['id'] . ' LIMIT 1');
}
// mysql_query("DELETE FROM kampf_nachricht WHERE charakter='$char_id'");
-// include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/exp.php');
+// include_once (ROOT_PATH . '/include/exp.php');
// Hinzufuegen der Exp und der Attacken :)
addExpToChar($char_id, $new_exp); // That was easy :)
-
+
// Nun die Attacken ins richtige Format setzen :)
// Momentan ist es so (1D Array)
// Schlag,Schlag,Kick,Schlag,Block,Schlag
@@ -294,10 +295,10 @@ if ($kampf1['id']) {
$l_attacken[] = array('a_name' => $attacken[$i], 'anzahl' => 1);
}
}
-
+
// Rufe nun die Funktion zum req'en der attacken auf :)
addAttackUsageToChar($char_id, $l_attacken);
-
+
if ($itemname) {
$item_names = mysql_query("SELECT name FROM $new_item WHERE id IN(" . $itemname . ")");
$x2 = 0;
diff --git a/ag/kampf_clan.php b/ag/kampf_clan.php
index 28c5c04..73a4f67 100644
--- a/ag/kampf_clan.php
+++ b/ag/kampf_clan.php
@@ -5,9 +5,10 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
-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('path.inc.php'); // get the path ;)
+include_once (ROOT_PATH . '/include/designfunctions.inc.php');
+include_once (ROOT_PATH . '/include/fehlerausgabe.inc.php');
+include_once (ROOT_PATH . '/include/arena.inc.php');
$k_exp[0] = "";
$X23 = "";
@@ -119,7 +120,7 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
$technick2 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick2[at_id]' LIMIT 10"));
///////////////////Hier laedt er den RELOAD der technik wenn die zusammen setzung nicht stimmen sollte
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/andere_technik.php'); /////////////////// Wenn man ne andere technik sich aussuchen will...
+ include (ROOT_PATH . '//include/kampf/andere_technik.php'); /////////////////// Wenn man ne andere technik sich aussuchen will...
$technick1[speed] = $technick1[speed] + (($technick1[speed] / 100) * $prozent_technik1);
$technick2[speed] = $technick2[speed] + (($technick2[speed] / 100) * $prozent_technik2);
@@ -149,36 +150,36 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) {
$aussetzten_runde = ""; ////// MUSS SO BLEIBEN WICHTIG
##################################MP, SSJ Verwandlungen, HP, Koerper Tausch Technicken
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/majin.php');
+ include (ROOT_PATH . '//include/kampf/majin.php');
if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/atk_wert.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/tausch2.php'); //////////////////Muss ganz oben sein wegen technik Tauschen
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/gift.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/frucht.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/mp.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/hp.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/hp2.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/SSJ.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/kaioken.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/kaioken2.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/copy.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/lose.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/lose2.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/ausdauer.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/mpv.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/tausch.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/hpmp.php');
+ include (ROOT_PATH . '//include/kampf/atk_wert.php');
+ include (ROOT_PATH . '//include/kampf/tausch2.php'); //////////////////Muss ganz oben sein wegen technik Tauschen
+ include (ROOT_PATH . '//include/kampf/gift.php');
+ include (ROOT_PATH . '//include/kampf/frucht.php');
+ include (ROOT_PATH . '//include/kampf/mp.php');
+ include (ROOT_PATH . '//include/kampf/hp.php');
+ include (ROOT_PATH . '//include/kampf/hp2.php');
+ include (ROOT_PATH . '//include/kampf/SSJ.php');
+ include (ROOT_PATH . '//include/kampf/kaioken.php');
+ include (ROOT_PATH . '//include/kampf/kaioken2.php');
+ include (ROOT_PATH . '//include/kampf/copy.php');
+ include (ROOT_PATH . '//include/kampf/lose.php');
+ include (ROOT_PATH . '//include/kampf/lose2.php');
+ include (ROOT_PATH . '//include/kampf/ausdauer.php');
+ include (ROOT_PATH . '//include/kampf/mpv.php');
+ include (ROOT_PATH . '//include/kampf/tausch.php');
+ include (ROOT_PATH . '//include/kampf/hpmp.php');
//include "kampf/summon.php";
}
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/atk_wert.php');
+ include (ROOT_PATH . '//include/kampf/atk_wert.php');
if (!$aussetzten_runde) { /////DAS FUER MAJIN ATTACKEN
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/schatten.php');
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/runde.php');
+ include (ROOT_PATH . '//include/kampf/schatten.php');
+ include (ROOT_PATH . '//include/kampf/runde.php');
}
#####################################KAMPF SYSTEM
- include ($_SERVER['DOCUMENT_ROOT'] . '/ag/include/kampf/kampf_rechnung.php');
+ include (ROOT_PATH . '//include/kampf/kampf_rechnung.php');
#$db_query = mysql_fetch_array(mysql_query("SELECT * FROM clan_fights WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') AND dauer='0' order by id DESC LIMIT 1"));
$db_query = mysql_fetch_array(mysql_query("SELECT * FROM clan_fights WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') order by id DESC LIMIT 1"));
@@ -208,4 +209,4 @@ if ($k_hp[0] < $k_aufgabe[0] OR $k_hp[0] < $k_hp[1]) {
mysql_query("UPDATE clan_fights SET win='$sieger', lose='$verlierer' WHERE id='$db_query[id]'");
-?>
\ No newline at end of file
+?>
\ No newline at end of file
diff --git a/ag/kampf_list.php b/ag/kampf_list.php
index b4c0110..dceeda6 100644
--- a/ag/kampf_list.php
+++ b/ag/kampf_list.php
@@ -5,15 +5,15 @@
* @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/abholcodes.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/semaphore.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/img.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/exp.inc.php');
+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/abholcodes.inc.php');
+include_once(ROOT_PATH.'/include/parse.inc.php');
+include_once(ROOT_PATH.'/include/semaphore.inc.php');
+include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
+include_once(ROOT_PATH.'/include/img.inc.php');
+include_once(ROOT_PATH.'/include/exp.inc.php');
// GET-Section
// Kritisch (SQL-Injections)
diff --git a/ag/last_fight.php b/ag/last_fight.php
index cd2cc2a..68a97d5 100644
--- a/ag/last_fight.php
+++ b/ag/last_fight.php
@@ -5,8 +5,9 @@
* @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('path.inc.php'); // get the path ;)
+include_once (ROOT_PATH . '/include/config.inc.php');
+include_once (ROOT_PATH . '/include/char.inc.php');
?>
-
+
-
-
+
+
diff --git a/ag/news.php b/ag/news.php
index 2e458ee..aef73cf 100644
--- a/ag/news.php
+++ b/ag/news.php
@@ -5,9 +5,10 @@
* @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/parse.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/parse.inc.php');
// GET-Section
// Kritisch (SQL-Injections)
@@ -102,7 +103,7 @@ function displayNews($pagenum) {
if (!is_numeric($pagenum) || $pagenum < 0) {
$pagenum = 0;
}
-
+
$nachrichten = mysql_query('SELECT * FROM ff11_news order by id DESC LIMIT ' . ($pagenum*5) . ', 5');
while ($row = mysql_fetch_assoc($nachrichten)) {
diff --git a/ag/online.php b/ag/online.php
index c4106a2..3dd690e 100644
--- a/ag/online.php
+++ b/ag/online.php
@@ -5,8 +5,9 @@
* @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('path.inc.php'); // get the path ;)
+include_once(ROOT_PATH.'/include/config.inc.php');
+include_once(ROOT_PATH.'/include/designfunctions.inc.php');
?>
diff --git a/ag/path.inc.php b/ag/path.inc.php
new file mode 100644
index 0000000..30369dc
--- /dev/null
+++ b/ag/path.inc.php
@@ -0,0 +1,23 @@
+';
+
+ // okay this is the script that has included us :) -> lets search for the include/config/ directory
+ while(strlen($actual_path) > 0) {
+ $actual_path = substr($actual_path,0,strrpos($actual_path,'/'));
+ $url_path = substr($url_path,0,strrpos($url_path,'/'));
+ if(is_dir($actual_path . '/include/config')) {
+ define('ROOT_PATH', $actual_path);
+ define('ROOT_URL', $url_path);
+ }
+ }
+}
+
+?>
+
diff --git a/ag/profil.php b/ag/profil.php
index bc7c86c..f5eebb6 100644
--- a/ag/profil.php
+++ b/ag/profil.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/parse.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/user.inc.php');
+include_once('path.inc.php'); // get the path ;)
+include_once(ROOT_PATH.'/include/config.inc.php');
+include_once(ROOT_PATH.'/include/parse.inc.php');
+include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
+include_once(ROOT_PATH.'/include/designfunctions.inc.php');
+include_once(ROOT_PATH.'/include/user.inc.php');
// GET-Section
// Kritisch (SQL-Injections)
@@ -84,7 +85,7 @@ function changeProfil($user, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_p
}
setPassword($user['nickname'], $new_pw);
}
-
+
if($chat == 1) {
if(!isUserInGroup($usergroups, AKTIV_CHAT)) {
addUserToGroup($user['nickname'], AKTIV_CHAT);
@@ -94,7 +95,7 @@ function changeProfil($user, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_p
removeUserFromGroup($user['nickname'], AKTIV_CHAT);
}
}
-
+
if($ads == 1) {
if(!isUserInGroup($usergroups, WERBUNG_AN)) {
addUserToGroup($user['nickname'], WERBUNG_AN);
@@ -104,7 +105,7 @@ function changeProfil($user, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_p
removeUserFromGroup($user['nickname'], WERBUNG_AN);
}
}
-
+
if($acc_delete == 1) {
if(!isUserInGroup($usergroups, AKTIV_LOESCHSCHUTZ)) {
addUserToGroup($user['nickname'], AKTIV_LOESCHSCHUTZ);
@@ -182,7 +183,7 @@ function display($user, $usergroups){
Werbegrad:
-
-
+
diff --git a/ag/schatz3.php b/ag/schatz3.php
index fded802..56b4e2a 100644
--- a/ag/schatz3.php
+++ b/ag/schatz3.php
@@ -4,15 +4,17 @@
* @copyright (c) 2010 animegame.eu
* @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/parse.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/abholcodes.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/semaphore.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/kampf_anzeige.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/schatz.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/parse.inc.php');
+include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
+include_once(ROOT_PATH.'/include/abholcodes.inc.php');
+include_once(ROOT_PATH.'/include/designfunctions.inc.php');
+include_once(ROOT_PATH.'/include/semaphore.inc.php');
+include_once(ROOT_PATH.'/include/kampf_anzeige.inc.php');
+include_once(ROOT_PATH.'/include/schatz.inc.php');
+include_once(ROOT_PATH.'/include/char.inc.php');
// GET-Section
// Kritisch (SQL-Injections)
@@ -58,7 +60,7 @@ if($abort == 'cancel'){
displayErrorMessage(NULL,'Die Schatzsuche wurde abgebrochen!', displayIndexBackLink());
} else {
echo 'Schatz Suche wirklich abbrechen?
';
- echo 'Ja | Nein
';
+ echo 'Ja | Nein
';
}
} else{
if(($text = displaySchatzSuche($char)) !== null){
diff --git a/ag/schatz_suche.php b/ag/schatz_suche.php
index 541b2d3..d021a27 100644
--- a/ag/schatz_suche.php
+++ b/ag/schatz_suche.php
@@ -6,7 +6,8 @@
* @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('path.inc.php'); // get the path ;)
+include_once(ROOT_PATH.'/include/config.inc.php');
if(!$char_id) {
include "char_index.php";
exit;
diff --git a/ag/sp_item.php b/ag/sp_item.php
index c9f0ba5..e05c78e 100644
--- a/ag/sp_item.php
+++ b/ag/sp_item.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/parse.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/char.inc.php');
+include_once('path.inc.php'); // get the path ;)
+include_once(ROOT_PATH.'/include/config.inc.php');
+include_once(ROOT_PATH.'/include/parse.inc.php');
+include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
+include_once(ROOT_PATH.'/include/designfunctions.inc.php');
+include_once(ROOT_PATH.'/include/char.inc.php');
// GET-Section
// Kritisch (SQL-Injections)
@@ -27,7 +28,7 @@ function useChest($item_id, $user){
mysql_query('DELETE from sp_ware WHERE item='.$item_id.' and user = '.$user['id'].' LIMIT 1');
if(mysql_affected_rows() == 1){
$row = mysql_fetch_assoc(mysql_query('SELECT wert FROM sp_item where id = '.$item_id));
-
+
// Calc the treasure
$treasure = mt_rand(0,1000) * $row['wert'];
// $treasure = 0;
@@ -63,13 +64,13 @@ function useBohne($item_id, $user){
}
// So nun nutzen
mysql_query('DELETE from sp_ware WHERE item='.$item_id.' and user = '.$user['id'].' LIMIT 1');
-
+
foreach($chars as $row){
$hp = explode(',', $row['hp']);
$mp = explode(',', $row['mp']);
mysql_query('UPDATE chars SET hp=\''.$hp[1].','.$hp[1].'\', mp=\''.$mp[1].','.$mp[1].'\' WHERE id='.$row['id']);
}
-
+
displayErrorMessage('Änderungen übernommen','Item erfolgreich benutzt. Die HP und MP all deiner Chars sind wieder voll hergestellt!!','weiter... ');
}
@@ -78,14 +79,14 @@ function usePotaraReally($user, $item_id, $char1, $char2, $new_name = ''){
if($new_name === NULL || $new_name == ''){
displayErrorMessage(NULL,'Name nicht angegeben',displayHistoryBackLink());
}
-
+
$char_v_1 = getChar($char1);
$char_v_2 = getChar($char2);
-
+
if($char_v_1['name'] != $new_name && $char_v_2['name'] != $new_name){ // Der Name der Fusion darf auch der Name eines der Chars sein
$char_v_3 = mysql_Fetch_array(mysql_query('SELECT id FROM chars WHERE name=\''.$new_name.'\' LIMIT 1'));
}
-
+
if($char_v_1['besitzer'] != $user['id'] || $char_v_2['besitzer'] != $user['id']) {
displayErrorMessage(NULL,$char_v_1['name'].' oder '.$char_v_2['name'].' gehört dir nicht!!',displayHistoryBackLink());
return;
@@ -110,8 +111,8 @@ function usePotaraReally($user, $item_id, $char1, $char2, $new_name = ''){
$mp2 = explode(',', $char_v_2['mp']);
$new_hp = ($hp1[1] + $hp2[1]) ;
$new_mp = ($mp1[1] + $mp2[1]);
-
-
+
+
$sql = 'UPDATE chars SET fusion_rasse = \''.$char_v_2['rasse'].'\',' .
'fusion=\'ja\',' .
// 'name=\''.$new_name.'\',' .
@@ -120,7 +121,7 @@ function usePotaraReally($user, $item_id, $char1, $char2, $new_name = ''){
'speed=speed+'.$char_v_2['speed'].',' .
'ausdauer=ausdauer+'.$char_v_2['ausdauer'].',' .
'glueck=glueck+'.$char_v_2['glueck'].',' .
- 'training_points=training_points+'.$char_v_2['training_points'].',' .
+ 'training_points=training_points+'.$char_v_2['training_points'].',' .
'lernpunkte=lernpunkte+'.$char_v_2['lernpunkte'].',' .
'hp=\''.$new_hp.','.$new_hp.'\',' .
'mp=\''.$new_mp.','.$new_mp.'\',' .
@@ -145,7 +146,7 @@ function usePotaraReally($user, $item_id, $char1, $char2, $new_name = ''){
return;
}
mysql_query('DELETE from sp_ware WHERE item='.$item_id.' and user = '.$user['id'].' LIMIT 1'); // Potara loeschen!!
-
+
// 1. Ermitteln der Attacken die beide chars gemeinsam hatten
$qry = mysql_query('select l1.at_id,l1.benutzt + l2.benutzt as benutzt from lernen l1 inner join lernen l2' .
' on l1.at_id = l2.at_id ' .
@@ -159,11 +160,11 @@ function usePotaraReally($user, $item_id, $char1, $char2, $new_name = ''){
mysql_query('Update lernen set besitzer = '.$char1.' where besitzer = '.$char2.' and at_id NOT IN('.join($attarray,',').')');
// 4. Loeschen der Eintraege von char2
mysql_query('Delete from lernen where besitzer = '.$char2);
-
+
mysql_query('DELETE FROM chars WHERE id='.$char2.' LIMIT 1'); // Char kann erst jetzt gelöscht werden
mysql_query('Update chars set name=\''.$new_name.'\' WHERE id = '.$char1);
-
+
displayErrorMessage('Änderungen übernommen','Charakter: '.$new_name.' erfolgreich fusioniert!!','weiter... ');
return;
}
@@ -171,7 +172,7 @@ function usePotaraReally($user, $item_id, $char1, $char2, $new_name = ''){
function confirmPotaraUse($item_id, $char1, $char2, $new_name){
$char_v_1 = getChar($char1);
$char_v_2 = getChar($char2);
-
+
$weiter_an = 'Ja ' .
' | abbrechen ';
displayErrorMessage('Frage','Wollen sie echt die Chars '.$char_v_1['name'].' + '.$char_v_2['name'].' fusionieren??',$weiter_an);
@@ -217,12 +218,12 @@ function askForPotaraUse($user, $item_id){
// This function has been changed (item_id points now on item-class not on an single object)
function useItem($user,$item_id, $ab, $ak, $char1, $char2, $new_name){
$item = mysql_fetch_assoc(mysql_query('SELECT si.name, si.info, si.id, count(sw.item) as anzahl FROM sp_item si LEFT JOIN (Select item from sp_ware where user = '.$user['id'].') sw ON sw.item = si.id WHERE si.id = '.$item_id));
-
+
if($item['anzahl'] <= 0){
displayErrorMessage('Kann Item nicht nutzen', 'Du hast nicht genügend Items vom Typ '.$item['name'], displayHistoryBackLink());
return;
}
-
+
if($ab !== NULL && $item['id'] == 2){ // Bohne
useBohne($item_id,$user);
} else if($ab !== NULL && $item['id'] == 1){
@@ -234,7 +235,7 @@ function useItem($user,$item_id, $ab, $ak, $char1, $char2, $new_name){
askForPotaraUse($user, $item_id);
}
} else if($ab !== NULL && ($item['id'] == 404 || $item['id'] == 415)){ // Chests
- useChest($item_id, $user);
+ useChest($item_id, $user);
} else {
display($item_id, $item['name'],$item['info']);
}
diff --git a/ag/support.php b/ag/support.php
index a53cf9e..788f232 100644
--- a/ag/support.php
+++ b/ag/support.php
@@ -6,7 +6,8 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/donate.inc.php');
+include_once('path.inc.php'); // get the path ;)
+include_once(ROOT_PATH.'/include/donate.inc.php');
diff --git a/ag/test.php b/ag/test.php
index e811f2e..924c52c 100644
--- a/ag/test.php
+++ b/ag/test.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/user.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/clan.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/clan_fights.inc.php');
+include_once('path.inc.php'); // get the path ;)
+include_once(ROOT_PATH.'/include/user.inc.php');
+include_once(ROOT_PATH.'/include/parse.inc.php');
+include_once(ROOT_PATH.'/include/clan.inc.php');
+include_once(ROOT_PATH.'/include/clan_fights.inc.php');
$acceptTestCase = true;
@@ -54,7 +54,7 @@ if($acceptTestCase) {
if($result !== NULL) {
echo $result.' ';
}
-
+/*
if(getOpenChallengeRequestCount($clan1['id']) > 0) {
echo 'Fehler in getOpenChallengeRequestCount: Es sollte kein Fight-Request offen sein!! ';
}
@@ -103,7 +103,7 @@ if($acceptTestCase) {
$result = joinChallenge($clan_challenge_id, $leaderClan2, $chars2[0]['id'], 1);
if($result !== NULL) {
echo $result .' ';
- }
+ }*/
diff --git a/ag/training.php b/ag/training.php
index a0ee5da..a514b6d 100644
--- a/ag/training.php
+++ b/ag/training.php
@@ -6,11 +6,12 @@
*
*/
-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 ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.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');
+include_once (ROOT_PATH . '/include/designfunctions.inc.php');
// GET-Section
// Kritisch (SQL-Injections)
@@ -51,7 +52,7 @@ function displayTraining($user, $char_id) {
?>
-
+
diff --git a/ag/turnier.php b/ag/turnier.php
index ee46960..0e74dcd 100644
--- a/ag/turnier.php
+++ b/ag/turnier.php
@@ -6,13 +6,14 @@
*
*/
-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/fehlerausgabe.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/designfunctions.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/char.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/halloffame.inc.php');
-include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/auktion_functions.inc.php');
+include_once('path.inc.php'); // get the path ;)
+include_once(ROOT_PATH.'/include/config.inc.php');
+include_once(ROOT_PATH.'/include/parse.inc.php');
+include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php');
+include_once(ROOT_PATH.'/include/designfunctions.inc.php');
+include_once(ROOT_PATH.'/include/char.inc.php');
+include_once(ROOT_PATH.'/include/halloffame.inc.php');
+include_once(ROOT_PATH.'/include/auktion_functions.inc.php');
// GET-Section
// Kritisch (SQL-Injections)
@@ -26,27 +27,27 @@ function anmelden($user, $charid, $art){
// Security
if($art != 'klein' && $art != 'wochen'){
displayErrorMessage(NULL,'Es ist ein Fehler beim Anmelden aufgetreten!!','weiter... ');
- return;
+ return;
}
if(!is_numeric($charid)){ // Ist Charid wirklich eine Zahl????
displayErrorMessage(NULL,'Charid ist nicht numerisch!!','weiter... ');
return;
}
// Es wird angenommen, dass $user schon sicher ist, weil das in der config.inc.php ausgelesen wird
-
+
$gebuehr = mysql_fetch_assoc(mysql_query('SELECT gebuehr FROM turnier_gebuehr WHERE art = \''.$art.'\';'));
$gebuehr = $gebuehr['gebuehr'];
-
+
if(getUserAvailableMoney($user['id']) < $gebuehr) {
displayErrorMessage(NULL,'Nicht genug Geld um am Turnier teilzunehmen!','weiter... ');
return;
}
-
+
if($art == 'klein' && getHallOfFame('Anfängerturnier', $user['id']) >= 2) {
displayErrorMessage(NULL,'Du hast das Anfängerturnier schon zu oft gewonnen!!!','weiter... ');
}
-
-
+
+
if($art == 'klein'){
// Char darf max lvl 25 haben und keine Fusion sein und auch keine Teufelsfrucht gegessen haben
$special_clue = 'AND level<=25 AND fusion =\'nein\' AND char_type = \'\' AND frucht is null';
@@ -54,13 +55,13 @@ function anmelden($user, $charid, $art){
} else{
$anzahl = 64;
}
- // sehr speziell und deswegen nicht getChar();
+ // sehr speziell und deswegen nicht getChar();
$PRUEF = mysql_num_rows(mysql_query('SELECT id FROM chars WHERE id=\''.$charid.'\' '.$special_clue.' AND besitzer=\''.$user['id'].'\' LIMIT 1'));
if(!$PRUEF) {
displayErrorMessage(NULL,'Charakter erfüllt die Bestimungen nicht!','weiter... ');
return;
}
-
+
$sear_a = mysql_num_rows(mysql_query('SELECT id FROM turnier1 WHERE art=\''.$art.'\''));
if($sear_a >= $anzahl) {
displayErrorMessage(NULL,'Turnier voll! Es künnen maximal nur '.$anzahl.' Chars am Turnier teilnehmen','weiter... ');
@@ -81,7 +82,7 @@ function anmelden($user, $charid, $art){
displayErrorMessage('Änderungen übernommen','Charakter erfolgreich beim Turnier angemeldet','weiter... ');
return;
-}
+}
function abmelden($user_ida, $char_id, $art){
mysql_query('DELETE FROM turnier1 WHERE charakter=\''.$char_id.'\' AND besitzer=\''.$user_ida['id'].'\'');
@@ -101,13 +102,13 @@ function displayDefault($user, $art){
$fee = mysql_fetch_assoc(mysql_query('SELECT gebuehr FROM turnier_gebuehr WHERE art = \''.$art.'\';'));
} else {
displayErrorMessage(NULL,'Anzeigefehler!!','weiter... ');
- return;
+ return;
}
// sehr speziell und deswegen nicht getChar();
$sql = 'SELECT id, name, status FROM chars WHERE status=\'Frei\' AND besitzer='.$user['id'].$special_clue;
// echo $sql;
$char = mysql_query($sql);
-
+
?>