echo 'Hμέρα Παράδοσης'; ?> </th> <th style="text-align:center;"><?php echo 'Επιλογές'; ?> </th> <!-- book details --> </tr> </thead> <tbody> <?php while ($row = $user_results_history->fetch(PDO::FETCH_ASSOC)) { $material = new Material(); $material_info = $material->get_material_by_id($row['MaterialID'])->fetch(PDO::FETCH_ASSOC); $library = $material->get_material_library($row['MaterialID']); $lib_name = ''; if ($library != -1) { $lib_name = $library['Name']; $lib_id = $library['idLibraries']; } ?> <tr> <td style="text-align:center;"><?php echo $material_info['title']; ?> </td> <td style="text-align:center;"><?php echo $material_info['category']; ?> </td>
$material_id = intval($_POST['materialID']); $username = $_POST['username']; $flag = 0; $material = new Material(); // determine what is the material, book ,article etc $genre = $material->materialBelongsToTable($material_id); if ($genre == "books") { $flag = 1; } // fetch the material details $stmt = $material->fetch_material_details($material_id); if ($stmt->rowCount() == 0) { $message = "Πρόβλημα με τις λεπτομέρειες του Υλικού"; echo "<script>error_messages('{$message}');</script>"; } $library = $material->get_material_library($material_id); $lib_name = ''; if ($library != -1) { $lib_name = $library['Name']; } $result = $stmt->fetch(PDO::FETCH_ASSOC); // fetch the endDate for the material $user = new User(); $endDate = $user->get_endDate($username, $material_id)->fetch(PDO::FETCH_ASSOC); ?> <?php ob_start(); ?> <style>