generated from Templates_CodeFirst/templateHtmlCss
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.2 KiB
59 lines
1.2 KiB
<html>
|
|
|
|
<body>
|
|
|
|
<?php
|
|
|
|
require_once("connection.php");
|
|
require_once('tacheGateway.php');
|
|
require_once('userGateway.php');
|
|
require_once("listeGateway.php");
|
|
require_once('user.php');
|
|
|
|
//A CHANGER
|
|
$user= 'thchazot1';
|
|
$pass='achanger';
|
|
$dsn='mysql:host=localhost;dbname=dbthchazot1';
|
|
|
|
$id=1;
|
|
$name='Argent';
|
|
$content='Argent, Encore de l\'argent';
|
|
|
|
|
|
try{
|
|
$con=new Connection($dsn,$user,$pass);
|
|
|
|
$u=new User(1, "test", "mdp");
|
|
$t=new Tache($id, $name, $content, true);
|
|
$t1=new Tache(478, "TEST", $content, false);
|
|
$l=new Liste(6, "test", false, null, array($t, $t1));
|
|
|
|
$tacheGateway=new TacheGateway($con);
|
|
$userGateway=new UserGateway($con);
|
|
$listeGateway=new ListeGateway($con);
|
|
|
|
|
|
$listeGateway->insert($l);
|
|
|
|
/*
|
|
$tacheGateway->delete($t);
|
|
$user=$userGateway->insert(new User(1, "test", "mdp"));
|
|
$user=$userGateway->findByNamePassword("test", "mdp");
|
|
print($user);
|
|
$gateway->insert($t, 1);
|
|
|
|
$tabTache=$gateway->getTacheFromIdList(1);
|
|
foreach($tabTache as $tache){
|
|
print($tache);
|
|
echo "<br>";
|
|
}
|
|
*/
|
|
}
|
|
catch( PDOException $Exception ) {
|
|
echo 'erreur';
|
|
echo $Exception->getMessage();
|
|
}
|
|
?>
|
|
|
|
</body>
|
|
</html>
|