From 2835c5ec336c20eb99ca74d53d1936ea50ca7bb0 Mon Sep 17 00:00:00 2001 From: hecht Date: Tue, 1 Sep 2015 21:06:50 +0000 Subject: [PATCH] added some big and some small changes --- ag/ag_popupchat.php | 3 +- ag/arena.php | 4 +- ag/auktion.php | 2 +- ag/char_overview.php | 4 - ag/char_profil.php | 6 +- ag/clan/c_markt.php | 4 +- ag/clan/c_ware.php | 4 +- ag/clan/spende.php | 3 +- ag/dragonballs.php | 3 +- ag/gm/include/attacken.inc.php | 31 ++++--- ag/gm/include/info.inc.php | 14 ++-- ag/gm/include/monster.inc.php | 4 +- ag/gm/log.php | 15 ++-- ag/inclu/user-controll.php | 6 +- ag/include/abholcodes.inc.php | 3 +- ag/include/auktion_functions.inc.php | 2 +- ag/include/bann.inc.php | 2 +- ag/include/char.inc.php | 6 -- ag/include/config.inc.php | 25 ------ ag/include/config/properties.ini.ex.php | 49 +++++++++++ ag/include/config/properties.ini.php | 50 +++++++++++ ag/include/config/reset.sh | 1 + ag/include/exp.inc.php | 3 - ag/include/faq.inc.php | 8 +- ag/include/img.inc.php | 9 +- ag/include/kampf/andere_technik.php | 4 +- ag/include/kampf/atk_wert.php | 11 ++- ag/include/kampf/frucht.php | 2 +- ag/include/kampf/hpmp.php | 5 +- ag/include/kampf/kaioken.php | 6 +- ag/include/kampf/kampf_rechnung.php | 14 ++-- ag/include/kampf/lose2.php | 5 +- ag/include/kampf/tausch.php | 13 +-- ag/include/kampf/tausch2.php | 5 +- ag/include/kampf_anzeige.inc.php | 3 +- ag/include/kampf_wrapper.inc.php | 8 +- ag/include/messagefunctions.inc.php | 5 +- ag/include/pollfunctions.inc.php | 6 +- ag/include/random.inc.php | 19 +++++ ag/include/schatz.inc.php | 8 +- ag/include/schnell_start.inc.php | 14 ++-- ag/include/user.inc.php | 2 +- ag/index.php | 6 -- ag/info.php | 26 +++--- ag/info/attacken.php | 2 +- ag/info/items.php | 24 +++--- ag/item.php | 4 +- ag/kampf2.php | 105 +++++++++++------------ ag/kampf4.php | 14 ++-- ag/kampf_clan.php | 107 ++++++++++-------------- ag/last_fight.php | 8 +- ag/last_fight1.php | 42 +++++----- ag/last_fight2.php | 42 +++++----- ag/last_fight3.php | 40 ++++----- ag/lernpunkte.php | 12 +-- ag/liga1.php | 11 ++- ag/liga_kampf_anzeige.php | 48 +++++------ ag/markt.php | 28 +++---- ag/nachricht.php | 51 +++++------ ag/news.php | 2 +- ag/pw.php | 3 +- ag/runde.php | 12 +-- ag/sp_item.php | 7 +- ag/turnier2.php | 2 +- ag/wanted.php | 4 +- ag/wanted_kampf_anzeige.php | 48 +++++------ 66 files changed, 544 insertions(+), 495 deletions(-) create mode 100644 ag/include/config/properties.ini.ex.php create mode 100644 ag/include/config/properties.ini.php create mode 100644 ag/include/config/reset.sh create mode 100644 ag/include/random.inc.php diff --git a/ag/ag_popupchat.php b/ag/ag_popupchat.php index ec05226..a25b9c0 100644 --- a/ag/ag_popupchat.php +++ b/ag/ag_popupchat.php @@ -12,6 +12,7 @@ include_once('path.inc.php'); // get the path ;) include_once (ROOT_PATH . '/include/config.inc.php'); include_once (ROOT_PATH . '/include/messagefunctions.inc.php'); include_once (ROOT_PATH . '/include/defines.inc.php'); +include_once(ROOT_PATH.'/include/random.inc.php'); defineIfNotDefined('AG_CHAT_ROWS', 25); defineIfNotDefined('AG_CHAT_ORDER', 'ASC'); @@ -43,7 +44,7 @@ if(isset($user_ida['nickname'])){ } $usr = mysql_fetch_assoc(mysql_query('Select * from anon_chatter where ip = \''.$_SESSION['anon_ip'].'\'')); while(!$usr){ - mysql_query('Insert into anon_chatter(ip, anon_id) values(\''.$_SESSION['anon_ip'].'\', '.mt_rand(90000,99999).')'); + mysql_query('Insert into anon_chatter(ip, anon_id) values(\''.$_SESSION['anon_ip'].'\', '.mt_random_wrapper(90000,99999).')'); $usr = mysql_fetch_assoc(mysql_query('Select * from anon_chatter where ip = \''.$_SESSION['anon_ip'].'\'')); } $user_ida['id'] = $usr['anon_id']; diff --git a/ag/arena.php b/ag/arena.php index eeb610f..a473609 100644 --- a/ag/arena.php +++ b/ag/arena.php @@ -313,9 +313,9 @@ function renovate($user, $arena, $vermoegen){ } -$arena = getArena($user_ida[id]); +$arena = getArena($user_ida['id']); -$auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = '.$user_ida[id].' GROUP BY bieter')); +$auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = '.$user_ida['id'].' GROUP BY bieter')); $auktionensumme = $auktionensumme['summe']; $vermoegen = $user['geld'] - $auktionensumme; $unterhalt = calculateUnterhaltsKosten($arena); diff --git a/ag/auktion.php b/ag/auktion.php index 8efd347..a2daf94 100644 --- a/ag/auktion.php +++ b/ag/auktion.php @@ -384,7 +384,7 @@ function zieheAuktionZurueck($userid,$auktionsid,$pay){ } -if(isset($user_ida[id])){ +if(isset($user_ida['id'])){ // Abfrage der uebergebenen Aktionen if($action == 1){ // Bieten für eine Auktion stelleBietenMaskeDar($user_ida['id'],$auktionsid, $gebot); diff --git a/ag/char_overview.php b/ag/char_overview.php index b6e1873..30b91ef 100644 --- a/ag/char_overview.php +++ b/ag/char_overview.php @@ -24,10 +24,6 @@ include_once(ROOT_PATH.'/include/char.inc.php'); $chars = getCharsOfUser($user_ida['id']); $char_zahl = 0; 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"){ $fusi = "
Fusionsrasse: ".$my_charz['fusion_rasse']; diff --git a/ag/char_profil.php b/ag/char_profil.php index 858c410..92a5735 100644 --- a/ag/char_profil.php +++ b/ag/char_profil.php @@ -92,7 +92,7 @@ function stelledar($char_id,$user_ida,$name) { Fusion Rasse @@ -197,7 +197,7 @@ function stelledar($char_id,$user_ida,$name) { Bild -  '; ?> +  '; ?> @@ -377,7 +377,7 @@ function eintragen($char_id,$name,$user_ida) { $qry = 'UPDATE chars SET kampf_item=\''.$helm_e.','.$rustung_e.','.$schild_e.','.$schwert_e.','.$schuhe_e.'\', rustung =\''.$rustung.'\', '. 'attacken=\''.implode(',', $attset_nf).'\', '. 'attacken2=\''.implode(',', $attset_nf).'\', '. - 'bild=\''.$bild11.'\' WHERE id='.$char[id].' LIMIT 1'; + 'bild=\''.$bild11.'\' WHERE id='.$char['id'].' LIMIT 1'; mysql_query($qry); //neues updaten von Attacken diff --git a/ag/clan/c_markt.php b/ag/clan/c_markt.php index ee8044a..56f040f 100644 --- a/ag/clan/c_markt.php +++ b/ag/clan/c_markt.php @@ -23,7 +23,7 @@ $charm = $_GET['charm']; if($charm == 3) { $item_info = mysql_fetch_assoc(mysql_query("SELECT * FROM clan_item WHERE id='$item_id' LIMIT 1")); - $user = getClan($user_ida['clan']); // mysql_Fetch_array(mysql_query("SELECT leader, co_leader, geld, id FROM clan WHERE id='$user_ida[clan]'")); + $user = getClan($user_ida['clan']); if($user['leader'] != $user_ida['id'] AND $user['co_leader'] != $user_ida['id']) { displayErrorMessage(NULL,'Nur der Leader und der Co-Leader kann Clanitems kaufen!', displayHistoryBackLink()); @@ -44,7 +44,7 @@ if($charm == 3) exit; } - $new_geld = $user[geld] - $item_info[preis]; + $new_geld = $user['geld'] - $item_info['preis']; mysql_query("UPDATE clan_item SET anzahl=anzahl-1 WHERE id=".$item_info[id]." LIMIT 1"); mysql_query("UPDATE clan SET geld='$new_geld' WHERE id=".$user[id]." LIMIT 1"); diff --git a/ag/clan/c_ware.php b/ag/clan/c_ware.php index 15e0fe8..7b1a19f 100644 --- a/ag/clan/c_ware.php +++ b/ag/clan/c_ware.php @@ -24,7 +24,7 @@ if($charm == 1) { foreach($chars as $char) { $c_ware = validateUnsignedInteger($_GET['c_ware_'.$char['id']], null); - db_query('UPDATE chars SET clan_train='.$c_ware.' WHERE id='.$char['id'].' AND besitzer='.$user_ida[id]); + db_query('UPDATE chars SET clan_train='.$c_ware.' WHERE id='.$char['id'].' AND besitzer='.$user_ida['id']); } } @@ -59,7 +59,7 @@ if(!isUserOwnerOf($user_ida['id'], $char_id)){ ?> - Raum für + Raum für if($row['Frucht'] === NULL || $row['Frucht'] == 0){ echo ''; } else { @@ -454,38 +453,38 @@ function editAttack($attackname, $attackid, $Frucht, $starke, $verteidigung, $sp '."\n"; echo "\t".''."\n"; - echo "\t".''."\n"; + echo "\t".''."\n"; echo "\t".''."\n"; - switch ($_REQUEST['action']) { + switch ($request['action']) { case ACTION_EDIT: - if($_REQUEST['task'] == TASK_EDIT) { - editAttackentyp($_REQUEST['attid'], $_REQUEST['data']); - displayAttackenTypenInfo(ACTION_EDIT, TASK_EDIT, $_REQUEST['attid']); + if($request['task'] == TASK_EDIT) { + editAttackentyp($request['attid'], $request['data']); + displayAttackenTypenInfo(ACTION_EDIT, TASK_EDIT, $request['attid']); } else { - displayAttackenTypenInfo(ACTION_EDIT, TASK_EDIT, $_REQUEST['attid']); + displayAttackenTypenInfo(ACTION_EDIT, TASK_EDIT, $request['attid']); } break; case ACTION_CREATE: echo "\t".''."\n"; - if($_REQUEST['task'] == TASK_CREATE) { - createAttackentyp($_REQUEST['data']); + if($request['task'] == TASK_CREATE) { + createAttackentyp($request['data']); } else { - displayAttackenTypenInfo(ACTION_CREATE, TASK_CREATE, $_REQUEST['attid']); + displayAttackenTypenInfo(ACTION_CREATE, TASK_CREATE, $request['attid']); } break; case 'delete': - if($_REQUEST['task'] == 'dodelete') { - deleteAttackentyp($_REQUEST['attid']); + if($request['task'] == 'dodelete') { + deleteAttackentyp($request['attid']); } else { - displayDeleteAttackentyp($_REQUEST['attid']); + displayDeleteAttackentyp($request['attid']); } break; default: - displayAttackenTypenOverview($_REQUEST['page']); + displayAttackenTypenOverview($request['page']); } echo "\t".''."\n"; echo "\t".'
Zum Hauptmenu
'."\n"; diff --git a/ag/gm/include/info.inc.php b/ag/gm/include/info.inc.php index a782139..763540d 100644 --- a/ag/gm/include/info.inc.php +++ b/ag/gm/include/info.inc.php @@ -337,7 +337,7 @@ function displayPolls($action,$openumfrage,$closeumfrage,$thema,$optionen,$text, '.$result[thema].''; + echo ''; } ?> @@ -353,7 +353,7 @@ function displayPolls($action,$openumfrage,$closeumfrage,$thema,$optionen,$text, 0'); while($result = mysql_fetch_assoc($qry)){ - echo ''; + echo ''; } ?> @@ -388,17 +388,17 @@ function displayPolls($action,$openumfrage,$closeumfrage,$thema,$optionen,$text, $result = mysql_fetch_assoc(mysql_query('SELECT * FROM poll WHERE pollid='.$pollid)); $qry = mysql_query('SELECT * FROM poll_options WHERE pollid='.$pollid); while($opts = mysql_fetch_assoc($qry)){ - $options[$opts[polloptionid]] = $opts[text]; + $options[$opts['polloptionid']] = $opts['text']; } ?>
- + - + @@ -477,7 +477,7 @@ function displayPolls($action,$openumfrage,$closeumfrage,$thema,$optionen,$text, mysql_query('INSERT INTO poll_options(pollid, polloptionid, text) values('.$pollid['pollid'].','.$i.',\''.$optionen[$i].'\')'); } } - displayPolls('display',NULL, NULL,NULL,NULL,NULL,$pollid[pollid]); + displayPolls('display',NULL, NULL,NULL,NULL,NULL,$pollid['pollid']); } else if($action == 'update'){ mysql_query('UPDATE poll set thema =\''.$thema.'\', text =\''.$text.'\' WHERE pollid ='.$pollid); for($i=0;$i<5;$i++){ diff --git a/ag/gm/include/monster.inc.php b/ag/gm/include/monster.inc.php index 5afb119..a8c5b0b 100644 --- a/ag/gm/include/monster.inc.php +++ b/ag/gm/include/monster.inc.php @@ -29,8 +29,8 @@ function displayQuestNPC($action, $name, $starke, $speed, $verteidigung, $ausdau ?> - - + + '.$resultstring; + $resultstring = $row['d'].'.'.$row['mon'].' '.$h.':'.$m.' '.$row['user'].': '.$row['nachricht'].'
'.$resultstring; } return $resultstring; } echo getChatMessages(); -//$test = "Dies ist eine [b]beliebige[/b] Nachricht mit einem auktionslink [a]testlink.html[/a]"; -//echo decodeMessage($test).'
'; - -//$test = 'Test'; -//echo encodeMessage($test).'
'; - ?> diff --git a/ag/inclu/user-controll.php b/ag/inclu/user-controll.php index f2e2236..21e8fcc 100644 --- a/ag/inclu/user-controll.php +++ b/ag/inclu/user-controll.php @@ -104,11 +104,11 @@ if ($name AND $passwort) { Halle der Helden
Letzten 20 Kämpfe
"; - $auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = ' . $user_ida[id] . ' GROUP BY bieter')); - $auktionensumme = $auktionensumme[summe]; + $auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = ' . $user_ida['id'] . ' GROUP BY bieter')); + $auktionensumme = $auktionensumme['summe']; if ($auktionensumme == 0) { - $geldstring = $user_info_test2[geld]; + $geldstring = $user_info_test2['geld']; } else { $geldstring = displayMoney($user_info_test['geld'] - $auktionensumme) . ' (' . $user_info_test2['geld'] . ')'; } diff --git a/ag/include/abholcodes.inc.php b/ag/include/abholcodes.inc.php index 8fea641..0456b59 100644 --- a/ag/include/abholcodes.inc.php +++ b/ag/include/abholcodes.inc.php @@ -6,9 +6,10 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ +include_once(ROOT_PATH.'/include/random.inc.php'); function createAbholcode($charid){ - $code = mt_rand(0, 44*$charid); + $code = mt_random_wrapper(0, 44*$charid); $code = md5($code.time()); mysql_query('DELETE from char_abholcodes where charid = '.$charid); mysql_query('INSERT INTO char_abholcodes(charid, code) values('.$charid.', \''.$code.'\')'); diff --git a/ag/include/auktion_functions.inc.php b/ag/include/auktion_functions.inc.php index f7fc3d2..cbe2d6c 100644 --- a/ag/include/auktion_functions.inc.php +++ b/ag/include/auktion_functions.inc.php @@ -142,7 +142,7 @@ function getItemOptions($userid,$preselected){ $qry = mysql_query($query); // Damit waeren alle noetigen Datenbankaufrufe erledigt! while($row = mysql_fetch_assoc($qry)){ - if($row[id] == $preselected){ + if($row['id'] == $preselected){ $result[$index++] = ''; } else{ diff --git a/ag/include/bann.inc.php b/ag/include/bann.inc.php index 15d9eff..ae6466b 100644 --- a/ag/include/bann.inc.php +++ b/ag/include/bann.inc.php @@ -7,7 +7,7 @@ */ function isSpammer($id){ $result = mysql_fetch_assoc(mysql_query('SELECT TIMESTAMPDIFF(Second,max(bann_until),now()) as anzahl from spammer WHERE userid='.$id.' group by userid')); - if($result[anzahl] < 0){ + if($result['anzahl'] < 0){ return true; } else{ return false; diff --git a/ag/include/char.inc.php b/ag/include/char.inc.php index c5d103d..86e65d0 100644 --- a/ag/include/char.inc.php +++ b/ag/include/char.inc.php @@ -250,9 +250,6 @@ function getPowerLevel($charid, $buffer_enabled = true){ return null; } // Uncomment for hp/mp in PL - // $hp = explode(",", $char[hp]); - // $mp = explode(",", $char[mp]); - // return $char['starke']+$char['verteidigung']+$char['speed']+$char['ausdauer']+$char['glueck']+ $hp[1]/10 + $mp[1]/5; return $char['starke']+$char['verteidigung']+$char['speed']+$char['ausdauer']+$char['glueck']; } @@ -265,9 +262,6 @@ function getPowerLevelWithBuffs($charid, $buffer_enabled = true){ $char_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 (' . $char['kampf_item'] . ')')); } // Uncomment for hp/mp in PL - // $hp = explode(",", $char[hp]); - // $mp = explode(",", $char[mp]); - // return $char_buffs['starke']+$char_buffs['verteidigung']+$char_buffs['speed']+$char_buffs['ausdauer']+$char_buffs['glueck'] + $char_buffs['hp']/10 + $char_buffs['mp']/5 +$char['starke']+$char['verteidigung']+$char['speed']+$char['ausdauer']+$char['glueck'] + $hp[1]/10 + $mp[1]/5; return $char_buffs['starke']+$char_buffs['verteidigung']+$char_buffs['speed']+$char_buffs['ausdauer']+$char_buffs['glueck']+$char['starke']+$char['verteidigung']+$char['speed']+$char['ausdauer']+$char['glueck']; } diff --git a/ag/include/config.inc.php b/ag/include/config.inc.php index bf0c4c7..3caa90c 100644 --- a/ag/include/config.inc.php +++ b/ag/include/config.inc.php @@ -59,38 +59,13 @@ if(!checkCookiePassword($name, $passwort)){ } $banned_accs = mysql_num_rows(mysql_query("SELECT id FROM user WHERE ip!='' AND ip='$user_ida[ip]' AND id!='$user_ida[id]' LIMIT 2")); -#$clan_nachricht = mysql_fetch_array(mysql_query("SELECT i.id FROM clan_k_list i LEFT JOIN clan c ON(c.id=i.an) WHERE i.anzeige='1' AND (c.leader='$user_ida[id]' OR c.co_leader='$user_ida[id]') AND i.an='$user_ida[clan]' LIMIT 1")); if ($user_ida['id'] != null) { $as = 'profil'; } - $pic_g31 = 75; ///////////Bild Groesse $GLOBALS['user_array'] = $user_ida; -#if ($clan_nachricht['id']) { -# -# print " "; -# mysql_query("UPDATE clan_k_list SET anzeige='0' WHERE id='$clan_nachricht[id]' LIMIT 1"); -#} - -/*if($user_ida[post]) { - $nachricht = mysql_fetch_assoc(mysql_query("SELECT count(id) as anzahl FROM nachricht WHERE aktiv='1' AND besitzer='$user_ida[id]' LIMIT 1")); - - if($nachricht['anzahl'] > 0) { - print ' '; - mysql_query("UPDATE nachricht SET aktiv='0' WHERE besitzer='$user_ida[id]'"); - } -} -*/ ?> diff --git a/ag/include/config/properties.ini.ex.php b/ag/include/config/properties.ini.ex.php new file mode 100644 index 0000000..a032afc --- /dev/null +++ b/ag/include/config/properties.ini.ex.php @@ -0,0 +1,49 @@ + + +######################################### +# Database api # +######################################### +# connections = "conn1, conn2, conn3" # +######################################### +[ Database ] +connections = "default" + +######################################### +# Database for connection default # +######################################### +# class = "\my\namespace\ClassName" # +# ... the rest is specific # +######################################### +[ Database.default ] +class = "\io\db\MySQLDatabase" +host = "localhost" +user = "user" +password = "pass" +schema = "schema" +prefix = "" + +######################################### +# Logging api # +######################################### +# connections = "appender1, appender2 # +######################################### +[ Logging ] +appenders = "appender1, appender2" + +[ Logging.appender1 ] +class = "\io\log\FileAppender" +level = "INFO" +file.output = "/var/log/logging.log" +file.size = "5M" + +[ Logging.appender1 ] +class = "\io\log\DatabaseAppender" +level = "INFO" +db.table = "logging" +db.connection = "default" + +# there may be more to come + diff --git a/ag/include/config/properties.ini.php b/ag/include/config/properties.ini.php new file mode 100644 index 0000000..bec695f --- /dev/null +++ b/ag/include/config/properties.ini.php @@ -0,0 +1,50 @@ + + +######################################### +# Database api # +######################################### +# connections = "conn1, conn2, conn3" # +######################################### +[ Database ] +connections = "default" + +######################################### +# Database for connection default # +######################################### +# class = "\my\namespace\ClassName" # +# ... the rest is specific # +######################################### +[ Database.default ] +class = "\io\db\MySQLDatabase" +host = "localhost" +user = "animegame" +password = "salut65++" +schema = "test_ag" +prefix = "" + +######################################### +# Logging api # +######################################### +# connections = "appender1, appender2 # +######################################### +[ Logging ] +appenders = "appender1, appender2" + +[ Logging.appender1 ] +class = "\io\log\FileAppender" +level = "INFO" +file.output = "/var/log/logging.log" +file.size = "5M" + +[ Logging.appender1 ] +class = "\io\log\DatabaseAppender" +level = "INFO" +db.table = "logging" +db.connection = "default" + +# there may be more to come + diff --git a/ag/include/config/reset.sh b/ag/include/config/reset.sh new file mode 100644 index 0000000..7cf0e4b --- /dev/null +++ b/ag/include/config/reset.sh @@ -0,0 +1 @@ +mv db_backup.ini.php db.ini.php diff --git a/ag/include/exp.inc.php b/ag/include/exp.inc.php index c2cf818..d65561f 100644 --- a/ag/include/exp.inc.php +++ b/ag/include/exp.inc.php @@ -179,8 +179,6 @@ function addExpToChar($char_id, $n_exp){ } function addExpToArena($user_id, $n_exp){ -// $sql = 'SELECT * from arena where besitzer = '.$user_id; -// $qry = mysql_query($sql); $arena = getArena($user_id); $arena_exp = explode(',', $arena['exp']); $arena_exp[0] += $n_exp; @@ -194,7 +192,6 @@ function addExpToArena($user_id, $n_exp){ $arena_exp[1] = calculateRequiredExpArena($arena['level']); } if($lvls > 0){ -// mysql_query("UPDATE arena SET exp='$ne_exp1,$new_exp', level='$level1', skill='$skill_points' WHERE besitzer='$user_ida[id]' LIMIT 1"); echo ''; mysql_query('Update arena set exp=\''.$arena_exp[0].','.$arena_exp[1].'\', level='.$arena['level'].', skill=skill+'.$lvls.' WHERE besitzer='.$user_id); } else{ diff --git a/ag/include/faq.inc.php b/ag/include/faq.inc.php index 9065f01..373f68f 100644 --- a/ag/include/faq.inc.php +++ b/ag/include/faq.inc.php @@ -37,9 +37,9 @@ function getTableOfContentsRec($number,$values,$pre,$app){ $string =''; if($values['node']['header'] != null){ if($values['node']['parent'] == 0){ - $string = preg_replace(array('/###ID###/','/###ROW###/'),array($values['node'][id], 'tr> +   @@ -160,7 +160,7 @@ function display2($user_id, $userage, $user_ida){ +   - +
Thema
- +
ändernlöschenändernlöschen
 
 
  ',$values['node']['body']).$app2."\n"; + $string .= preg_replace('/###ID###/',$values['node']['id'],$pre2).preg_replace('#\n#','
',$values['node']['body']).$app2."\n"; } $keys = array_keys($values); $i = 1; diff --git a/ag/include/img.inc.php b/ag/include/img.inc.php index 78837ea..2ef4662 100644 --- a/ag/include/img.inc.php +++ b/ag/include/img.inc.php @@ -10,6 +10,7 @@ include_once(ROOT_PATH.'/include/config.inc.php'); include_once(ROOT_PATH.'/include/cheater.inc.php'); include_once(ROOT_PATH.'/include/char.inc.php'); +include_once(ROOT_PATH.'/include/random.inc.php'); function hasToAuthenticate($user){ return $user['code'] <= 0; @@ -26,7 +27,7 @@ function hasDoneAction($user, $count = 1){ function resetUserCounter($user){ $char_count = count(getCharsOfUser($user['id'])); // pro Char werden dem User 6-8 Aktionen zugestanden - mysql_query('Update user set code = '.($char_count*mt_rand(6,8)).' where id = '.$user['id']); + mysql_query('Update user set code = '.($char_count*mt_random_wrapper(6,8)).' where id = '.$user['id']); } function checkImageCode($id, $compr_phrase, $user){ @@ -56,8 +57,8 @@ function checkImageCode($id, $compr_phrase, $user){ function createImage($id, $user) { $variants = array ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','p','q','r','s','t','u','v','w','x','y','z', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); // Variable Länge - for ($i = 0, $n = mt_rand(4, 6); $i < $n; $i++) { - $char = $variants[mt_rand(0, count($variants)-1)]; + for ($i = 0, $n = mt_random_wrapper(4, 6); $i < $n; $i++) { + $char = $variants[mt_random_wrapper(0, count($variants)-1)]; $string .= $char . ' '; $comp_str .= $char; } @@ -72,7 +73,7 @@ function createImage($id, $user) { } function generateImageID(){ - return $id = md5((mt_rand() * time())); + return $id = md5((mt_random_wrapper() * time())); } function displayImage($id, $user) { diff --git a/ag/include/kampf/andere_technik.php b/ag/include/kampf/andere_technik.php index 6e96517..32bf6ed 100644 --- a/ag/include/kampf/andere_technik.php +++ b/ag/include/kampf/andere_technik.php @@ -41,7 +41,7 @@ if($k_attacke1_2[$x]) { if($new_tech1 == 1) { $technick1 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke1_2[$x]' LIMIT 10")); -$prozent_technik1 = (20*$technick1[aktiv])-20; +$prozent_technik1 = (20*$technick1['aktiv'])-20; $technick1 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick1[at_id]' LIMIT 10")); } @@ -81,7 +81,7 @@ if($k_attacke2_2[$x]) { if($new_tech2 == 1) { $technick2 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke2_2[$x]' LIMIT 10")); -$prozent_technik2 = (20*$technick2[aktiv])-20; +$prozent_technik2 = (20*$technick2['aktiv'])-20; $technick2 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick2[at_id]' LIMIT 10")); } diff --git a/ag/include/kampf/atk_wert.php b/ag/include/kampf/atk_wert.php index 07c6d42..d183414 100644 --- a/ag/include/kampf/atk_wert.php +++ b/ag/include/kampf/atk_wert.php @@ -8,6 +8,9 @@ */ #####################################KAMPF SYSTEM +include_once(ROOT_PATH.'/include/random.inc.php'); + + // $zufall_pl1 = Attacke p1 // $zufall_pl2 = Attacke p2 @@ -17,11 +20,11 @@ // A1 (Attacke Spieler1) = 0.7 * S1 / SA + 0.3 * L1 / LA // P2 (Parade Spieler2) = 0.6 * S2 / SA + 0.4 * L2 / LA -$lucka1 = mt_rand(0,$k_glueck[0]); -$luckp1 = mt_rand(0,$k_glueck[0]); +$lucka1 = mt_random_wrapper(0,$k_glueck[0]); +$luckp1 = mt_random_wrapper(0,$k_glueck[0]); -$lucka2 = mt_rand(0,$k_glueck[1]); -$luckp2 = mt_rand(0,$k_glueck[1]); +$lucka2 = mt_random_wrapper(0,$k_glueck[1]); +$luckp2 = mt_random_wrapper(0,$k_glueck[1]); $speedsum = $speeds_char1 + $speeds_char2; $lucksum1 = $lucka1 + $luckp2; diff --git a/ag/include/kampf/frucht.php b/ag/include/kampf/frucht.php index cacb997..f26aa17 100644 --- a/ag/include/kampf/frucht.php +++ b/ag/include/kampf/frucht.php @@ -42,7 +42,7 @@ if($technick1['type'] == 'frucht') { $k_ausdauer[1] = $k_ausdauer[1] + $frucht_stats2['ausdauer']; $k_starke[1] = $k_starke[1] + ($frucht_stats2['starke']*$technick2['starke']); $k_speed[1] = $k_speed[1] + ($frucht_stats2['speed']*$technick2['speed']); - $k_ver[1] = $k_ver[1] + ($frucht_stats2[ver]*$technick2['verteidigung']); + $k_ver[1] = $k_ver[1] + ($frucht_stats2['ver']*$technick2['verteidigung']); $k_glueck[1] = $k_glueck[1] + $frucht_stats2['glueck']; $aktion_AV2[$x] = 'nein'; }} diff --git a/ag/include/kampf/hpmp.php b/ag/include/kampf/hpmp.php index 94d4c42..f0e90f5 100644 --- a/ag/include/kampf/hpmp.php +++ b/ag/include/kampf/hpmp.php @@ -9,12 +9,10 @@ ####################KAMPF HPMP SPIELER 1 if($technick1['type'] == "hpmp") { - //$k_hp[0] = $k_hp[0] + (($k_hp1[1] / 100) * $technick1[hp]); $tmp_hp[0] = (($k_hp1[1] / 100) * $technick1['hp']); $tmp_hp[3] = true; $k_mp[0] = $k_mp[0] + (($k_mp1[1] / 100) * $technick1['mp']); - //if($k_hp1[1] < $k_hp[0]) { $k_hp[0] = $k_hp1[1]; } if($k_mp1[1] < $k_mp[0]) { $k_mp[0] = $k_mp1[1]; } @@ -28,12 +26,11 @@ if($technick1['type'] == "hpmp") { ####################KAMPF HPMP SPIELER 2 if($technick2['type'] == "hpmp") { - //$k_hp[1] = $k_hp[1] + (($k_hp2[1] / 100) * $technick2[hp]); + $tmp_hp[1] = (($k_hp2[1] / 100) * $technick2['hp']); $tmp_hp[2] = true; $k_mp[1] = $k_mp[1] + (($k_mp2[1] / 100) * $technick2['mp']); - //if($k_hp2[1] < $k_hp[1]) { $k_hp[1] = $k_hp2[1]; } if($k_mp2[1] < $k_mp[1]) { $k_mp[1] = $k_mp2[1]; } diff --git a/ag/include/kampf/kaioken.php b/ag/include/kampf/kaioken.php index bb72240..15cdede 100644 --- a/ag/include/kampf/kaioken.php +++ b/ag/include/kampf/kaioken.php @@ -19,9 +19,9 @@ if($technick1['type'] == 'kaioken') { } else { $schaden_1 = 'Kaioken'; - $k_starke[0] = $k_starke[0] + $technick1[starke]; - $k_speed[0] = $k_speed[0] + $technick1[speed]; - $k_ver[0] = $k_ver[0] + $technick1[verteidigung]; + $k_starke[0] = $k_starke[0] + $technick1['starke']; + $k_speed[0] = $k_speed[0] + $technick1['speed']; + $k_ver[0] = $k_ver[0] + $technick1['verteidigung']; $aktion_AV1[$x] = 'nein'; } } diff --git a/ag/include/kampf/kampf_rechnung.php b/ag/include/kampf/kampf_rechnung.php index ec7cb41..b9e8ccb 100644 --- a/ag/include/kampf/kampf_rechnung.php +++ b/ag/include/kampf/kampf_rechnung.php @@ -7,6 +7,8 @@ * */ +include_once(ROOT_PATH.'/include/random.inc.php'); + if(!$aktion_AV1[$x]){ if($zufall_pl1 > $play2_ausweich) { $alt_hp = $k_hp[1]; @@ -19,7 +21,7 @@ if(!$aktion_AV1[$x]){ if($charsa1_4_def < 1) { $charsa1_4_def = 1; } - $charsa1_def = mt_rand($charsa1_4_def,$charsa1_def); + $charsa1_def = mt_random_wrapper($charsa1_4_def,$charsa1_def); $charsa1_str = $k_starke[0]*1.2+$technick1['starke']; $charsa1_4_str = ($k_starke[0]*1.2+$technick1['starke'])+1; if($charsa1_str <= 2) { @@ -28,8 +30,8 @@ if(!$aktion_AV1[$x]){ if($charsa1_4_str < 1) { $charsa1_4_str = 1; } - $charsa1_str = mt_rand($charsa1_4_str,$charsa1_str); - $k_hp[1] = round(($k_hp[1] + $charsa1_def - $charsa1_str + mt_rand(1,20))); + $charsa1_str = mt_random_wrapper($charsa1_4_str, $charsa1_str); + $k_hp[1] = round(($k_hp[1] + $charsa1_def - $charsa1_str + mt_random_wrapper(1,20))); $schaden_1 = $alt_hp - $k_hp[1]; if($alt_hp < $k_hp[1]) { $k_hp[1] = $alt_hp; @@ -56,7 +58,7 @@ if(!$aktion_AV2[$x]) { $charsa2_4_def = 1; } - $charsa2_def = mt_rand($charsa2_4_def,$charsa2_def); + $charsa2_def = mt_random_wrapper($charsa2_4_def,$charsa2_def); $charsa2_str = $k_starke[1]*1.2+$technick2['starke']; $charsa2_4_str = ($k_starke[1] *1.2 +$technick2['starke']) +1; @@ -67,9 +69,9 @@ if(!$aktion_AV2[$x]) { $charsa2_4_str = 1; } - $charsa2_str = mt_rand($charsa2_4_str,$charsa2_str); + $charsa2_str = mt_random_wrapper($charsa2_4_str,$charsa2_str); - $k_hp[0] = round(($k_hp[0] + $charsa2_def - $charsa2_str + mt_rand(1,20))); + $k_hp[0] = round(($k_hp[0] + $charsa2_def - $charsa2_str + mt_random_wrapper(1,20))); $schaden_2 = $alt_hp - $k_hp[0]; if($alt_hp < $k_hp[0]) { diff --git a/ag/include/kampf/lose2.php b/ag/include/kampf/lose2.php index e4ea6aa..66c2c2a 100644 --- a/ag/include/kampf/lose2.php +++ b/ag/include/kampf/lose2.php @@ -5,6 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ +include_once(ROOT_PATH.'/include/random.inc.php'); ####################KAIOKEN-LOSE SPIELER 1 @@ -14,7 +15,7 @@ if($technick1['type'] == 'lose2') { $schaden_1 = 'Schwächen fehlgeschlagen'; $k_mp[0] = 0; } else { - if($technick1['starke'] >= mt_rand(1,100)) { + if($technick1['starke'] >= mt_random_wrapper(1,100)) { $schaden_1 = 'Schwächen'; $k_mp[1] -= $k_mp2[1] * ($technick1['speed'] / 100); if($k_mp[1] < 0) { @@ -35,7 +36,7 @@ if($technick2['type'] == 'lose2') { $k_mp[1] = 0; } else { - if($technick2['starke'] >= mt_rand(1,100)) { + if($technick2['starke'] >= mt_random_wrapper(1,100)) { $schaden_2 = 'Schwächen'; $k_mp[0] -= $k_mp1[1] * ($technick2['speed'] / 100); if($k_mp[0] < 0) { diff --git a/ag/include/kampf/tausch.php b/ag/include/kampf/tausch.php index bfa28db..f929232 100644 --- a/ag/include/kampf/tausch.php +++ b/ag/include/kampf/tausch.php @@ -5,6 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ +include_once(ROOT_PATH.'/include/random.inc.php'); if (!function_exists('getKTChance')) { @@ -35,10 +36,10 @@ if (!function_exists('getKTChance')) { } ################### Spieler 1 -$char1_luck = mt_rand(0, $k_glueck[0]); -$char2_luck = mt_rand(0, $k_glueck[1]); +$char1_luck = mt_random_wrapper(0, $k_glueck[0]); +$char2_luck = mt_random_wrapper(0, $k_glueck[1]); $chance = round(getKTChance($char1_luck, $char2_luck)); -$random = mt_rand(0,100); +$random = mt_random_wrapper(0,100); if ($technick1['type'] == 'tausch') { if ($k_mp[0] >= $technick1['mp']) { @@ -87,10 +88,10 @@ if ($technick1['type'] == 'tausch') { } ################### Spieler 2 -$char1_luck = mt_rand(0, $k_glueck[0]); -$char2_luck = mt_rand(0, $k_glueck[1]); +$char1_luck = mt_random_wrapper(0, $k_glueck[0]); +$char2_luck = mt_random_wrapper(0, $k_glueck[1]); $chance = round(getKTChance($char2_luck, $char1_luck)); -$random = mt_rand(0,100); +$random = mt_random_wrapper(0,100); if ($technick2['type'] == 'tausch') { if ($k_mp[1] >= $technick2['mp']) { diff --git a/ag/include/kampf/tausch2.php b/ag/include/kampf/tausch2.php index f0f94b1..d84c3a3 100644 --- a/ag/include/kampf/tausch2.php +++ b/ag/include/kampf/tausch2.php @@ -7,6 +7,7 @@ */ ################### Spieler 1 +include_once(ROOT_PATH.'/include/random.inc.php'); if ($technick1['type'] == 'tausch2') { $k_mp[0] = $k_mp[0] - $technick1['mp']; @@ -29,7 +30,7 @@ if ($technick1['type'] == 'tausch2') { if ($speeds_char1_4 < 1) { $speeds_char1_4 = 1; } - $speeds_char1 = mt_rand($speeds_char1_4, $speeds_char1); + $speeds_char1 = mt_random_wrapper($speeds_char1_4, $speeds_char1); } } else { @@ -64,7 +65,7 @@ if ($technick2['type'] == 'tausch2') { if ($speeds_char2_4 < 1) { $speeds_char2_4 = 1; } - $speeds_char2 = mt_rand($speeds_char2_4, $speeds_char2); + $speeds_char2 = mt_random_wrapper($speeds_char2_4, $speeds_char2); } } else { $k_mp[1] = 0; diff --git a/ag/include/kampf_anzeige.inc.php b/ag/include/kampf_anzeige.inc.php index 8e4883b..3a07ded 100644 --- a/ag/include/kampf_anzeige.inc.php +++ b/ag/include/kampf_anzeige.inc.php @@ -8,6 +8,7 @@ */ include_once(ROOT_PATH.'/include/attacke.inc.php'); +include_once(ROOT_PATH.'/include/random.inc.php'); function displayCharTable($charbild, $charname, $starke, $ver, $speed, $ausdauer, $glueck = -1, $hp_akt, $hp_max, $mp_akt, $mp_max ){ @@ -276,7 +277,7 @@ function displaySchatzSuche($char){ } } else{ $final_result = 'lost'; - $lose_rate = mt_rand(25,60)/100; + $lose_rate = mt_random_wrapper(25,60)/100; $row['exp'] = round($row['exp'] * $lose_rate); $row['geld'] = round ( $row ['geld'] * $lose_rate ); for($i = 0;$i< count($row_r); $i++){ diff --git a/ag/include/kampf_wrapper.inc.php b/ag/include/kampf_wrapper.inc.php index a55e308..8d8db5e 100644 --- a/ag/include/kampf_wrapper.inc.php +++ b/ag/include/kampf_wrapper.inc.php @@ -163,8 +163,8 @@ function calculateFight(array $char1, array $char2) { ///////////////////Hier laedt er den RELOAD der technik wenn die zusammen setzung nicht stimmen sollte include (ROOT_PATH . '/include/kampf/andere_technik.php'); /////////////////// Wenn man ne andere technik sich aussuchen will... - $speeds_char1 = ($k_speed[0] + $technick1[speed]); - $speeds_char2 = ($k_speed[1] + $technick2[speed]); + $speeds_char1 = ($k_speed[0] + $technick1['speed']); + $speeds_char2 = ($k_speed[1] + $technick2['speed']); ////// MUSS SO BLEIBEN WICHTIG $aussetzten_runde = ''; @@ -215,10 +215,6 @@ function calculateFight(array $char1, array $char2) { #####################################KAMPF SYSTEM include (ROOT_PATH . '/include/kampf/kampf_rechnung.php'); - // $db_query = mysql_fetch_array(mysql_query("SELECT * FROM kampf WHERE (char1='$chara_1[id]' OR char1='$chara_2[id]') AND dauer='0' order by id DESC LIMIT 1")); - // mysql_query("UPDATE kampf SET hp1='$db_query[hp1],$k_hp7[0]', hp2='$db_query[hp2],$k_hp7[1]', mp1='$db_query[mp1],$k_mp7[0]', mp2='$db_query[mp2],$k_mp7[1]', schaden1='$db_query[schaden1],$schaden_1', schaden2='$db_query[schaden2],$schaden_2', attacke1='$db_query[attacke1],$technick1[name]', attacke2='$db_query[attacke2],$technick2[name]', starke1='$db_query[starke1],$k_starke[0]', starke2='$db_query[starke2],$k_starke[1]', ver1='$db_query[ver1],$k_ver[0]', ver2='$db_query[ver2],$k_ver[1]', speed1='$db_query[speed1],$k_speed[0]', speed2='$db_query[speed2],$k_speed[1]', ausdauer1='$db_query[ausdauer1],$k_ausdauer[0]', ausdauer2='$db_query[ausdauer2],$k_ausdauer[1]', glueck1='$db_query[glueck1],$k_glueck[0]', glueck2='$db_query[glueck2],$k_glueck[1]' WHERE id='$db_query[id]'"); - - // stupid, i know .... but what else should i do if i don't want to rewrite it all -.- // maybe you should have set a reference to the variable? :P (radi) diff --git a/ag/include/messagefunctions.inc.php b/ag/include/messagefunctions.inc.php index 23cf4c8..5918ce2 100644 --- a/ag/include/messagefunctions.inc.php +++ b/ag/include/messagefunctions.inc.php @@ -21,6 +21,7 @@ include_once(ROOT_PATH.'/include/parse.inc.php'); include_once(ROOT_PATH.'/include/designfunctions.inc.php'); include_once(ROOT_PATH.'/include/bann.inc.php'); include_once(ROOT_PATH.'/include/sqlwrapper.inc.php'); +include_once(ROOT_PATH.'/include/random.inc.php'); function sendMessage($von, $besitzer, $betreff, $text){ // $betreff = $betreff; @@ -116,7 +117,7 @@ function insertUserTickerMessage($userid, $message, $offset = 0){ } else{ $timestamp = '\''.date('Y-m-d H:i:s', time() + $offset * 60).'\''; } - for($msgid = 0; $msgid < 100000; $msgid += mt_rand(1,1000)){ + for($msgid = 0; $msgid < 100000; $msgid += mt_random_wrapper(1,1000)){ $sql = 'INSERT INTO user_ticker(userid, date, msgid, text) values('.$userid.', '.$timestamp.', '.$msgid.', \''.$message.'\')'; mysql_query($sql); if(mysql_affected_rows() == 1){ @@ -133,7 +134,7 @@ function insertClanTickerMessage($clanid, $message, $offset = 0){ } else{ $timestamp = '\''.date('Y-m-d H:i:s', time() + $offset * 60).'\''; } - for($msgid = 0; $msgid < 100000; $msgid += mt_rand(1,1000)){ + for($msgid = 0; $msgid < 100000; $msgid += mt_random_wrapper(1,1000)){ $sql = 'INSERT INTO clan_ticker(clanid, date, msgid, text) values('.$clanid.', now(), '.$msgid.', \''.$message.'\')'; mysql_query($sql); if(mysql_affected_rows() == 1){ diff --git a/ag/include/pollfunctions.inc.php b/ag/include/pollfunctions.inc.php index dc0e936..d0b9bf2 100644 --- a/ag/include/pollfunctions.inc.php +++ b/ag/include/pollfunctions.inc.php @@ -58,7 +58,7 @@ function getUmfragen($entries, $page){ function getUmfragenCount(){ $temp = mysql_fetch_assoc(mysql_query('SELECT count(*) as anzahl FROM poll')); - return $temp[anzahl]; + return $temp['anzahl']; } function getComments($pollid, $entries, $page){ @@ -74,7 +74,7 @@ function getComments($pollid, $entries, $page){ function getCommentCount($pollid){ $temp = mysql_fetch_assoc(mysql_query('Select count(*) as anzahl from poll_votes where comment != \'\' and pollid= '.$pollid)); - return $temp[anzahl]; + return $temp['anzahl']; } function getPollResult($pollid){ @@ -83,7 +83,7 @@ function getPollResult($pollid){ $qry = mysql_query($sql); // echo '
'.$sql.'
'; while($result = mysql_fetch_assoc($qry)){ - $returnArray[$result[polloptionid]] = $result[anzahl]; + $returnArray[$result['polloptionid']] = $result['anzahl']; } return $returnArray; } diff --git a/ag/include/random.inc.php b/ag/include/random.inc.php new file mode 100644 index 0000000..9a8cd1f --- /dev/null +++ b/ag/include/random.inc.php @@ -0,0 +1,19 @@ +".$my_charz[name].""; - $CHARAKTER_LERNPUNKTE[] = "Lernp.: ".$my_charz[lernpunkte].""; - if($user[schnelllink] == 1) { + $CHARAKTER_LERNPUNKTE[] = "Lernp.: ".$my_charz['lernpunkte'].""; + if($user['schnelllink'] == 1) { $CHARAKTER_VERWALTUNG[] = "Level: $my_charz[level]"; $CHARAKTER_TRAINING[] = "Powerlevel: $POWERLEVEL5"; $CHARAKTER_SCHATZ[] = "Trainingsp.: $my_charz[training_points]"; } - if($user[schnelllink] == 2) { + if($user['schnelllink'] == 2) { $CHARAKTER_VERWALTUNG[] = "Verwaltung: Hier"; $CHARAKTER_TRAINING[] = "Training: Hier"; $CHARAKTER_SCHATZ[] = "Schatzsuche: Hier"; } - if($my_charz[status] != "Frei") { - $CHARAKTER_STATUS[] = "".$my_charz[status].""; + if($my_charz['status'] != "Frei") { + $CHARAKTER_STATUS[] = "".$my_charz['status'].""; } else { $CHARAKTER_STATUS[] = "Frei"; } diff --git a/ag/include/user.inc.php b/ag/include/user.inc.php index 589f680..1097b44 100644 --- a/ag/include/user.inc.php +++ b/ag/include/user.inc.php @@ -60,7 +60,7 @@ function getRelevantMoney($userid) { $auktionensumme = $auktionensumme['summe']; if ($auktionensumme == 0) { - $money = $user[geld]; + $money = $user['geld']; } else { $money = $user['geld'] - $auktionensumme; } diff --git a/ag/index.php b/ag/index.php index 6f2383d..9b34ca8 100644 --- a/ag/index.php +++ b/ag/index.php @@ -324,18 +324,12 @@ if (top != self) if($as != "irc" AND $as != "login" AND $as != "anmeldung" AND $as != "info/logs" AND $as != "info/agb" AND $as != "pw" AND $as != "aktiv" AND $as != 'impressum' AND $as != 'support' AND $POLOE == 1) { echo "Passwort falsch oder Account nicht aktiviert!"; } else { - //if($banned_accs > 0) { - //echo "

Sie Sind mit Doppel Account drin sollten sie mit ihren Bruder Spielen bitte eine E-mail an vegeta0015@hotmail.com mit Namen beider Charakter"; - //exit; - //} if($user_ida['bann'] == "ja") { echo "

BANN melden sie sich beim Administrator"; exit; } - //if($_GET[agb]) { mysql_query("UPDATE user SET agb='ja' WHERE id='$user_ida[id]' LIMIT 1"); echo "Ok sie koennen jetzt weiter Spielen"; exit; } - if($user_ida['agb'] == "nein" && $as != "info/agb") { if($agb == 'ok'){ mysql_query("UPDATE user SET agb='ja' WHERE id='$user_ida[id]' LIMIT 1"); diff --git a/ag/info.php b/ag/info.php index 95802cf..645ff76 100644 --- a/ag/info.php +++ b/ag/info.php @@ -43,12 +43,12 @@ function display1($char_id){ ?> - + - + - + + - + - + @@ -87,7 +87,7 @@ function display1($char_id){ ?> @@ -98,7 +98,7 @@ function display1($char_id){ ?> - +
- + Dead List @@ -56,26 +56,26 @@ function display1($char_id){
Siege  
Liga Siege  
Niederlagen -   
Liga Niederlagen  
Rasse  
Fusion Rasse
Teufels Frucht
Level  

Homepage -  
Clan
Geschlecht -  
Nachricht schreiben
Nachricht schreiben
-

+

Name -   +  

Stärke -   +  

Verteidigung -   +  

Geschwindigkeit -   +  

HP -   +  

MP -   +  

Level -   +  

Geld -   +  

Type -   +  

Info -   +   '.$item_name['name'].' ('.$row['anzahl'].' mal)'; } } diff --git a/ag/kampf2.php b/ag/kampf2.php index e377d48..7f3de40 100644 --- a/ag/kampf2.php +++ b/ag/kampf2.php @@ -10,6 +10,7 @@ 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/char.inc.php'); +include_once(ROOT_PATH.'/include/random.inc.php'); $k_exp[0] = ""; $X23 = ""; @@ -20,72 +21,72 @@ if (!$chara_1['id'] OR !$chara_2['id']) { exit; } ################## Kaempfer 1 -$char1_quis_item = explode(",", $chara_1[kampf_item]); +$char1_quis_item = explode(",", $chara_1['kampf_item']); $char1_item_helm = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[0]' LIMIT 1")); $char1_item_rustung = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[1]' LIMIT 1")); $char1_item_schild = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[2]' LIMIT 1")); $char1_item_schwert = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[3]' LIMIT 1")); $char1_item_schuhe = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char1_quis_item[4]' LIMIT 1")); -$k_hp1 = explode(",", $chara_1[hp]); -$k_mp1 = explode(",", $chara_1[mp]); +$k_hp1 = explode(",", $chara_1['hp']); +$k_mp1 = explode(",", $chara_1['mp']); -$k_starke[0] = $chara_1[starke] + $char1_item_helm[starke] + $char1_item_rustung[starke] + $char1_item_schild[starke] + $char1_item_schwert[starke] + $char1_item_schuhe[starke]; -$k_speed[0] = $chara_1[speed] + $char1_item_helm[speed] + $char1_item_rustung[speed] + $char1_item_schild[speed] + $char1_item_schwert[speed] + $char1_item_schuhe[speed]; -$k_ver[0] = $chara_1[verteidigung] + $char1_item_helm[verteidigung] + $char1_item_rustung[verteidigung] + $char1_item_schild[verteidigung] + $char1_item_schwert[verteidigung] + $char1_item_schuhe[verteidigung]; -$k_hp1[0] += $char1_item_helm[hp] + $char1_item_rustung[hp] + $char1_item_schild[hp] + $char1_item_schwert[hp] + $char1_item_schuhe[hp]; -$k_hp1[1] += $char1_item_helm[hp] + $char1_item_rustung[hp] + $char1_item_schild[hp] + $char1_item_schwert[hp] + $char1_item_schuhe[hp]; -$k_mp1[0] += $char1_item_helm[mp] + $char1_item_rustung[mp] + $char1_item_schild[mp] + $char1_item_schwert[mp] + $char1_item_schuhe[mp]; -$k_mp1[1] += $char1_item_helm[mp] + $char1_item_rustung[mp] + $char1_item_schild[mp] + $char1_item_schwert[mp] + $char1_item_schuhe[mp]; +$k_starke[0] = $chara_1['starke'] + $char1_item_helm['starke'] + $char1_item_rustung['starke'] + $char1_item_schild['starke'] + $char1_item_schwert['starke'] + $char1_item_schuhe['starke']; +$k_speed[0] = $chara_1['speed'] + $char1_item_helm['speed'] + $char1_item_rustung['speed'] + $char1_item_schild['speed'] + $char1_item_schwert['speed'] + $char1_item_schuhe['speed']; +$k_ver[0] = $chara_1['verteidigung'] + $char1_item_helm['verteidigung'] + $char1_item_rustung['verteidigung'] + $char1_item_schild['verteidigung'] + $char1_item_schwert['verteidigung'] + $char1_item_schuhe['verteidigung']; +$k_hp1[0] += $char1_item_helm['hp'] + $char1_item_rustung['hp'] + $char1_item_schild['hp'] + $char1_item_schwert['hp'] + $char1_item_schuhe['hp']; +$k_hp1[1] += $char1_item_helm['hp'] + $char1_item_rustung['hp'] + $char1_item_schild['hp'] + $char1_item_schwert['hp'] + $char1_item_schuhe['hp']; +$k_mp1[0] += $char1_item_helm['mp'] + $char1_item_rustung['mp'] + $char1_item_schild['mp'] + $char1_item_schwert['mp'] + $char1_item_schuhe['mp']; +$k_mp1[1] += $char1_item_helm['mp'] + $char1_item_rustung['mp'] + $char1_item_schild['mp'] + $char1_item_schwert['mp'] + $char1_item_schuhe['mp']; -$k_ausdauer[0] = $chara_1[ausdauer]; -$k_glueck[0] = $chara_1[glueck]; +$k_ausdauer[0] = $chara_1['ausdauer']; +$k_glueck[0] = $chara_1['glueck']; -$k_attacke1 = explode(",", $chara_1[attacken]); -$k_select1_1 = explode(",", $chara_1[auswahl1]); -$k_select1_2 = explode(",", $chara_1[auswahl2]); -$k_select1_3 = explode(",", $chara_1[auswahl3]); -$k_attacke1_2 = explode(",", $chara_1[attacken2]); +$k_attacke1 = explode(",", $chara_1['attacken']); +$k_select1_1 = explode(",", $chara_1['auswahl1']); +$k_select1_2 = explode(",", $chara_1['auswahl2']); +$k_select1_3 = explode(",", $chara_1['auswahl3']); +$k_attacke1_2 = explode(",", $chara_1['attacken2']); $k_hp[0] = round($k_hp1[0]); $k_mp[0] = round($k_mp1[0]); $k_aufgabe_a_1 = $k_hp1[1] / 100; -$k_aufgabe[0] = $k_aufgabe_a_1 * $chara_1[aufgeben]; +$k_aufgabe[0] = $k_aufgabe_a_1 * $chara_1['aufgeben']; ################## Kaempfer 2 -$char2_quis_item = explode(",", $chara_2[kampf_item]); +$char2_quis_item = explode(",", $chara_2['kampf_item']); $char2_item_helm = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[0]' LIMIT 1")); $char2_item_rustung = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[1]' LIMIT 1")); $char2_item_schild = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[2]' LIMIT 1")); $char2_item_schwert = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[3]' LIMIT 1")); $char2_item_schuhe = mysql_Fetch_Array(mysql_query("SELECT i.hp, i.mp, i.starke, i.verteidigung, i.speed FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE w.id='$char2_quis_item[4]' LIMIT 1")); -$k_hp2 = explode(",", $chara_2[hp]); -$k_mp2 = explode(",", $chara_2[mp]); +$k_hp2 = explode(",", $chara_2['hp']); +$k_mp2 = explode(",", $chara_2['mp']); -$k_starke[1] = $chara_2[starke] + $char2_item_helm[starke] + $char2_item_rustung[starke] + $char2_item_schild[starke] + $char2_item_schwert[starke] + $char2_item_schuhe[starke]; -$k_speed[1] = $chara_2[speed] + $char2_item_helm[speed] + $char2_item_rustung[speed] + $char2_item_schild[speed] + $char2_item_schwert[speed] + $char2_item_schuhe[speed]; -$k_ver[1] = $chara_2[verteidigung] + $char2_item_helm[verteidigung] + $char2_item_rustung[verteidigung] + $char2_item_schild[verteidigung] + $char2_item_schwert[verteidigung] + $char2_item_schuhe[verteidigung]; -$k_hp2[0] += $char2_item_helm[hp] + $char2_item_rustung[hp] + $char2_item_schild[hp] + $char2_item_schwert[hp] + $char2_item_schuhe[hp]; -$k_hp2[1] += $char2_item_helm[hp] + $char2_item_rustung[hp] + $char2_item_schild[hp] + $char2_item_schwert[hp] + $char2_item_schuhe[hp]; -$k_mp2[0] += $char2_item_helm[mp] + $char2_item_rustung[mp] + $char2_item_schild[mp] + $char2_item_schwert[mp] + $char2_item_schuhe[mp]; -$k_mp2[1] += $char2_item_helm[mp] + $char2_item_rustung[mp] + $char2_item_schild[mp] + $char2_item_schwert[mp] + $char2_item_schuhe[mp]; +$k_starke[1] = $chara_2['starke'] + $char2_item_helm['starke'] + $char2_item_rustung['starke'] + $char2_item_schild['starke'] + $char2_item_schwert['starke'] + $char2_item_schuhe['starke']; +$k_speed[1] = $chara_2['speed'] + $char2_item_helm['speed'] + $char2_item_rustung['speed'] + $char2_item_schild['speed'] + $char2_item_schwert['speed'] + $char2_item_schuhe['speed']; +$k_ver[1] = $chara_2['verteidigung'] + $char2_item_helm['verteidigung'] + $char2_item_rustung['verteidigung'] + $char2_item_schild['verteidigung'] + $char2_item_schwert['verteidigung'] + $char2_item_schuhe['verteidigung']; +$k_hp2[0] += $char2_item_helm['hp'] + $char2_item_rustung['hp'] + $char2_item_schild['hp'] + $char2_item_schwert['hp'] + $char2_item_schuhe['hp']; +$k_hp2[1] += $char2_item_helm['hp'] + $char2_item_rustung['hp'] + $char2_item_schild['hp'] + $char2_item_schwert['hp'] + $char2_item_schuhe['hp']; +$k_mp2[0] += $char2_item_helm['mp'] + $char2_item_rustung['mp'] + $char2_item_schild['mp'] + $char2_item_schwert['mp'] + $char2_item_schuhe['mp']; +$k_mp2[1] += $char2_item_helm['mp'] + $char2_item_rustung['mp'] + $char2_item_schild['mp'] + $char2_item_schwert['mp'] + $char2_item_schuhe['mp']; -$k_ausdauer[1] = $chara_2[ausdauer]; -$k_glueck[1] = $chara_2[glueck]; +$k_ausdauer[1] = $chara_2['ausdauer']; +$k_glueck[1] = $chara_2['glueck']; -$k_attacke2 = explode(",", $chara_2[attacken]); -$k_select2_1 = explode(",", $chara_2[auswahl1]); -$k_select2_2 = explode(",", $chara_2[auswahl2]); -$k_select2_3 = explode(",", $chara_2[auswahl3]); -$k_attacke2_2 = explode(",", $chara_2[attacken2]); +$k_attacke2 = explode(",", $chara_2['attacken']); +$k_select2_1 = explode(",", $chara_2['auswahl1']); +$k_select2_2 = explode(",", $chara_2['auswahl2']); +$k_select2_3 = explode(",", $chara_2['auswahl3']); +$k_attacke2_2 = explode(",", $chara_2['attacken2']); $k_hp[1] = round($k_hp2[0]); $k_mp[1] = round($k_mp2[0]); $k_aufgabe_a_2 = $k_hp2[1] / 100; -$k_aufgabe[1] = $k_aufgabe_a_2 * $chara_2[aufgeben]; +$k_aufgabe[1] = $k_aufgabe_a_2 * $chara_2['aufgeben']; $runden_type1 = 0; $runden_type2 = 0; @@ -131,11 +132,11 @@ $GLOBALS['kampf']['aussetzen'] = &$aussetzten_runde; while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { $technick1 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke1[$x]' LIMIT 10")); - $prozent_technik1 = (20 * $technick1[aktiv]) - 20; + $prozent_technik1 = (20 * $technick1['aktiv']) - 20; $technick1 = mysql_fetch_array(mysql_query("SELECT * FROM attacken WHERE id='$technick1[at_id]' LIMIT 10")); $technick2 = mysql_fetch_array(mysql_query("SELECT at_id, aktiv FROM lernen WHERE id='$k_attacke2[$x]' LIMIT 10")); - $prozent_technik2 = (20 * $technick2[aktiv]) - 20; + $prozent_technik2 = (20 * $technick2['aktiv']) - 20; $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 @@ -147,15 +148,15 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { $technick1['verteidigung'] = $technick1['verteidigung'] + (($technick1['verteidigung'] / 100) * $prozent_technik1); $technick2['verteidigung'] = $technick2['verteidigung'] + (($technick2['verteidigung'] / 100) * $prozent_technik2); - $technick1[starke] = $technick1[starke] + (($technick1[starke] / 100) * $prozent_technik1); - $technick2[starke] = $technick2[starke] + (($technick2[starke] / 100) * $prozent_technik2); + $technick1['starke'] = $technick1['starke'] + (($technick1['starke'] / 100) * $prozent_technik1); + $technick2['starke'] = $technick2['starke'] + (($technick2['starke'] / 100) * $prozent_technik2); - $speeds_char1 = ($k_speed[0] + $technick1[speed]); - $speeds_char2 = ($k_speed[1] + $technick2[speed]); + $speeds_char1 = ($k_speed[0] + $technick1['speed']); + $speeds_char2 = ($k_speed[1] + $technick2['speed']); // Speedbug - // $speeds_char1_4 = ($k_speed[0] + $technick1[speed]) / 1.5; - // $speeds_char2_4 = ($k_speed[1] + $technick2[speed]) / 1.5; + // $speeds_char1_4 = ($k_speed[0] + $technick1['speed']) / 1.5; + // $speeds_char2_4 = ($k_speed[1] + $technick2['speed']) / 1.5; // // if ($speeds_char1_4 < 1) { // $speeds_char1_4 = 1; @@ -164,8 +165,8 @@ while ($k_hp[0] > $k_aufgabe[0] AND $k_hp[1] > $k_aufgabe[1] AND $x < 10) { // $speeds_char2_4 = 1; // } // - // $speed_char1 = mt_rand($speeds_char1_4, $speeds_char1); - // $speed_char2 = mt_rand($speeds_char2_4, $speeds_char2); + // $speed_char1 = mt_random_wrapper($speeds_char1_4, $speeds_char1); + // $speed_char2 = mt_random_wrapper($speeds_char2_4, $speeds_char2); ////// MUSS SO BLEIBEN WICHTIG $aussetzten_runde = ""; @@ -268,11 +269,11 @@ while ($s < 2) { $k_exp[0] = (getPowerLevelWithBuffs($chara_1['id']) + getPowerLevelWithBuffs($chara_2['id'])) * 2.2 * $exp001; - // $k_geld[0] = ((($chara_1[starke] + $chara_1[verteidigung] + $chara_1[speed] + $chara_1[ausdauer] + $chara_1[glueck] + $chara_2[starke] + $chara_2[verteidigung] + $chara_2[speed] + $chara_2[ausdauer] + $chara_2[glueck]) / 2)) * $exp001; + // $k_geld[0] = ((($chara_1['starke'] + $chara_1['verteidigung'] + $chara_1['speed'] + $chara_1['ausdauer'] + $chara_1['glueck'] + $chara_2['starke'] + $chara_2['verteidigung'] + $chara_2['speed'] + $chara_2['ausdauer'] + $chara_2['glueck']) / 2)) * $exp001; $k_exp[1] = (getPowerLevelWithBuffs($chara_1['id']) + getPowerLevelWithBuffs($chara_2['id'])) * $exp001; - // $k_geld[1] = ((((($chara_1[starke] + $chara_1[verteidigung] + $chara_1[speed] + $chara_1[ausdauer] + $chara_1[glueck] + $chara_2[starke] + $chara_2[verteidigung] + $chara_2[speed] + $chara_2[ausdauer] + $chara_2[glueck]) / 2)) / 2)) * $exp001; + // $k_geld[1] = ((((($chara_1['starke'] + $chara_1['verteidigung'] + $chara_1['speed'] + $chara_1['ausdauer'] + $chara_1['glueck'] + $chara_2['starke'] + $chara_2['verteidigung'] + $chara_2['speed'] + $chara_2['ausdauer'] + $chara_2['glueck']) / 2)) / 2)) * $exp001; $sieger = $chara_1['name']; $verlierer = $chara_2['name']; @@ -289,11 +290,11 @@ while ($s < 2) { $k_exp[1] = (getPowerLevelWithBuffs($chara_1['id']) + getPowerLevelWithBuffs($chara_2['id'])) * 2.2 * $exp001; - // $k_geld[1] = ((($chara_1[starke] + $chara_1[verteidigung] + $chara_1[speed] + $chara_1[ausdauer] + $chara_1[glueck] + $chara_2[starke] + $chara_2[verteidigung] + $chara_2[speed] + $chara_2[ausdauer] + $chara_2[glueck]) / 2)) * $exp001; + // $k_geld[1] = ((($chara_1['starke'] + $chara_1['verteidigung'] + $chara_1['speed'] + $chara_1['ausdauer'] + $chara_1['glueck'] + $chara_2['starke'] + $chara_2['verteidigung'] + $chara_2['speed'] + $chara_2['ausdauer'] + $chara_2['glueck']) / 2)) * $exp001; $k_exp[0] = (getPowerLevelWithBuffs($chara_1['id']) + getPowerLevelWithBuffs($chara_2['id'])) * $exp001; - // $k_geld[0] = ((((($chara_1[starke] + $chara_1[verteidigung] + $chara_1[speed] + $chara_1[ausdauer] + $chara_1[glueck] + $chara_2[starke] + $chara_2[verteidigung] + $chara_2[speed] + $chara_2[ausdauer] + $chara_2[glueck]) / 2)) / 2)) * $exp001; + // $k_geld[0] = ((((($chara_1['starke'] + $chara_1['verteidigung'] + $chara_1['speed'] + $chara_1['ausdauer'] + $chara_1['glueck'] + $chara_2['starke'] + $chara_2['verteidigung'] + $chara_2['speed'] + $chara_2['ausdauer'] + $chara_2['glueck']) / 2)) / 2)) * $exp001; } @@ -331,9 +332,9 @@ mysql_query('Update arena set einnahmen = einnahmen + '.$k_geld[1].' WHERE besit */ $arena_geld = 0; -$dauer_Z = time() + ($kampf_info[zeit_rec]); +$dauer_Z = time() + ($kampf_info['zeit_rec']); -$arena_exp_new = round(50 * ($chara_1[level] + $chara_2[level]) * ($exp001 / 3)); +$arena_exp_new = round(50 * ($chara_1['level'] + $chara_2['level']) * ($exp001 / 3)); mysql_query("UPDATE kampf SET preis='$nw_preis', art='$kampf_info[art]', art2='$kampf_info[rasse]', exp1='$k_exp[0]', arena_name = '$arena_data[id]', win='$sieger', lose='$verlierer', exp2='$k_exp[1]', geld1='$k_geld[0]', geld2='$k_geld[1]', loge='$arena[loge]' , sitz='$arena[sitz]', steh='$arena[steh]', db_satz='$chara_1[id]', dauer='$dauer_Z', arena_exp=$arena_exp_new, loge = $arena_data[loge], sitz = $arena_data[sitz], steh = $arena_data[steh] , arena_geld = $arena_geld WHERE id='$db_query[id]'"); diff --git a/ag/kampf4.php b/ag/kampf4.php index b031e56..b215e84 100644 --- a/ag/kampf4.php +++ b/ag/kampf4.php @@ -159,7 +159,7 @@ if ($kampf1['id']) { ###################################################CHARAKTER WIN - if ($kampf1['win'] == "$my_charakter[name]") { + if ($kampf1['win'] == $my_charakter['name']) { $new_siege = $my_charakter['siege'] + 1; ////////NPC item verteilung @@ -204,7 +204,7 @@ if ($kampf1['id']) { mysql_query("INSERT $item[datensatz] SET $satz='$item[item]', user='$user_ida[id]'"); if (!$ut) { - $itemname = $item[item]; + $itemname = $item['item']; } else { $itemname .= ',' . $item['item']; } @@ -221,17 +221,17 @@ if ($kampf1['id']) { } else { ###################################################CHARAKTER LOSE - $new_niederlagen = $my_charakter[niederlagen] + 1; + $new_niederlagen = $my_charakter['niederlagen'] + 1; if ($kampf1[art] == "Liga Kampf") { - $new_liga_niederlagen = $my_charakter[liga_niederlagen] + 1; + $new_liga_niederlagen = $my_charakter['liga_niederlagen'] + 1; } else { - $new_liga_niederlagen = $my_charakter[liga_niederlagen]; + $new_liga_niederlagen = $my_charakter['liga_niederlagen']; } - if ($kampf1[art2] == "Todes Kampf") { + if ($kampf1['art2'] == "Todes Kampf") { print " - + @@ -237,9 +224,9 @@ function mainPage($userid,$aktualPage){ } $nachricht = mysql_query('SELECT betreff, ag, von, datum, id FROM nachricht WHERE besitzer='.$userid.' order by id DESC LIMIT '.($aktualPage*30).',30'); $anzahl = mysql_fetch_assoc(mysql_query('SELECT count(*) as anzahl from nachricht WHERE besitzer='.$userid)); - $anzahl = ceil($anzahl[anzahl]/30); + $anzahl = ceil($anzahl['anzahl']/30); ?> - + @@ -258,9 +245,9 @@ function mainPage($userid,$aktualPage){ ?> - + - + diff --git a/ag/news.php b/ag/news.php index aef73cf..945ac47 100644 --- a/ag/news.php +++ b/ag/news.php @@ -21,7 +21,7 @@ $charm = $_GET['charm']; $username = $user_ida['nickname']; -function insertComment($username, $komment, $news_id) { //if($charm == 1 AND $_GET[post_name] AND $_GET[kommens]) { +function insertComment($username, $komment, $news_id) { $sql = 'INSERT ff11_komments SET user=\'' . $username . '\', text=\'' . encodeNoHTMLWithBB($komment) . '\', ip=\'' . $_SERVER['REMOTE_ADDR'] . '\', datum=CURRENT_DATE, zeit=CURRENT_TIME, news_id=' . $news_id; mysql_Query($sql); // echo $sql; diff --git a/ag/pw.php b/ag/pw.php index 1c104de..cf9b898 100644 --- a/ag/pw.php +++ b/ag/pw.php @@ -7,6 +7,7 @@ */ include_once('path.inc.php'); // get the path ;) include_once(ROOT_PATH.'/include/parse.inc.php'); +include_once(ROOT_PATH.'/include/random.inc.php'); // GET-Section @@ -19,7 +20,7 @@ function changePassword($email){ if(!$emails['nickname']) { return 'E-Mailadresse gibt es nicht'; } - $test = 'a'.mt_rand(1,1000000); + $test = 'a'.mt_random_wrapper(1,1000000); @mail($email,'Zugangsdaten von animegame.de','Ihre Zugangsdaten,'."\n\n".'Sie lauten:'."\n\n".'Username: '.$emails['nickname']."\n\n".'Passwort: '.$test.' '."\n\n", 'From: Hecht'."\n".'Reply-To: hecht@animegame.eu'."\n".'X-Mailer: PHP/'.phpversion()); $test2 = md5($test); diff --git a/ag/runde.php b/ag/runde.php index 46de6d1..83371ab 100644 --- a/ag/runde.php +++ b/ag/runde.php @@ -5,9 +5,9 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * */ -if($technick1[type] == "runde") { +if($technick1['type'] == "runde") { - $k_mp[0] = $k_mp[0] - $technick1[mp]; + $k_mp[0] = $k_mp[0] - $technick1['mp']; if($k_mp[0] < 0) { $schaden_1 = "$technick1[name] fehlgeschlagen"; @@ -15,7 +15,7 @@ if($technick1[type] == "runde") { $k_mp[0] = 0; } else { - if($runden_type1 < $technick1[hp]) { /////////HP wert sagt an wieviel runden die technik dauert + if($runden_type1 < $technick1['hp']) { /////////HP wert sagt an wieviel runden die technik dauert $schaden_1 = "Energie Sammeln"; $speeds_char1 = 10; $aktion_AV1[$x] = "nein"; @@ -27,15 +27,15 @@ if($technick1[type] == "runde") { } } -if($technick2[type] == "runde") { -$k_mp[1] = $k_mp[1] - $technick2[mp]; +if($technick2['type'] == "runde") { +$k_mp[1] = $k_mp[1] - $technick2['mp']; if($k_mp[1] < 0) { $schaden_2 = "$technick2[name] fehlgeschlagen"; $aktion_AV2[$x] = "nein"; $k_mp[1] = 0; } else { - if($runden_type2 < $technick2[hp]) { /////////HP wert sagt an wieviel runden die technik dauert + if($runden_type2 < $technick2['hp']) { /////////HP wert sagt an wieviel runden die technik dauert $schaden_2 = "Energie Sammeln"; $speed_char2 = 10; $aktion_AV2[$x] = "nein"; diff --git a/ag/sp_item.php b/ag/sp_item.php index e05c78e..17f3c20 100644 --- a/ag/sp_item.php +++ b/ag/sp_item.php @@ -11,6 +11,7 @@ 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/random.inc.php'); // GET-Section // Kritisch (SQL-Injections) @@ -30,11 +31,11 @@ function useChest($item_id, $user){ $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 = mt_random_wrapper(0,1000) * $row['wert']; // $treasure = 0; if($treasure == 0){ // Muhahaha -> failed $nothin_msg = array('Da war wohl jemand vor dir da!', 'Die Schatztruhe ist voller Steine!', 'Naja, dabei sein is alles, ne??!', 'Diese Schatztruhe war leer, vielleicht klappts ja das nächte Mal'); - displayErrorMessage('Schatztruhe geöffnet','Niete!! ' . $nothin_msg[mt_rand(0, count($nothin_msg)-1)],'zurück...'); + displayErrorMessage('Schatztruhe geöffnet','Niete!! ' . $nothin_msg[mt_random_wrapper(0, count($nothin_msg)-1)],'zurück...'); return; } else { displayErrorMessage('Schatztruhe geöffnet','GOLD!! Du findest ganze '.$treasure.' ¥','zurück...'); @@ -180,7 +181,7 @@ function confirmPotaraUse($item_id, $char1, $char2, $new_name){ function askForPotaraUse($user, $item_id){ // Spezielle abfrage in der Char-Tabelle (Koenne aber durch Puffern schneller sein, als diese SQL-Anfrage) - $all_charakter = mysql_query('SELECT id, name FROM chars WHERE besitzer='.$user[id].' and fusion != \'ja\''); + $all_charakter = mysql_query('SELECT id, name FROM chars WHERE besitzer='.$user['id'].' and fusion != \'ja\''); $options = ''; while($row = mysql_fetch_array($all_charakter)) { $options.= ''; diff --git a/ag/turnier2.php b/ag/turnier2.php index 559556f..17bcef4 100644 --- a/ag/turnier2.php +++ b/ag/turnier2.php @@ -37,7 +37,7 @@ $charm = $_GET['charm']; if($art == 'woche') { $art = 'wochen'; } $turnier = mysql_fetch_array(mysql_query('SELECT hp1, id FROM turnier_kampf WHERE art=\''.$art.'\' LIMIT 1')); -if(!$turnier[id]) { +if(!$turnier['id']) { displayErrorMessage(NULL,'Turnier fand noch nicht statt!',$back); } else if($charm == 1) { diff --git a/ag/wanted.php b/ag/wanted.php index 74cd717..3065d52 100644 --- a/ag/wanted.php +++ b/ag/wanted.php @@ -24,7 +24,7 @@ function displayTodesliste($char_id){ $char_in = getChar($char_id); echo '

Todes List von '.$char_in['name'].':
 
'; - $list_a = explode(',', $char_in[dead_list]); + $list_a = explode(',', $char_in['dead_list']); $u = 0; while($u < count($list_a)){ @@ -49,7 +49,7 @@ function displayWantedTop10(){

diff --git a/ag/wanted_kampf_anzeige.php b/ag/wanted_kampf_anzeige.php index 9c24ba4..457e5c4 100644 --- a/ag/wanted_kampf_anzeige.php +++ b/ag/wanted_kampf_anzeige.php @@ -30,7 +30,7 @@ if ($search) { ?> - + - - +
('.$row[ag].')'; ?> '.$row[von].''; ?>
###LABEL###'); + echo displayPagelinks($aktualPage,$anzahl,'###LABEL###'); ?>

vs.Anzeigen + )'>Anzeigen