$_SESSION['push'] = "Aucun.png"; $contentDao0 = new ContentDAO(DynamoDbClientBuilder::get()); $contentDAOExist0 = $contentDao0->get($name, $owner); $contentExist0 = new Content(); //recupere les valeurs $contentExist0 = $contentDAOExist0; $urlExist0 = $contentExist0->getUrl(); $ownerExist0 = $contentExist0->getEmailOwner(); if ($urlExist0) { $contentExist0->setEmailOwner($owner); $ownerExist0 = $contentExist0->getEmailOwner(); $children0 = array(); //$children[] = array('email' => $_POST['child'], 'dateStart' => $_POST['date_debut'], 'dateEnd' => $_POST['date_fin']); $contentDao0->UpDate($contentExist0, $children0); echo "stop de la lecture de : " . $name; $contentDao0->delete($name, "admin_on"); /* echo "<br/><br/>"; $contentDao02 = new ContentDAO(DynamoDbClientBuilder::get()); $contents02 = $contentDao02->getContentsOfUser("admin_off"); print_r($contents02);*/ } else { echo "Pas de contenue ayant comme titre \"" . $name . "\" et détenue par \"" . $owner . "admin_off\""; } } else { echo "Pas de valeur transmise ...<br/>En lecture : "; //Affiche tous les contenue ayant en owner = admin_on $email = "admin_on"; $contentDao = new ContentDAO(DynamoDbClientBuilder::get());
echo '</div>'; ?> </div> <div class="col-sm-6" style="margin-bottom: 60px; border-left: 1px solid gainsboro;"> <div style='background-color: #6ED397; padding: 10px;'> <h1 style="margin-left: 27px; margin-bottom: 30px;"><span class="glyphicon glyphicon-blackboard"></span> Gestion des Scénarios de Présentation</h1> <?php $contentDao = new ContentDAO(DynamoDbClientBuilder::get()); $name_fileToDelete = $_GET['name']; $owner_fileToDelete = $_GET['owner']; // DELETE File if needed if (!empty($name_fileToDelete) && !empty($owner_fileToDelete)) { $s3 = new S3Access(S3ClientBuilder::get()); $s3->deleteFile($name_fileToDelete); $contentDao->delete($name_fileToDelete, $owner_fileToDelete); } /* echo "<a href=\"./listOfChildren.php\">Calendriers des enfants</a></br></br>"; echo "<a href=\"./drop.php\">Ajouter un fichier</a></br></br>"; echo "<a href=\"./contenueTexte.php\">Créer un contenue texte</a></br></br>"; */ echo '<div style="margin-left:15px;">'; echo '<form class="formB" action="listOfChildren.php"><button type="submit" class="btn btn-default" name="Valider" onclick > <span class="glyphicon glyphicon-calendar"></span> Calendriers des enfants </button></form>'; echo '<form class="formB" action="Excel.php"><button type="submit" class="btn btn-default" name="Valider" onclick ><span class="glyphicon glyphicon-share"></span> Ajouter un Excel de description d\'un scénario</button></form>'; echo '<form class="formB" action="Excel.php"><button type="submit" class="btn btn-default" name="Valider" onclick > <span class="glyphicon glyphicon-edit"></span> Créer un scénario </button></form>'; echo '</div></div>'; $userDao = new UserDAO(DynamoDbClientBuilder::get()); $email = $_SESSION['email']; $user = $userDao->get($email); $contents = $contentDao->getContentsOfUser($email);