@ -9,8 +9,11 @@
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/designfunctions.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/fehlerausgabe.inc.php');
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/parse.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);
$char_id = validateUnsignedInteger($_GET['char_id'], null);
$attack_id = validateUnsignedInteger($_REQUEST['attack_id'], null);
if ($char_id == null) {
if ($char_id == null) {
include ($_SERVER['DOCUMENT_ROOT'] . 'ag/char_index.php');
include ($_SERVER['DOCUMENT_ROOT'] . 'ag/char_index.php');
exit;
exit;
@ -19,27 +22,103 @@ if ($char_id == null) {
displayErrorMessage(NULL, 'Dieser Charakter gehö rt nicht dir.', displayHistoryBackLink());
displayErrorMessage(NULL, 'Dieser Charakter gehö rt nicht dir.', displayHistoryBackLink());
exit;
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');
if ($attack_id != null) {
?>
$test = 'INSERT INTO lernen(name, at_id,besitzer,aktiv) VALUES'.
< table border = "0" width = "480" height = "83" >
'((SELECT name FROM attacken WHERE id ='.$attack_id.'), '.$attack_id.', '.$char_id.', 1);';
< tr >
$qry = mysql_query($test);
< td height = "50" width = "480" colspan = "2" >
< p align = "center" > < b > Technik System< / b > < / td >
< / tr >
<?php
while ($row = mysql_fetch_array($use)) {
?>
< tr >
< td height = "25" width = "152" >< b > <?php echo $row [ name ]; ?> </ b ></ td >
< td height = "25" width = "312" > < b >< font color = #0000ff > <?php echo $row [ benutzt ]; ?> </ font ></ b > mal im Kampf
eingesetzt.< / td >
< / tr >
<?php
}
}
?>
$attacks_learned = getAttacksforChar($char_id, 0);
< / table >
$attacks_unlearned = getAttacksforChar($char_id, 1);
<?php
$testuser = isUserInGroup($usergroups, tester);
?>
< form
action=<?php echo $_SERVER [ 'PHP_SELF' ] . '?as=info/lern&char_id=' . $char_id ; ?>
method="POST">
< table border = "0" width = "500" height = "83" >
< tr >
< td height = "50" width = "480" colspan = "2" >
< p align = "center" >
< b > Technik System< / b >
< / td >
< / tr >
< tr >
< td width = "100%" >
< table border = "0" width = "100%" >
< tr >
< th width = "30%" > Attacke< / th >
< th width = "10%" > Level< / th >
< th width = "10%" > eingesetzt< / th >
< th width = "10%" > Anzahl< / th >
< th width = "40%" > benötigte Attacken< / th >
<?php if ( $testuser ) {
echo '< th widht = "5%" > lernen?< / th > ';
}
?>
< / tr >
<?php
foreach ($attacks_learned as $item) {
?>
< tr >
< td >< b > <?php echo $item [ 'name' ]; ?> </ b >
< / td >
< td align = "center" > -< / td >
< td align = "center" > <?php echo $item [ 'benutzt' ] . 'x' ; ?>
< / td >
< td align = "center" > -< / td >
< td > gelernt!< / td >
}
< / tr >
?>
<?php
}
foreach ($attacks_unlearned as $item) {
?>
< tr >
< td >< b > <?php echo $item [ 'name' ]; ?> </ b ></ td >
< td align = "center" > <?php if ( $item [ 'levelups' ]) {
echo $item['levelups'];
} else
echo '-';
?>
< / td >
< td align = "center" > 0x< / td >
< td align = "center" > <?php if ( isset ( $item [ 'req' ])) {
foreach($item['req'] as $requirenment) {
echo $requirenment['reggs'].'x< br > ';
}
} else
echo '-';
?>
< / td >
< td > <?php if ( isset ( $item [ 'req' ])) {
foreach($item['req'] as $requirenment) {
echo $requirenment['name'].'< br > ';
}
} else
echo ' ';
if($testuser) {
echo '< td align = "center" > ';
echo '< input type = "radio" value = "'.$item['id'].'" name = "attack_id" > ';
echo '< / td > ';
}
?>
< / td >
< / tr >
<?php }; ?>
< / table >
< / td >
< / tr >
<?php
if($testuser) {
echo '< tr > ';
echo '< td > < hr id = "hrc" > < / td > ';
echo '< / tr > ';
echo '< tr > ';
echo '< td align = "center" > < input id = "input" size = "15" type = "submit" value = "lernen" > < / td > ';
echo '< / tr > ';
}
?>
< / table >
< / form >
<?php } ?>