parent
33d3199a06
commit
a224f78204
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
require_once("gatewaySources.php");
|
||||
|
||||
class controllerAdmin {
|
||||
|
||||
function __construct() {
|
||||
session_start();
|
||||
try
|
||||
{
|
||||
$action=$_REQUEST['action'];
|
||||
switch($action) {
|
||||
case NULL:
|
||||
break;
|
||||
case "ajoutSource":
|
||||
$this->ajoutSource();
|
||||
break;
|
||||
case "suprimerSource":
|
||||
$this->suprimerSource();
|
||||
break;
|
||||
case "setNbArticlesParPage":
|
||||
$this->setNbArticlesParPage();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
catch (PDOException $e)
|
||||
{
|
||||
// $dataVueEreur[] = "Erreur inattendue!!! ";
|
||||
// require(__DIR__.'/../vues/erreur.php');
|
||||
}
|
||||
catch (Exception $e2)
|
||||
{
|
||||
// $dataVueEreur[] = "Erreur inattendue!!! ";
|
||||
// require ($rep.$vues['erreur']);
|
||||
}
|
||||
}
|
||||
|
||||
function ajoutSource() {
|
||||
$user= 'jeducourth';
|
||||
$pass='achanger';
|
||||
$dsn='mysql:host=localhost;dbname=dbjeducourth';
|
||||
$con = new Connection($dsn,$user,$pass);
|
||||
|
||||
$mdl = new GatewaySources($con);
|
||||
$mdl->addSources("bonjour.com");
|
||||
//require('menuAdmin.php');
|
||||
}
|
||||
|
||||
function suprimerSource() {
|
||||
//$mdl = new GatewaySource();
|
||||
//$mdl->suprSource();
|
||||
//require('menuAdmin.php');
|
||||
}
|
||||
|
||||
function setNbArticlesParPage(){
|
||||
|
||||
//require('menuAdmin.php');
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in new issue