2010-09-14 23:38:29 +02:00
|
|
|
<?
|
|
|
|
$xmla = simplexml_load_file('../db/todoist.xml');
|
2010-09-15 11:54:20 +02:00
|
|
|
if(isset($_POST['token'])){
|
|
|
|
$token = trim($_POST['token']);
|
2010-09-14 23:38:29 +02:00
|
|
|
|
|
|
|
$xmla->addChild("token", $token);
|
|
|
|
|
|
|
|
$xmla->asXML('../db/todoist.xml');
|
|
|
|
|
2010-09-15 11:54:20 +02:00
|
|
|
echo "ok";
|
|
|
|
}else if(isset($_POST['name']) && isset($_POST['id'])){
|
|
|
|
$name = trim($_POST['name']);
|
|
|
|
$id = trim($_POST['id']);
|
2010-09-14 23:38:29 +02:00
|
|
|
|
|
|
|
$xmla->addChild("name", $name);
|
|
|
|
$xmla->addChild("id", $id);
|
|
|
|
|
|
|
|
$xmla->asXML('../db/todoist.xml');
|
|
|
|
|
2010-09-15 11:54:20 +02:00
|
|
|
echo "ok";
|
2010-09-14 23:38:29 +02:00
|
|
|
}
|