Beispiel #1
0
					$data['h'] = $_POST['h'];
					$data['mip'] = $_POST['m'];
					$data['sprite_id'] = $_POST['sprite_id'];
					if(DATABASE::insert("sprite_frame",$data)) echo "Frame created successfully.";

				break;

				case "edititem":

					$data['name'] = $_POST['name'];
					$data['x'] = $_POST['x'];
					$data['y'] = $_POST['y'];
					$data['w'] = $_POST['w'];
					$data['h'] = $_POST['h'];
					$data['mip'] = $_POST['m'];
					if(DATABASE::update("sprite_frame",array("sprite_frame_id"=>$_REQUEST['sprite_frame_id']),$data)) echo "Frame updated successfully.";

				break;

				case "deleteitem":

					$frame = DATABASE::record("sprite_frame","sprite_frame_id",$_GET['id']);

					if(isset($_GET['confirm']) && $_GET['confirm'] == "true")
					{
						$data['sprite_frame_id'] = $_GET['id'];
						if(DATABASE::delete("sprite_frame",$data)) echo "Sprite frame deleted successfully.<br>";
						die();
					}
					?>
						<div>