Jeremy DUCOURTHIAL 3 years ago
commit 28316a6711

@ -15,7 +15,6 @@ class ControllerAdmin {
switch($action) {
case "goToAdminConnexion":
require($vues['adminConnexion']);
header("location:".$vues['adminConnexion']);
break;
case "goToAdministration":
$gatewaySources = new GatewaySources(new Connection($dsn,$user,$pass));
@ -89,7 +88,7 @@ class ControllerAdmin {
$gate = new GatewaySources(new Connection($dsn, $user, $pass));
$gate->deleteSources($_REQUEST["idSource"]);
}
header("location: ".$vues['administration']);
header("location: index.php?action=goToAdministration");
}
function setNbArticlesParPage(){

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

@ -1,31 +1,26 @@
<!doctype html>
<link href="css/administration.css" rel="stylesheet" type="text/css">
<html>
<div id="pageRight">
<div id="listSources">
<div>
<?php
<form action="index.php?action=ajoutSource" method="POST">
<input type="text" name="linkSource" placeholder="source" />
<input type="submit" value="add source">
</form>
</html>
<?php
foreach ($listeSources as $n){
echo '<form action="index.php?action=supprimerSource&idSource='.$n->getlink().'">';
echo "<div class=source>";
echo "<p id=link>";
echo $n->getlink();
echo "</p>";
echo '<input type="submit" value="x">';
echo "</div>";
echo "</form>";
}
?>
</div>
<div id="listSourceBottom">
<form action="../index.php?action=ajoutSource" method="POST">
<input type="text" name="linkSource" placeholder="source" />
<input type="submit" value="add source">
</form>
</div>
</div>
<div id="refresh">
<form action="index.php">
?>
<form action="index.php">
<input type="hidden" name="action" value="refreshData">
<input type="submit" id="buttonRefresh" value="refresh">
</form>
</div>
</div>
</html>
<input type="submit" value="refresh">
</form>
Loading…
Cancel
Save