|
|
@ -6,9 +6,7 @@ class VisitorController
|
|
|
|
|
|
|
|
|
|
|
|
function __construct()
|
|
|
|
function __construct()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
echo "before Vistor\n";
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
echo "Visitor controller\n";
|
|
|
|
|
|
|
|
global $dsn, $rep, $vues, $error;
|
|
|
|
global $dsn, $rep, $vues, $error;
|
|
|
|
$model = new VisitorModel();
|
|
|
|
$model = new VisitorModel();
|
|
|
|
$action = $_REQUEST['action'];
|
|
|
|
$action = $_REQUEST['action'];
|
|
|
@ -36,15 +34,15 @@ class VisitorController
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
$error = "Action non valide";
|
|
|
|
$error = "Action non valide";
|
|
|
|
// require($rep . $vues['erreur']);
|
|
|
|
require($rep . $vues['erreur']);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
$error = $e->getMessage();
|
|
|
|
$error = $e->getMessage();
|
|
|
|
// require($rep . $vues['erreur']);
|
|
|
|
require($rep . $vues['erreur']);
|
|
|
|
} catch (Exception $e2) {
|
|
|
|
} catch (Exception $e2) {
|
|
|
|
$error = $e2->getMessage();
|
|
|
|
$error = $e2->getMessage();
|
|
|
|
// require($rep . $vues['erreur']);
|
|
|
|
require($rep . $vues['erreur']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|