source modif

master
Jeremy DUCOURTHIAL 3 years ago
parent 2614948a67
commit 1587a63084

@ -1,44 +1,41 @@
<html>
<body>
<?php
require_once("connection.php");
require_once("gatewayNews.php");
require_once("gatewayAdmins.php");
$user= 'jeducourth';
$pass='achanger';
$dsn='mysql:host=localhost;dbname=dbjeducourth';
$title="titre";
$description="descirption du titre";
$pubdate="2022-04-12 8:8:8";
$link="exemple.com";
try{
$con = new Connection($dsn,$user,$pass);
$gateNews = new GatewayNews($con);
$gateNews->addNews(new News($title,$description,$pubdate,$link));
$gateAdmin = new gatewayAdmin($con);
$gateAdmin->addAdmin(new admin("toto","tata"));
/*$results=$gateNews->getNews();
Foreach ($results as $new){
print $new->getTitle()."<br>".$new->getDescription()."<br>".$new->getPubDate()."<br>".$new->getLink()."<br><br>";
}*/
require("listeNews.php");
<body>
<?php
require_once("connection.php");
require_once("gatewayNews.php");
require_once("gatewayAdmins.php");
$user= 'jeducourth';
$pass='achanger';
$dsn='mysql:host=localhost;dbname=dbjeducourth';
$title="titre";
$description="descirption du titre";
$pubdate="2022-04-12 8:8:8";
$link="exemple.com";
try{
$con = new Connection($dsn,$user,$pass);
$gateNews = new GatewayNews($con);
$gateNews->addNews(new News($title,$description,$pubdate,$link));
$gateAdmin = new gatewayAdmin($con);
$gateAdmin->addAdmin(new admin("toto","tata"));
}
catch( PDOException $Exception ) {
echo 'erreur';
echo $Exception->getMessage();
}
?>
</body>
/*$results=$gateNews->getNews();
Foreach ($results as $new){
print $new->getTitle()."<br>".$new->getDescription()."<br>".$new->getPubDate()."<br>".$new->getLink()."<br><br>";
}*/
require("listeNews.php");
}
catch( PDOException $Exception ) {
echo 'erreur';
echo $Exception->getMessage();
}
?>
</body>
</html>

@ -1,7 +1,7 @@
<?php
class sources
{
public string lien;
private string $lien;
public function __construct(string $lien)
{

Loading…
Cancel
Save