Files
ajax
addSiteXML.php
delete-notes.php
post-config.php
post-notes.php
saveTodoist.php
update-city.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
Accueil/ajax/addSiteXML.php
2010-09-14 21:38:29 +00:00

26 lines
508 B
PHP

<?
$number = $_POST['number'];
$url = $_POST['url'];
$name = $_POST['name'];
$nb = 1;
$xmla = simplexml_load_file('../db/blog_links.xml');
$test = $xmla->note;
$field_count = count($test);
for($i=0;$i<$field_count;$i++){
if($nb <= $test[$i]['id']) $nb = $test[$i]['id']+1;
}
$newnote = $xmla->addChild('link');
$newnote->addChild('name', $name);
$newnote->addChild('number', $number);
$newnote->addChild('url', $url);
$xmla->asXML('../db/blog_links.xml');
echo $nb;
?>