radiskull 13 years ago
parent 807faace93
commit 5d691a9697

@ -1,4 +1,4 @@
<?php <?php
/* /*
* Created on 31.05.2011 * Created on 31.05.2011
* *
@ -7,59 +7,60 @@
* *
*/ */
?> ?>
<?php <?php
function displayAttackenMenu($action, $attackname, $attackid, $depth, $name, $starke, $verteidigung, $speed, $hp, $mp, $rassen, $level, $geld, $type, $info, $req_atk, $req_lvl, $Frucht, $runden, $maxlvl) { function displayAttackenMenu($action, $attackname, $attackid, $depth, $name, $starke, $verteidigung, $speed, $hp, $mp, $rassen, $level, $geld, $type, $info, $req_atk, $req_lvl, $Frucht, $runden, $maxlvl) {
if($action === NULL){ if($action === NULL){
?> ?>
<table> <table>
<tr> <tr>
<th>Attacken</th> <th>Attacken</th>
</tr> </tr>
<tr> <tr>
<td> <td><a
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken&action=create">Attacke erstellen</a> href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken&action=create">Attacke
</td> erstellen</a>
</tr> </td>
<tr> </tr>
<td> <tr>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken&action=edit">Attacke editieren</a> <td><a
</td> href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken&action=edit">Attacke
</tr> editieren</a>
<tr> </td>
<td> </tr>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken&action=delete">Attacke l&ouml;schen</a> <tr>
</td> <td><a
</tr> href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken&action=delete">Attacke
<tr> l&ouml;schen</a>
<th>Attackenset-Conditions</th> </td>
</tr> </tr>
<tr> <tr>
<td> <th>Attackenset-Conditions</th>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken">Condition erstellen</a> </tr>
</td> <tr>
</tr> <td><a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken">Condition
<tr> erstellen</a>
<td> </td>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken">Condition editieren</a> </tr>
</td> <tr>
</tr> <td><a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken">Condition
<tr> editieren</a>
<td> </td>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken">Condition l&ouml;schen</a> </tr>
</td> <tr>
</tr> <td><a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken">Condition
<tr> l&ouml;schen</a>
<td> </td>
<br> </tr>
</td> <tr>
</tr> <td><br>
<tr> </td>
<td> </tr>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br> <tr>
</td> <td><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br>
</tr> </td>
</table> </tr>
<?php </table>
<?php
} else if(($action == 'delete' || $action == 'edit') && $attackname === NULL && $attackid === NULL){ } else if(($action == 'delete' || $action == 'edit') && $attackname === NULL && $attackid === NULL){
searchfirstAttack($action); searchfirstAttack($action);
} else if(($action == 'delete' || $action == 'edit') && $attackid === NULL){ } else if(($action == 'delete' || $action == 'edit') && $attackid === NULL){
@ -77,298 +78,350 @@ function displayAttackenMenu($action, $attackname, $attackid, $depth, $name, $st
function searchfirstAttack($action) { function searchfirstAttack($action) {
?> ?>
<form action="" method="POST"> <form action="" method="POST">
<input name="choose" value="attacken" type="hidden"></input> <input name="choose" value="attacken" type="hidden"></input> <input
<input name="action" value="<?php echo $action; ?>" type="hidden"></input> name="action" value="<?php echo $action; ?>" type="hidden"></input>
<table> <table>
<tr> <tr>
<th colspan="2">Attacke suchen</th> <th colspan="2">Attacke suchen</th>
</tr> </tr>
<tr> <tr>
<td> <td><input name="attackname">
<input name="attackname"> </td>
</td> <td><input type="submit" name="suche">
<td> </td>
<input type="submit" name="suche"> </tr>
</td> <tr>
</tr> <td><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br>
<tr> </td>
<td> </tr>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br> </table>
</td> </form>
</tr> <?php
</table>
</form>
<?php
} }
function searchsecondAttack($action, $attackname) { function searchsecondAttack($action, $attackname) {
$qry = mysql_query('Select name,id from attacken where name like \'%'.$attackname.'%\''); $qry = mysql_query('Select name,id from attacken where name like \'%'.$attackname.'%\'');
?> ?>
<form action="" method="POST"> <form action="" method="POST">
<input name="choose" value="attacken" type="hidden"></input> <input name="choose" value="attacken" type="hidden"></input> <input
<input name="action" value="<?php echo $action; ?>" type="hidden"></input> name="action" value="<?php echo $action; ?>" type="hidden"></input>
<?php if($action == 'delete'){ echo '<input name="depth" value="1" type="hidden"></input>'; }?> <?php if($action == 'delete'){ echo '<input name="depth" value="1" type="hidden"></input>'; }?>
<table> <table>
<tr> <tr>
<th colspan="2">Attacke ausw&auml;hlen</th> <th colspan="2">Attacke ausw&auml;hlen</th>
</tr> </tr>
<tr> <tr>
<td> <td><select name="attackid">
<select name="attackid"> <?php
<?php while($row = mysql_fetch_assoc($qry)){
while($row = mysql_fetch_assoc($qry)){ echo '<option value="'.$row['id'].'">'.$row['name'].'</option>\n';
echo '<option value="'.$row['id'].'">'.$row['name'].'</option>\n'; }
} ?>
?> </select>
</select> </td>
</td> <td><input type="submit" name="ausw&auml;hlen">
<td> </td>
<input type="submit" name="ausw&auml;hlen"> </tr>
</td> <tr>
</tr> <td><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br>
<tr> </td>
<td> </tr>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br> </table>
</td> </form>
</tr> <?php
</table>
</form>
<?php
} }
function createOrEditAttack($action, $attackid) { function createOrEditAttack($action, $attackid) {
if($action == 'edit'){ if($action == 'edit'){
$row = mysql_fetch_assoc(mysql_query('Select * from attacken where id ='.$attackid)); $row = mysql_fetch_assoc(mysql_query('Select * from attacken where id ='.$attackid));
} }
//Alle attacken auslesen
$att_qry = mysql_query('SELECT id,name FROM attacken WHERE info not like \'%NPC%\' ORDER BY name');
$available_attacks = array();
while($attacks = mysql_fetch_assoc($att_qry)) {
$available_attacks[] = array($attacks['id'], $attacks['name']);
}
$used_attacks = explode(',', $row['req_atk']);
?> ?>
<form action="" method="POST"> <form action="" method="POST">
<input name="choose" value="attacken" type="hidden"></input> <input name="choose" value="attacken" type="hidden"></input> <input
<input name="action" value="<?php echo $action; ?>" type="hidden"></input> name="action" value="<?php echo $action; ?>" type="hidden"></input> <input
<input name="attackid" value="<?php echo $attackid; ?>" type="hidden"></input> name="attackid" value="<?php echo $attackid; ?>" type="hidden"></input>
<input name="depth" value="1" type="hidden"></input> <input name="depth" value="1" type="hidden"></input>
<table> <table>
<tr> <tr>
<th colspan="2">Attacke</th> <th colspan="2">Attacke</th>
</tr> </tr>
<tr> <tr>
<td> <td>ID:</td>
ID: <td><?php echo $attackid; ?>
</td> </td>
<td> </tr>
<?php echo $attackid; ?> <tr>
</td> <td>Name:</td>
</tr> <td><input name='attackname'
<tr> value='<?php echo $row['name']===NULL?'Attackenname':$row['name']; ?>'></input>
<td> </td>
Name: </tr>
</td> <tr>
<td> <td>St&auml;rke:</td>
<input name='attackname' value='<?php echo $row['name']===NULL?'Attackenname':$row['name']; ?>'></input> <td><input name='starke'
</td> value='<?php echo $row['starke']===NULL?0:$row['starke']; ?>'></input>
</tr> </td>
<tr> </tr>
<td> <tr>
St&auml;rke: <td>Verteidigung:</td>
</td> <td><input name='verteidigung'
<td> value='<?php echo $row['verteidigung']===NULL?0:$row['verteidigung']; ?>'></input>
<input name='starke' value='<?php echo $row['starke']===NULL?0:$row['starke']; ?>'></input> </td>
</td> </tr>
</tr> <tr>
<tr> <td>Speed:</td>
<td> <td><input name='speed'
Verteidigung: value='<?php echo $row['speed']===NULL?0:$row['speed']; ?>'></input>
</td> </td>
<td> </tr>
<input name='verteidigung' value='<?php echo $row['verteidigung']===NULL?0:$row['verteidigung']; ?>'></input> <tr>
</td> <td>HP:</td>
</tr> <td><input name='hp'
<tr> value='<?php echo $row['hp']===NULL?0:$row['hp']; ?>'></input>
<td> </td>
Speed: </tr>
</td> <tr>
<td> <td>MP:</td>
<input name='speed' value='<?php echo $row['speed']===NULL?0:$row['speed']; ?>'></input> <td><input name='mp'
</td> value='<?php echo $row['mp']===NULL?0:$row['mp']; ?>'></input>
</tr> </td>
<tr> </tr>
<td> <tr>
HP: <td>Rassen:</td>
</td> <td><input name='rassen'
<td> value='<?php echo $row['rassen']===NULL?0:$row['rassen']; ?>'></input>
<input name='hp' value='<?php echo $row['hp']===NULL?0:$row['hp']; ?>'></input> </td>
</td> </tr>
</tr> <tr>
<tr> <td>Level:</td>
<td> <td><input name='level'
MP: value='<?php echo $row['level']===NULL?0:$row['level']; ?>'></input>
</td> </td>
<td> </tr>
<input name='mp' value='<?php echo $row['mp']===NULL?0:$row['mp']; ?>'></input> <tr>
</td> <td>Geld:</td>
</tr> <td><input name='geld'
<tr> value='<?php echo $row['geld']===NULL?0:$row['geld']; ?>'></input>
<td> </td>
Rassen: </tr>
</td> <tr>
<td> <td>Type:</td>
<input name='rassen' value='<?php echo $row['rassen']===NULL?0:$row['rassen']; ?>'></input> <td><select name="type">
</td> <?php
</tr> $types = array('normal', 'kaioken', 'kaioken2', 'SSJ', 'lose', 'lose2', 'hpmp', 'hp', 'tausch', 'tausch2', 'majin', 'copy', 'runde', 'frucht', 'konterhp');
<tr> foreach ($types as $type) {
<td> if($row['type'] == $type){
Level: echo '<option value="'.$type.'" selected="selected">'.$type.'</option>';
</td> } else{
<td> echo '<option value="'.$type.'">'.$type.'</option>';
<input name='level' value='<?php echo $row['level']===NULL?0:$row['level']; ?>'></input> }
</td> }
</tr> ?>
<tr> </select>
<td> </td>
Geld: </tr>
</td> <tr>
<td> <td>Info:</td>
<input name='geld' value='<?php echo $row['geld']===NULL?0:$row['geld']; ?>'></input> <td><input name='info'
</td> value='<?php echo $row['info']===NULL?'No Info available yet!':$row['info']; ?>'></input>
</tr> </td>
<tr> </tr>
<td> <tr>
Type: <td>Required Attacks:</td>
</td> <td><select name="req_atk[0]">
<td> <?php
<input name='type' value='<?php echo $row['type']===NULL?'normal':$row['type']; ?>'></input> if($used_attacks[0] == 0){
</td> echo '<option value="0" selected="selected">-Keine-</option>';
</tr> } else {
<tr> echo '<option value="0">-Keine-</option>';
<td> }
Info: foreach ($available_attacks as $attack) {
</td> if($attack[0] == $used_attacks[0]){
<td> echo '<option value="'.$attack[0].'" selected="selected">'.$attack[1].'</option>';
<input name='info' value='<?php echo $row['info']===NULL?'No Info available yet!':$row['info']; ?>'></input> } else{
</td> echo '<option value="'.$attack[0].'">'.$attack[1].'</option>';
</tr> }
<tr> }
<td> ?>
Required Attacks: </select>
</td> </td>
<td> </tr>
<input name='req_atk' value='<?php echo $row['req_atk']===NULL?0:$row['req_atk']; ?>'></input> <tr>
</td> <td></td>
</tr> <td><select name="req_atk[1]">
<tr> <?php
<td> if($used_attacks[1] == 0){
Required Level: echo '<option value="0" selected="selected">-Keine-</option>';
</td> } else {
<td> echo '<option value="0">-Keine-</option>';
<input name='req_lvl' value='<?php echo $row['req_lvl']===NULL?0:$row['req_lvl']; ?>'></input> }
</td>
</tr> foreach ($available_attacks as $attack) {
<tr> if($attack[0] == $used_attacks[1]){
<td> echo '<option value="'.$attack[0].'" selected="selected">'.$attack[1].'</option>';
Frucht: } else{
</td> echo '<option value="'.$attack[0].'">'.$attack[1].'</option>';
<td> }
<select name = "Frucht"> }
<?php ?>
// Fuers dropdown </select>
$f_sql = 'SELECT id, item FROM wochen_markt WHERE type = \'Teufels Frucht\' order by item'; </td>
$f_qry = mysql_query($f_sql); </tr>
<tr>
// <input name='Frucht' value='<?php echo $row[Frucht]===NULL?0:$row[Frucht]; '></input> <td></td>
if($row['Frucht'] === NULL || $row['Frucht'] == 0){ <td><select name="req_atk[2]">
echo '<option value="0" selected="selected">-Keine-</option>'; <?php
} else { if($used_attacks[2] == 0){
echo '<option value="0">-Keine-</option>'; echo '<option value="0" selected="selected">-Keine-</option>';
} } else {
while($f_row = mysql_fetch_assoc($f_qry)){ echo '<option value="0">-Keine-</option>';
if($f_row['id'] == $row['Frucht']){ }
echo '<option value="'.$f_row['id'].'" selected="selected">'.$f_row['item'].'</option>';
} else{ foreach ($available_attacks as $attack) {
echo '<option value="'.$f_row['id'].'">'.$f_row['item'].'</option>'; if($attack[0] == $used_attacks[2]){
} echo '<option value="'.$attack[0].'" selected="selected">'.$attack[1].'</option>';
} } else{
echo '<option value="'.$attack[0].'">'.$attack[1].'</option>';
?> }
</select> }
</td> ?>
</tr> </select>
<tr> </td>
<td> </tr>
Runden: <tr>
</td> <td>Required Level:</td>
<td> <td><input name='req_lvl'
<input name='runden' value='<?php echo $row['runden']===NULL?0:$row['runden']; ?>'></input> value='<?php echo $row['req_lvl']===NULL?0:$row['req_lvl']; ?>'></input>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>Frucht:</td>
Maxlvl: <td><select name="Frucht">
</td> <?php
<td> // Fuers dropdown
<input name='maxlvl' value='<?php echo $row['maxlvl']===NULL?0:$row['maxlvl']; ?>'></input> $f_sql = 'SELECT id, item FROM wochen_markt WHERE type = \'Teufels Frucht\' order by item';
</td> $f_qry = mysql_query($f_sql);
</tr>
<tr> // <input name='Frucht' value='<?php echo $row[Frucht]===NULL?0:$row[Frucht]; '></input>
<td colspan="2"> if($row['Frucht'] === NULL || $row['Frucht'] == 0){
<input type="submit" value='<?php echo $action; ?>'></input> echo '<option value="0" selected="selected">-Keine-</option>';
</td> } else {
</tr> echo '<option value="0">-Keine-</option>';
<tr> }
<td> while($f_row = mysql_fetch_assoc($f_qry)){
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br> if($f_row['id'] == $row['Frucht']){
</td> echo '<option value="'.$f_row['id'].'" selected="selected">'.$f_row['item'].'</option>';
</tr> } else{
</table> echo '<option value="'.$f_row['id'].'">'.$f_row['item'].'</option>';
</form> }
<?php }
?>
</select>
</td>
</tr>
<tr>
<td>Runden:</td>
<td><input name='runden'
value='<?php echo $row['runden']===NULL?0:$row['runden']; ?>'></input>
</td>
</tr>
<tr>
<td>Maxlvl:</td>
<td><input name='maxlvl'
value='<?php echo $row['maxlvl']===NULL?0:$row['maxlvl']; ?>'></input>
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value='<?php echo $action; ?>'></input>
</td>
</tr>
<tr>
<td><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br>
</td>
</tr>
</table>
</form>
<?php
} }
function createAttack($attackname, $Frucht, $starke, $verteidigung, $speed, $hp, $mp, $rassen, $level, $geld, $type, $info, $req_atk, $req_lvl, $runden, $maxlvl) { function createAttack($attackname, $Frucht, $starke, $verteidigung, $speed, $hp, $mp, $rassen, $level, $geld, $type, $info, $req_atk, $req_lvl, $runden, $maxlvl) {
if($Frucht != 0){ if($Frucht != 0){
$sql = 'INSERT into attacken set name = \''.$attackname.'\', starke = '.$starke.', verteidigung = '.$verteidigung.', speed = '.$speed.', hp = '.$hp.', mp = '.$mp.', rassen = \''.$rassen.'\', level = '.$level.', geld = '.$geld.', type = \''.$type.'\', info = \''.$info.'\', req_atk = \''.$req_atk.'\', req_lvl = \''.$req_lvl.'\', Frucht = '.$Frucht.', runden = '.$runden.', maxlvl = '.$maxlvl; $sql = 'INSERT into attacken set name = \''.$attackname.'\', starke = '.$starke.', verteidigung = '.$verteidigung.', speed = '.$speed.', hp = '.$hp.', mp = '.$mp.', rassen = \''.$rassen.'\', level = '.$level.', geld = '.$geld.', type = \''.$type.'\', info = \''.$info.'\', req_atk = \''.$req_atk.'\', req_lvl = \''.$req_lvl.'\', Frucht = '.$Frucht.', runden = '.$runden.', maxlvl = '.$maxlvl;
} else { } else {
$sql = 'INSERT into attacken set name = \''.$attackname.'\', starke = '.$starke.', verteidigung = '.$verteidigung.', speed = '.$speed.', hp = '.$hp.', mp = '.$mp.', rassen = \''.$rassen.'\', level = '.$level.', geld = '.$geld.', type = \''.$type.'\', info = \''.$info.'\', req_atk = \''.$req_atk.'\', req_lvl = \''.$req_lvl.'\', runden = '.$runden.', maxlvl = '.$maxlvl; $sql = 'INSERT into attacken set name = \''.$attackname.'\', starke = '.$starke.', verteidigung = '.$verteidigung.', speed = '.$speed.', hp = '.$hp.', mp = '.$mp.', rassen = \''.$rassen.'\', level = '.$level.', geld = '.$geld.', type = \''.$type.'\', info = \''.$info.'\', req_atk = \''.$req_atk.'\', req_lvl = \''.$req_lvl.'\', runden = '.$runden.', maxlvl = '.$maxlvl;
} }
echo $sql.'<br>'; echo $sql.'<br>';
mysql_query($sql); mysql_query($sql);
logaction('Attacke '.$attackname.' wurde erstellt!'); logaction('Attacke '.$attackname.' wurde erstellt!');
?>Attacke sollte nun erstellt sein!!<br><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br><?php ?>
Attacke sollte nun erstellt sein!!
<br>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a>
<br>
<?php
} }
function deleteAttack($attackid, $depth) { function deleteAttack($attackid, $depth) {
if($depth == 4){ if($depth == 4){
$sql = 'Delete from attacken where id = '.$attackid; $sql = 'Delete from attacken where id = '.$attackid;
// echo 'Debugnachricht: '.$sql.'<br>'; // echo 'Debugnachricht: '.$sql.'<br>';
mysql_query($sql); mysql_query($sql);
mysql_query('Delete from lernen where at_id = '.$attackid); mysql_query('Delete from lernen where at_id = '.$attackid);
logaction('Attacke mit id = '.$attackid.' wurde geloescht!'); logaction('Attacke mit id = '.$attackid.' wurde geloescht!');
} else{ } else{
for($i=0;$i<$depth;$i++){ for($i=0;$i<$depth;$i++){
$wirklich .= 'wirklich '; $wirklich .= 'wirklich ';
}
?>Sind sie sich <?php echo $wirklich; ?> sicher?? <a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken&action=delete&attackid=<?php echo $attackid; ?>&depth=<?php echo $depth+1; ?>">ja</a><br><?php
} }
?><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br><?php ?>
Sind sie sich
<?php echo $wirklich; ?>
sicher??
<a
href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken&action=delete&attackid=<?php echo $attackid; ?>&depth=<?php echo $depth+1; ?>">ja</a>
<br>
<?php
}
?>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a>
<br>
<?php
} }
function editAttack($attackname, $attackid, $Frucht, $starke, $verteidigung, $speed, $hp, $mp, $rassen, $level, $geld, $type, $info, $req_atk, $req_lvl, $runden, $maxlvl) { function editAttack($attackname, $attackid, $Frucht, $starke, $verteidigung, $speed, $hp, $mp, $rassen, $level, $geld, $type, $info, $req_atk, $req_lvl, $runden, $maxlvl) {
$row = mysql_fetch_assoc(mysql_query('Select * from attacken where id ='.$attackid)); $row = mysql_fetch_assoc(mysql_query('Select * from attacken where id ='.$attackid));
if($Frucht != 0){ $req_atk = implode(',', $req_atk);
$sql = 'UPDATE attacken set name = \''.htmlspecialchars(urldecode($attackname)).'\', starke = '.$starke.', verteidigung = '.$verteidigung.', speed = '.$speed.', hp = '.$hp.', mp = '.$mp.', rassen = \''.$rassen.'\', level = '.$level.', geld = '.$geld.', type = \''.$type.'\', info = \''.$info.'\', req_atk = \''.$req_atk.'\', req_lvl = \''.$req_lvl.'\', Frucht = '.$Frucht.', runden = '.$runden.', maxlvl = '.$maxlvl.' where id = '.$attackid;
} else { if($Frucht != 0){
$sql = 'UPDATE attacken set name = \''.htmlspecialchars(urldecode($attackname)).'\', starke = '.$starke.', verteidigung = '.$verteidigung.', speed = '.$speed.', hp = '.$hp.', mp = '.$mp.', rassen = \''.$rassen.'\', level = '.$level.', geld = '.$geld.', type = \''.$type.'\', info = \''.$info.'\', req_atk = \''.$req_atk.'\', req_lvl = \''.$req_lvl.'\', Frucht = NULL, runden = '.$runden.', maxlvl = '.$maxlvl.' where id = '.$attackid; $sql = 'UPDATE attacken set name = \''.htmlspecialchars(urldecode($attackname)).'\', starke = '.$starke.', verteidigung = '.$verteidigung.', speed = '.$speed.', hp = '.$hp.', mp = '.$mp.', rassen = \''.$rassen.'\', level = '.$level.', geld = '.$geld.', type = \''.$type.'\', info = \''.$info.'\', req_atk = \''.$req_atk.'\', req_lvl = \''.$req_lvl.'\', Frucht = '.$Frucht.', runden = '.$runden.', maxlvl = '.$maxlvl.' where id = '.$attackid;
} } else {
if($row['name'] != $attackname){ $sql = 'UPDATE attacken set name = \''.htmlspecialchars(urldecode($attackname)).'\', starke = '.$starke.', verteidigung = '.$verteidigung.', speed = '.$speed.', hp = '.$hp.', mp = '.$mp.', rassen = \''.$rassen.'\', level = '.$level.', geld = '.$geld.', type = \''.$type.'\', info = \''.$info.'\', req_atk = \''.$req_atk.'\', req_lvl = \''.$req_lvl.'\', Frucht = NULL, runden = '.$runden.', maxlvl = '.$maxlvl.' where id = '.$attackid;
mysql_query('Update lernen set name = \''.$attackname.'\' WHERE at_id ='.$attackid); }
} if($row['name'] != $attackname){
// echo 'Debugnachricht: '.$sql.'<br>'; mysql_query('Update lernen set name = \''.$attackname.'\' WHERE at_id ='.$attackid);
mysql_query($sql); }
logaction('Attacke mit dem jetzigen Namen '.$attackname.' wurde editiert!'); // echo 'Debugnachricht: '.$sql.'<br>';
mysql_query($sql);
logaction('Attacke mit dem jetzigen Namen '.$attackname.' wurde editiert!');
?><a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken">Zum Attackenmenü</a>, <a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a><br><?php ?>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=attacken">Zum
Attackenmenü</a>
,
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a>
<br>
<?php
} }

Loading…
Cancel
Save