Accueil/ajax/post-config.php

30 lines
932 B
PHP
Raw Normal View History

2010-09-14 23:38:29 +02:00
<?// Escaping the input data:
2010-09-15 23:36:14 +02:00
//TODO automatisation ! Je veux plus de "$config_xml[x]"
2010-09-21 17:09:31 +02:00
$clock = $_POST['clock'];
$weather = $_POST['weather'];
$notes = $_POST['notes'];
$search = $_POST['search'];
$links = $_POST['links'];
$blogs = $_POST['blogs'];
$todo = $_POST['todo'];
$clockAdvanced = $_POST['clockAdvanced'];
$rssblogs = $_POST['rssblogs'];
$news = $_POST['news'];
2010-09-14 23:38:29 +02:00
$xmla = simplexml_load_file('../db/config.xml');
$config_xml = $xmla->item;
$config_xml[0]->visibility = $clock;
2010-09-15 23:36:14 +02:00
$config_xml[1]->visibility = $weather;
2010-09-14 23:38:29 +02:00
$config_xml[2]->visibility = $notes;
$config_xml[3]->visibility = $search;
$config_xml[4]->visibility = $links;
$config_xml[5]->visibility = $blogs;
2010-09-15 23:36:14 +02:00
$config_xml[6]->visibility = $todo;
2010-09-21 17:09:31 +02:00
$config_xml[7]->visibility = $clockAdvanced;
$config_xml[8]->visibility = $rssblogs;
$config_xml[9]->visibility = $news;
2010-09-14 23:38:29 +02:00
$xmla->asXML('../db/config.xml');
echo "1";
?>