Creation of the world
This commit is contained in:
22
ajax/update_position.php
Normal file
22
ajax/update_position.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
// Error reporting
|
||||
error_reporting(E_ALL^E_NOTICE);
|
||||
|
||||
// Validating the input data:
|
||||
if(!is_numeric($_GET['id']) || !is_numeric($_GET['x']) || !is_numeric($_GET['y']) || !is_numeric($_GET['z']))
|
||||
die("0");
|
||||
|
||||
// Escaping:
|
||||
$id = (int)$_GET['id'];
|
||||
$x = (int)$_GET['x'];
|
||||
$y = (int)$_GET['y'];
|
||||
$z = (int)$_GET['z'];
|
||||
|
||||
|
||||
// Saving the position and z-index of the note:
|
||||
$xmla = simplexml_load_file('../db/notes.xml');
|
||||
|
||||
$target = -1;
|
||||
$i = 0;
|
||||
|
||||
foreach ($xmla->note as $s) {
|
Reference in New Issue
Block a user