From a167c6bfced16197026d99a9f55033e5d8f7baa4 Mon Sep 17 00:00:00 2001 From: radiskull Date: Thu, 28 Jul 2011 19:39:34 +0000 Subject: [PATCH] =?UTF-8?q?Meine=20Techniken=20Anzeige=20=C3=BCberarbeitet?= =?UTF-8?q?=20(Anzeige=20aller=20Attacken=20und=20deren=20Vorraussetzung?= =?UTF-8?q?=20+=20Testuser=20k=C3=B6nnen=20Attacken=20(ausw=C3=A4hlen)=20s?= =?UTF-8?q?ofort=20lernen)=20Bugs=20behoben/Code=20Verbesserungen=20durchg?= =?UTF-8?q?ef=C3=BChrt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ag/char.php | 8 +-- ag/gm/include/user.inc.php | 45 +++++++------ ag/include/usergroup.inc.php | 3 + ag/info/lern.php | 123 ++++++++++++++++++++++++++++------- 4 files changed, 131 insertions(+), 48 deletions(-) diff --git a/ag/char.php b/ag/char.php index f896c50..e384940 100644 --- a/ag/char.php +++ b/ag/char.php @@ -28,10 +28,7 @@ $char_bild = validateURL($_GET['char_bild']); $char_lvl = validateInteger($_GET['char_lvl'], NULL); // Unkritisch -if($_POST['charm'] === NULL) { - $charm = $_GET['charm']; -} else - $charm = $_POST['charm']; +$charm = $_REQUEST['charm']; $char_type = $_GET['char_type']; ?> @@ -345,7 +342,8 @@ if ($anzahl_charactere < $chars_max) { } else if($charm == 3) { handleThirdPhaseForTester($char_1_type, $char_name, $char_lvl); } else if($charm == 4) { - handleErstelleCharRequestOfTestUser($user_ida, $_POST['char_type'], $_POST['char_name'], $_POST['char_bild'], $_POST['lvl'], $_POST['lp'], $_POST['hp'], $_POST['mp'], $_POST['str'], $_POST['def'], $_POST['spd'], $_POST['end'], $_POST['lck']); + handleErstelleCharRequestOfTestUser($user_ida, $_REQUEST['char_type'], $_REQUEST['char_name'], $_REQUEST['char_bild'], $_REQUEST['lvl'], $_REQUEST['lp'], + $_REQUEST['hp'], $_REQUEST['mp'], $_REQUEST['str'], $_REQUEST['def'], $_REQUEST['spd'], $_REQUEST['end'], $_REQUEST['lck']); } } else { echo 'Du hast bereits die maximal mögliche Menge an Characteren erstellt, die du erstellen kannst.
Nämlich '.$anzahl_charactere.' von '.$chars_max.' Charaktere.'; diff --git a/ag/gm/include/user.inc.php b/ag/gm/include/user.inc.php index 9432de7..8e47917 100644 --- a/ag/gm/include/user.inc.php +++ b/ag/gm/include/user.inc.php @@ -35,26 +35,27 @@ function getOtherUserGroups($user) { } function displayUserGroups($action, $name, $ugname, $delete, $add) { - if($action === 'search') { + if($action === 'search') { $username = validateName($name); - if ($delete !== NULL && $delete >= 0) { - $qry = 'DELETE FROM user_gruppe_zuordnung WHERE user_id in (SELECT id FROM user WHERE nickname = \''.$username. + if($username !== NULL) { + if ($delete !== NULL && $delete >= 0) { + $qry = 'DELETE FROM user_gruppe_zuordnung WHERE user_id in (SELECT id FROM user WHERE nickname = \''.$username. '\') AND gruppen_id = '.$delete.';'; - mysql_query($qry); - } else if($add !== NULL && $add >= 0) { - $qry = 'INSERT INTO user_gruppe_zuordnung(user_id, gruppen_id) + mysql_query($qry); + } else if($add !== NULL && $add >= 0) { + $qry = 'INSERT INTO user_gruppe_zuordnung(user_id, gruppen_id) VALUES((SELECT id FROM user WHERE nickname = \''.$username.'\'), '.$add.');'; - mysql_query($qry); - } + mysql_query($qry); + } - $usergroups = getUserGroups($username); - $notusergroups = getOtherUserGroups($username); + $usergroups = getUserGroups($username); + $notusergroups = getOtherUserGroups($username); - ?> + ?>
- - - + @@ -107,7 +108,9 @@ function displayUserGroups($action, $name, $ugname, $delete, $add) {
User
- Zurück'; + } } else if($action === 'show') { $username = validateName($ugname); $sqlqry = 'SELECT u.nickname FROM user_gruppe_zuordnung ugz @@ -122,7 +125,7 @@ function displayUserGroups($action, $name, $ugname, $delete, $add) { - '; $x = 0; while($row = mysql_fetch_assoc($usergroups_qry)){ @@ -154,15 +157,15 @@ function displayUserGroups($action, $name, $ugname, $delete, $add) { } else { ?> - - +
- @@ -190,7 +193,7 @@ function displayUserGroups($action, $name, $ugname, $delete, $add) {
User suchen
Username: - + Username:
- diff --git a/ag/include/usergroup.inc.php b/ag/include/usergroup.inc.php index 49f5c6f..ae0534e 100644 --- a/ag/include/usergroup.inc.php +++ b/ag/include/usergroup.inc.php @@ -9,6 +9,9 @@ //Konstanten define("admin", 1); define("tester", 2); +define("entwickler", 2); +define("designer", 2); +define("Werbung_an", 2); include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php'); diff --git a/ag/info/lern.php b/ag/info/lern.php index 1e2631f..165c53f 100644 --- a/ag/info/lern.php +++ b/ag/info/lern.php @@ -9,8 +9,11 @@ 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'); $char_id = validateUnsignedInteger($_GET['char_id'], null); +$attack_id = validateUnsignedInteger($_REQUEST['attack_id'], null); + if ($char_id == null) { include ($_SERVER['DOCUMENT_ROOT'] . 'ag/char_index.php'); exit; @@ -19,27 +22,103 @@ if ($char_id == null) { displayErrorMessage(NULL, 'Dieser Charakter gehört nicht dir.', displayHistoryBackLink()); exit; } - $use = mysql_query('SELECT a.name, l.benutzt FROM lernen l LEFT JOIN attacken a ON(a.id=l.at_id) WHERE l.besitzer='.$char_id.' ORDER BY l.id'); -?> - - - - - - - - - - -
-

Technik System

    mal im Kampf - eingesetzt.
- +
+ method="POST"> + + + + + + + + '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + ?> +
+

+ Technik System + +

+ + + + + + + + lernen?'; + } + ?> + + + + + + + + -} -?> \ No newline at end of file + + + + + + + + '; + } + ?> + + + +
AttackeLeveleingesetztAnzahlbenötigte Attacken
+ - + -gelernt!
+ 0x'; + } + } else + echo '-'; + ?> + '; + } + } else + echo ' '; + if($testuser) { + echo ''; + echo ''; + echo '
+

+
+ \ No newline at end of file