Ville de la météo modifiable

This commit is contained in:
Chouchen
2010-09-15 21:36:14 +00:00
parent f52b55ed1e
commit e5415117a1
5 changed files with 118 additions and 17 deletions

View File

@@ -1,20 +1,22 @@
<?// Escaping the input data:
$clock = $_POST['clock'];
$meteo = $_POST['meteo'];
$notes = $_POST['notes'];
$search = $_POST['search'];
$links = $_POST['links'];
$blogs = $_POST['blogs'];
//TODO automatisation ! Je veux plus de "$config_xml[x]"
$clock = $_POST['clock'];
$weather = $_POST['weather'];
$notes = $_POST['notes'];
$search = $_POST['search'];
$links = $_POST['links'];
$blogs = $_POST['blogs'];
$todo = $_POST['todo'];
$xmla = simplexml_load_file('../db/config.xml');
$config_xml = $xmla->item;
$config_xml[0]->visibility = $clock;
$config_xml[1]->visibility = $meteo;
$config_xml[1]->visibility = $weather;
$config_xml[2]->visibility = $notes;
$config_xml[3]->visibility = $search;
$config_xml[4]->visibility = $links;
$config_xml[5]->visibility = $blogs;
$config_xml[6]->visibility = $todo;
$xmla->asXML('../db/config.xml');
echo "1";

10
ajax/update-city.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
// Error reporting
error_reporting(E_ALL^E_NOTICE);
// Escaping:
$city = $_GET['city'];
include '../class/AccueilModules.php';
echo AccueilModules::updateModule('weather', array('city'=>$city));
?>