diff --git a/Vues/seeList.php b/Vues/seeList.php index 83b59ba..2a1a1e4 100644 --- a/Vues/seeList.php +++ b/Vues/seeList.php @@ -83,10 +83,8 @@ else{ getPrivate()){ ?> -
- - -
+ +
diff --git a/config/config.php b/config/config.php index 567d322..955bfc2 100644 --- a/config/config.php +++ b/config/config.php @@ -2,9 +2,9 @@ $rep = __DIR__ . '/../'; -$login="thchazot1"; -$password="achanger"; -$dsn="mysql:host=localhost;dbname=dbthchazot1"; // chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut) +$login="root"; +$password="root"; +$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite"; // chemin vers bd (mysql:host=londres.uca.local;dbname=dblibreton => pour l'iut) //$dsn="mysql:host=localhost;port=8888;dbname=bddDeQualite"; /* $login="thchazot1"; diff --git a/controllers/UserController.php b/controllers/UserController.php index 3525f8e..dbf6bd1 100644 --- a/controllers/UserController.php +++ b/controllers/UserController.php @@ -28,12 +28,15 @@ class UserController { case "accessModifyListPriv": $mdlListe= new MdlListe(); $liste=$mdlListe->findById($_POST['list']); - $dataView=$liste; + $dataView=$liste[0]; require($rep.$vues['modifyListPriv']); break; case "addPrivateList": $this->AddListPrivate($dVueEreur); break; + case "modifyListPriv": + $this->ModifyListPriv($dVueEreur); + break; case "viewPrivateList": $this->PrivateList($dVueEreur); @@ -119,6 +122,28 @@ class UserController { $control= new VisitorController(); $dVueEreur = array(); } + + function ModifyListPriv($dVueEreur){ + global $rep,$vues,$dataView; + $list=$_POST['list']; + $name=$_POST['name']; + $model = new MdlListe(); + if(!isset($_POST['private'])) + { + $private = false; + } else { + $private = $_POST['private']; + } + $list=$model->findById($_POST['list']); + $model->update($list[0], $name, $private); + $_REQUEST['action']="accessListInfos"; + $this->accessListInfos($dVueEreur); + $dVueEreur= array(); + + + } + + }