ajax
addSiteXML.php
delete-notes.php
listToReserve.php
loadReserve.php
post-config.php
post-notes.php
reserveToList.php
saveTodoist.php
update-city.php
update-links-order.php
update.php
update_position.php
update_position_config.php
class
css
db
images
js
.htaccess
CURL.php
GoogleMeteo.php
addSite.php
add_note.html
blogs.php
blogs_last_post.php
calculator.html
config.php
getProjectsList.php
getUncompletedTasks.php
index.php
install-todoist.php
meteo.php
notepad.html
notes_extract.php
26 lines
422 B
PHP
26 lines
422 B
PHP
<?// Escaping the input data:
|
|
|
|
$rid = $_POST['id'];
|
|
$explodeid = explode("-",$rid);
|
|
$id = intval($explodeid[1]);
|
|
|
|
|
|
$xmla = simplexml_load_file('../db/notes.xml');
|
|
|
|
$target = false;
|
|
$i = 0;
|
|
|
|
foreach ($xmla->note as $s) {
|
|
if ($s['id']==$id) { $target = $i; break; }
|
|
$i++;
|
|
}
|
|
if ($target !== false) {
|
|
unset($xmla->note[$target]);
|
|
}
|
|
|
|
$xmla->asXML('../db/notes.xml');
|
|
|
|
$target++;
|
|
echo $target;
|
|
?>
|