Example #1
0
 public function delete($name, $owner)
 {
     try {
         // DELETE the file from DynamoDB, table 'Contents'
         $this->client->deleteItem(array('TableName' => ContentDAO::$TABLE_NAME, 'Key' => array('name' => array('S' => $name), 'owner' => array('S' => $owner))));
         // GET the owner's type of the file
         $userDao = new UserDAO($this->client);
         $user = $userDao->get($owner);
         $type = $user->getType();
         // GET the children of the owner
         $childDao = new ChildDAO($this->client);
         $children = $childDao->getChildren($owner);
         // DELETE the file from children arrays
         $length = count($children);
         for ($i = 0; $i < $length; $i++) {
             $child = $children[$i];
             $child->deleteContent($name, $owner, $type);
             $childDao->update($child);
         }
     } catch (Exception $e) {
         echo '<p>Exception reçue : ', $e->getMessage(), "\n</p>";
     }
 }
?>
        <title>Children </title>
    </head>
        
    <body>
        
        <?php 
include 'nav.php';
echo "<a href=\"./adultShowContents.php\">Gestion de contenu</a>";
?>
        
        <h1>Enfants</h1>
            
        <?php 
$root = './';
include "includes.php";
$contentDao = new ContentDAO(DynamoDbClientBuilder::get());
$email = $_SESSION['email'];
$childDao = new ChildDAO(DynamoDbClientBuilder::get());
$children = $childDao->getChildren($email);
foreach ($children as $child) {
    echo $child->getFirstname() . ' ' . $child->getLastName() . ' ' . "<a href = /calendar/calendar.php?email=" . $child->getEmail() . ">calendrier</a></br>";
}
?>
        
        <?php 
include 'footer.php';
?>
        
    </body>
</html>
require "includes.php";
?>

</head>

<body>
    <?php 
include 'nav.php';
include 'includes.php';
//print_r($_GET);
if ($_GET['child']) {
    $les_enfants = $_GET['child'];
} else {
    $les_enfants = array();
    $childDao0 = new ChildDAO(DynamoDbClientBuilder::get());
    $children0 = $childDao0->getChildren($_SESSION['email']);
    foreach ($children0 as $child) {
        $les_enfants[] = $child->getFirstname() . '___' . $child->getLastname();
    }
}
//print_r($les_enfants);
?>
    
    <div class="container">
        <?php 
if (strpos($_POST['enfantExistant'], "Choix d'un Enfant existant") !== FALSE || strpos($_POST['enfantExistant'], "ensemble des enfants existant") !== FALSE) {
    echo "<h4 style=' margin: 15px 0 26px 70px; font-style: italic;'>Vous n'avez pas ajouté d'enfant à votre liste.</h4>";
} else {
    if ($_POST['enfantExistant'] != "") {
        //recupere l'enfant en question
        $childDao = new ChildDAO(DynamoDbClientBuilder::get());
Example #4
0
            filter: alpha(opacity=0);
            opacity: 0;
            outline: none;
            background: white;
            cursor: inherit;
            display: block;
        }
    </style>
</head>

<body>
    <?php 
include 'nav.php';
include 'includes.php';
$childDao = new ChildDAO(DynamoDbClientBuilder::get());
$children = $childDao->getChildren($_SESSION['email']);
$nbre_enfant = 0;
foreach ($children as $child) {
    $nbre_enfant++;
}
?>
     <br/>
     <h1 style="margin-left: 27px; margin-bottom: 30px;">Ajouter un document Excel pour créer une description d'un scénario</h1>
     <form method="POST" action="ExcelValider.php" enctype="multipart/form-data" style="margin-left: 20px;" <?php 
echo 'onsubmit="return testcheck(' . $nbre_enfant . ')"';
?>
>
        <div class="input-group" style="margin-bottom: 20px;">
                <span class="input-group-btn">
                    <span class="btn btn-primary btn-file">
                        Choisissez un fichier &hellip; <input type="file" name="avatar" multiple required>