
6 changed files with 42 additions and 35 deletions
@ -1,21 +1,21 @@
|
||||
<?
|
||||
$xmla = simplexml_load_file('../db/todoist.xml');
|
||||
if(isset($_GET['token'])){
|
||||
$token = trim($_GET['token']);
|
||||
if(isset($_POST['token'])){
|
||||
$token = trim($_POST['token']);
|
||||
|
||||
$xmla->addChild("token", $token);
|
||||
|
||||
$xmla->asXML('../db/todoist.xml');
|
||||
|
||||
echo $token;
|
||||
}else if(isset($_GET['name']) && isset($_GET['id'])){
|
||||
$name = trim($_GET['name']);
|
||||
$id = trim($_GET['id']);
|
||||
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 $id;
|
||||
echo "ok";
|
||||
} |
@ -0,0 +1,24 @@
|
||||
<? |
||||
$xmla = simplexml_load_file('db/todoist.xml'); |
||||
if($xmla->token == '' || $xmla->token == null):?> |
||||
<html> |
||||
<head> |
||||
<title>Todoist : Login</title> |
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
||||
<script type="text/javascript" src="js/index.js"></script> |
||||
|
||||
</head> |
||||
<body> |
||||
<fieldset> |
||||
<input type="text" name="email" id="email"/><br/> |
||||
<input type="password" name="password" id="password"/> |
||||
<span id="loginBtn">Cliquez ici pour vous identifier</span> |
||||
<div id="error"></div> |
||||
</fieldset> |
||||
</body> |
||||
</html> |
||||
<? |
||||
else: |
||||
header('Location: getProjectsList.php'); |
||||
endif; |
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue