You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
763 B

<?php
class GestControler {
function __construct() {
try{
$m = new ModelGest();
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "default";
switch($action){
case "connecting":
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
$m->connect($username, $password);
break;
case "wantToSignIn":
require('vues/signin.php');
break;
case "signin":
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
$password2 = $_REQUEST['password2'];
$
case "wantToConnect":
$m->signin($username, $password, $password2);
break;
default:
require("vues/connect.php");
break;
}
}catch(Exception $e){
echo $e->message;
}
}
}