'); } } else { @unlink($filepath.$icon_name); $error = "picture is to big max 300/300px"; die('ERROR: '.$error.'

'); } safe_query("INSERT INTO ".PREFIX."games ( name, tag ) values( '$name', '$tag' ) "); } else { die('ERROR: Please fill all fields.

'); } } elseif($_POST['saveedit']) { safe_query("UPDATE ".PREFIX."games SET name='".$_POST['name']."', tag='".$_POST['tag']."' WHERE gameID='".$_POST['gameID']."'"); } elseif($_GET['delete']) { safe_query("DELETE FROM ".PREFIX."games WHERE gameID='".$_GET['gameID']."'"); } echo'

games

'; if($_GET['action']=="add") { echo'
game-name:
game-tag:
game-picture:
 
'; } elseif($_GET['action']=="edit") { $gameID = $_GET['gameID']; $ergebnis=safe_query("SELECT * FROM ".PREFIX."games WHERE gameID='$gameID'"); $ds=mysql_fetch_array($ergebnis); echo'
games-name:
games-tag:
'; } else { echo'

'; $ergebnis=safe_query("SELECT * FROM ".PREFIX."games ORDER BY name"); echo''; while($ds=mysql_fetch_array($ergebnis)) { echo''; } echo'
game-name: Actions:
'.$ds[name].'
'; } ?>