Change <? to <?php and add some formatting
parent
2d5ba7fb8d
commit
fb71f8c112
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Notes>
|
||||
|
||||
|
||||
|
||||
<note id="2"><text>Test de post-it.</text><color>green</color><zindex>1</zindex><top>153</top><left>53</left></note><note id="7"><text>/!\ C'est bien fait ? :)</text><color>yellow</color><zindex>1</zindex><top>85</top><left>1038</left></note><note id="10"><text>Des améliorations ?</text><color>yellow</color><zindex>1</zindex><top>264</top><left>1038</left></note></Notes>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Notes>
|
||||
|
||||
|
||||
|
||||
<note id="2"><text>Test de post-it.</text><color>green</color><zindex>1</zindex><top>153</top><left>53</left></note><note id="7"><text>/!\ C'est bien fait ? :)</text><color>yellow</color><zindex>1</zindex><top>68</top><left>252</left></note><note id="10"><text>Des améliorations ?</text><color>yellow</color><zindex>2</zindex><top>264</top><left>247</left></note></Notes>
|
||||
|
@ -1,21 +1 @@
|
||||
<?
|
||||
$xmla = simplexml_load_file('../db/todoist.xml');
|
||||
if(isset($_POST['token'])){
|
||||
$token = trim($_POST['token']);
|
||||
|
||||
$xmla->addChild("token", $token);
|
||||
|
||||
$xmla->asXML('../db/todoist.xml');
|
||||
|
||||
echo "ok";
|
||||
}else if(isset($_POST['name']) && isset($_POST['id'])){
|
||||
$name = trim($_POST['name']);
|
||||
$id = trim($_POST['id']);
|
||||
|
||||
$xmla->addChild("name", $name);
|
||||
$xmla->addChild("id", $id);
|
||||
|
||||
$xmla->asXML('../db/todoist.xml');
|
||||
|
||||
echo "ok";
|
||||
}
|
||||
<?php
$xmla = simplexml_load_file('../db/todoist.xml');
if (isset($_POST['token'])) {
$token = trim($_POST['token']);
$xmla->addChild("token", $token);
$xmla->asXML('../db/todoist.xml');
echo "ok";
} else if (isset($_POST['name']) && isset($_POST['id'])) {
$name = trim($_POST['name']);
$id = trim($_POST['id']);
$xmla->addChild("name", $name);
$xmla->addChild("id", $id);
$xmla->asXML('../db/todoist.xml');
echo "ok";
}
|
File diff suppressed because one or more lines are too long
@ -1,12 +1 @@
|
||||
<?
|
||||
$xmla = simplexml_load_file('../db/todoist.xml');
|
||||
if($xmla->token== '' || $xmla->token == null)
|
||||
header('Location: install-todoist.php');
|
||||
if($xmla->id != '' || $xmla->id != null):
|
||||
$token = $xmla->token;
|
||||
$id = $xmla->id;?>
|
||||
|
||||
<script type="text/javascript" src="../js/getUncompletedTasks.php?token=<?=$token?>&id=<?=$id?>"></script>
|
||||
<? else:
|
||||
header('Location: getProjectsList.php');
|
||||
endif;
|
||||
<?php
$xmla = simplexml_load_file('../db/todoist.xml');
if($xmla->token== '' || $xmla->token == null)
header('Location: install-todoist.php');
if($xmla->id != '' || $xmla->id != null):
$token = $xmla->token;
$id = $xmla->id;?>
<script type="text/javascript" src="../js/getUncompletedTasks.php?token=<?php echo $token; ?>&id=<?php echo $id; ?>"></script>
<?php else:
header('Location: getProjectsList.php');
endif;
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,38 +1,45 @@
|
||||
<?php
|
||||
require('class/GoogleWeather.class.php');
|
||||
|
||||
//ça récupère un truc du style : http://www.google.com/ig/api?weather=paris&hl=fr
|
||||
if($ville != '' || $ville != null){
|
||||
$gweather = new GoogleWeatherAPI($ville,'fr');
|
||||
|
||||
if($gweather->isFound()) {
|
||||
$city = $gweather->getCity();
|
||||
$currentTemp = $gweather->getCurrent();
|
||||
$forecastTemp = $gweather->getForecast();
|
||||
|
||||
$present_weather = 'Actuellement : '.$currentTemp['temp_c'].'°C - '.$currentTemp['condition'];
|
||||
$i=0;
|
||||
foreach($forecastTemp as $temp) {
|
||||
${'future_weather'.$i} = $temp['day_of_week'].' : '.$temp['low'].'°C | '.$temp['high'].'°C - '.$temp['condition'];
|
||||
$i++;
|
||||
}
|
||||
require('class/GoogleWeather.class.php');
|
||||
$present_weather = null;
|
||||
//ça récupère un truc du style : http://www.google.com/ig/api?weather=paris&hl=fr
|
||||
if ( !empty($ville) ) {
|
||||
$google_weather = new GoogleWeatherAPI($ville, 'fr');
|
||||
|
||||
if(strpos(strtolower($present_weather),"soleil") !== false) {?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/soleil.css">
|
||||
<?}
|
||||
if(strpos(strtolower($present_weather),"nuage") !== false) {?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/nuage.css">
|
||||
<?}
|
||||
if(strpos(strtolower($present_weather),"peu nuageux") !== false) {?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/peunuage.css">
|
||||
<?}
|
||||
if((strpos(strtolower($present_weather),"pluie") !== false) || (strpos(strtolower($present_weather),"averse") !== false)) {?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/pluie.css">
|
||||
<?}
|
||||
if(strpos(strtolower($present_weather),"neige") !== false) {?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/neige.css">
|
||||
<?}
|
||||
}else{ $present_weather = 'Ville non trouvé : '.$city; }
|
||||
}else
|
||||
$present_weather = 'Ville non renseignée';
|
||||
|
||||
if ($google_weather->isFound()) {
|
||||
$city = $google_weather->getCity();
|
||||
$currentTemp = $google_weather->getCurrent();
|
||||
$forecastTemp = $google_weather->getForecast();
|
||||
|
||||
$present_weather = 'Actuellement : ' . $currentTemp['temp_c'] . '°C - ' . $currentTemp['condition'];
|
||||
$future_weather = [];
|
||||
foreach ($forecastTemp as $temp) {
|
||||
$future_weather[] = $temp['day_of_week'] . ' : ' . $temp['low'] . '°C | ' . $temp['high'] . '°C - ' . $temp['condition'];
|
||||
}
|
||||
|
||||
if (strpos(strtolower($present_weather), "soleil") !== false) { ?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/soleil.css">
|
||||
<?php
|
||||
}
|
||||
if (strpos(strtolower($present_weather), "nuage") !== false) { ?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/nuage.css">
|
||||
<?php
|
||||
}
|
||||
if (strpos(strtolower($present_weather), "peu nuageux") !== false) { ?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/peunuage.css">
|
||||
<?php
|
||||
}
|
||||
if ((strpos(strtolower($present_weather), "pluie") !== false) || (strpos(strtolower($present_weather), "averse") !== false)) { ?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/pluie.css">
|
||||
<?php
|
||||
}
|
||||
if (strpos(strtolower($present_weather), "neige") !== false) { ?>
|
||||
<link rel="stylesheet" type="text/css" href="modules/weather/css/neige.css">
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
$present_weather = 'Ville non trouvé : ' . $ville;
|
||||
}
|
||||
} else {
|
||||
$present_weather = 'Ville non renseignée';
|
||||
}
|
||||
|
Loading…
Reference in New Issue