<?php
session_start();
include_once 'config.php';
$url='preferences.php';
if(isset($_SESSION['connected'])){
echo '<script type="text/javascript">window.location="'.$url.'";</script>';
exit;
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Connexion</title>
<!--<script src="./jquery-ui-1.12.1/external/jquery/jquery.js"></script>-->
<script src='http://code.jquery.com/jquery.js'></script>
<link rel="stylesheet" href="./assets/css/style.css">
</head>
<body>
<?php if (helpuser!=true) echo "<style> #clictoconnect td {border: none; }</style>";?>
<div id="content">
<form id="connexion" method="POST">
<fieldset><legend>Connexion</legend><div id="manage2" ></div>
<p><span id="to_remove">Enter your username,phone number or email here </span><br><br><!--<label for="identity">Identity :</label>--><input type="text" id="identity" name="identity" value="" placeholder="identity"/></p><p>
<div id="manage" ></div><p><input type="button" value="Check" id="check" /></P>
</p>
</fieldset></form>
<script>
jQuery(document).ready(function($){
$('#check').click(function(e){ e.preventDefault(); $("#manage").html('<img src="assets/img/loader.gif" alt="Uploading...." class="little"/>'); $.post('doconnect.php', {identity : $('#identity').val() }, function(data){
$("#manage").html('<p>'+data+'</p>');
$('#check').remove();
$('#to_remove').remove();
}, 'text' ); });
}
);
</script>
</div>
</body>
</html>
|