changed the way of defining the path ... now it should also be able to place the installation of ag in a different directory!
parent
a5fea4f736
commit
1b7be6d31b
@ -1,60 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* @copyright (c) 2010 animegame.eu
|
|
||||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* Legacy!
|
|
||||||
*
|
|
||||||
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/config.inc.php');
|
|
||||||
|
|
||||||
$clan = mysql_fetch_array(mysql_query("SELECT leader, id FROM clan WHERE id='$user_ida[clan]' LIMIT 1"));
|
|
||||||
|
|
||||||
$kampfs1 = mysql_query("SELECT * FROM clan_kampf WHERE clan1_id='$clan[id]' OR clan2_id='$clan[id]' ORDER BY id DESC LIMIT 3");
|
|
||||||
|
|
||||||
$kampf_row = mysql_num_rows(mysql_query("SELECT id FROM clan_kampf WHERE clan1_id='$clan[id]' OR clan2_id='$clan[id]' ORDER BY id DESC LIMIT 1"));
|
|
||||||
|
|
||||||
if(!$kampf_row) {
|
|
||||||
echo "Sie haben keine Kämpfe offen.";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<body bgcolor=#202020>";
|
|
||||||
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');
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
?>
|
|
@ -1,191 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* @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/designfunctions.inc.php');
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/char.inc.php');
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/fehlerausgabe.inc.php');
|
|
||||||
?>
|
|
||||||
|
|
||||||
<body bgcolor="#202020">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$pl = 0;
|
|
||||||
$clan1 = 0;
|
|
||||||
$clan2 = 0;
|
|
||||||
$pluto = -1;
|
|
||||||
$kampf9 = mysql_Fetch_array(mysql_query("SELECT char_set, dauer, char1, char2, x_satz FROM clan_kampf WHERE db_satz='$char_id' LIMIT 1"));
|
|
||||||
$c_a1 = explode(",", $kampf9[char_set]);
|
|
||||||
|
|
||||||
if ($kampf9['dauer'] > 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 "<p align=center>Clan Sieger: $clan_sieger";
|
|
||||||
*/
|
|
||||||
?>
|
|
@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* Created on 24.03.2009
|
|
||||||
*
|
|
||||||
* @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/designfunctions.inc.php');
|
|
||||||
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/fehlerausgabe.inc.php');
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/char.inc.php');
|
|
||||||
$id = 3;
|
|
||||||
$user = $user_ida;
|
|
||||||
$chars = getCharsOfUser($user_ida['id']);
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
<form>
|
|
||||||
<select id = "input" name="menu">
|
|
||||||
<option value ="-1">Charakter auswählen...</option>
|
|
||||||
<?php
|
|
||||||
foreach($chars as $row)
|
|
||||||
{
|
|
||||||
echo "<option value='$row[id]'>$row[name]>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</form>
|
|
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
//define('ROOT_PATH', ROOT_PATH.'ag
|
||||||
|
|
||||||
|
// okay and now define the url ;)
|
||||||
|
|
||||||
|
if(!defined('ROOT_PATH')) {
|
||||||
|
$actual_path = $_SERVER['SCRIPT_FILENAME'];
|
||||||
|
$url_path = $_SERVER['SCRIPT_NAME' ];
|
||||||
|
//s echo $actual_path .'<br>';
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue