You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			124 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			PHP
		
	
			
		
		
	
	
			124 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			PHP
		
	
<?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/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;
 | 
						|
} else {
 | 
						|
	if (!isUserOwnerOf($user_ida['id'],$char_id)) {
 | 
						|
		displayErrorMessage(NULL, 'Dieser Charakter gehört nicht dir.', displayHistoryBackLink());
 | 
						|
		exit;
 | 
						|
	}
 | 
						|
	if ($attack_id != null) {
 | 
						|
		$test = 'INSERT INTO lernen(name, at_id,besitzer,aktiv) VALUES'.
 | 
						|
			'((SELECT name FROM attacken WHERE id ='.$attack_id.'), '.$attack_id.', '.$char_id.', 1);';
 | 
						|
		$qry = mysql_query($test);
 | 
						|
	}
 | 
						|
	$attacks_learned = getAttacksforChar($char_id, 0);
 | 
						|
	$attacks_unlearned = getAttacksforChar($char_id, 1);	
 | 
						|
	$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 }?>
 |