Bastien OLLIER 3 years ago
commit 82526a93f4

@ -0,0 +1,13 @@
<?php
//préfixe
$rep=__DIR__.'/../';
//BD
$user= 'jeducourth';
$pass='achanger';
$dsn='mysql:host=localhost;dbname=dbjeducourth';
//Vues
//$vues['erreur']='vues/erreur.php';
//$vues['visitor']='vues/vuephp1.php';
//$vues['adminConnextion']='vues/vuephp1.php';
//$vues['adminParameter']='vues/vuephp1.php';
?>

@ -15,6 +15,14 @@ class GatewaySources
) )
); );
} }
public function deleteSources($idSource)
{
$query = "delete from sources where :idsource;";
$this->con->executeQuery($query, array(':idsource' => array($idSource, PDO::PARAM_INT)
)
);
}
} }
?> ?>

@ -7,6 +7,8 @@
//require_once("gatewaySources.php"); //require_once("gatewaySources.php");
require_once("ControllerAdmin.php"); require_once("ControllerAdmin.php");
//chargement config
require_once("config.php");
//$user= 'jeducourth'; //$user= 'jeducourth';
//$pass='achanger'; //$pass='achanger';
@ -19,7 +21,7 @@
*/ */
$controller = new ControllerAdmin(); $controller = new ControllerAdmin();
/*try{ try{
$con = new Connection($dsn,$user,$pass); $con = new Connection($dsn,$user,$pass);
$gateNews = new GatewayNews($con); $gateNews = new GatewayNews($con);
$gateNews->addNews(new News($title,$description,$pubdate,$link)); $gateNews->addNews(new News($title,$description,$pubdate,$link));
@ -30,6 +32,8 @@
$sources->addSources(new sources($link)); $sources->addSources(new sources($link));
require("listeNews.php"); require("listeNews.php");
@ -37,7 +41,7 @@
catch( PDOException $Exception ) { catch( PDOException $Exception ) {
echo 'erreur'; echo 'erreur';
echo $Exception->getMessage(); echo $Exception->getMessage();
}*/ }
?> ?>
</body> </body>

Loading…
Cancel
Save