} if (!isset($_SESSION['date_from']) or $_SESSION['date_from'] == '') { $_SESSION['date_from'] = date("d.m.Y", strtotime('-10 days', time())); } if (!isset($_SESSION['date_to']) or $_SESSION['date_to'] == '') { $_SESSION['date_to'] = date("d.m.Y"); } $date_from = implode('-', array_reverse(explode('.', $_SESSION['date_from']))); $date_to = implode('-', array_reverse(explode('.', $_SESSION['date_to']))); $template_name = 'class_lessons.html'; $renderArray = array('date_from' => $_SESSION['date_from'], 'date_to' => $_SESSION['date_to'], 'ui_theme' => $config['ui']['theme']); $renderArray['subject_id'] = $subject_id; $renderArray['queryResult'] = $queryResult; if ($fromAjax) { $template_name = 'class_lessons_ajax.html'; $subject = get_lesson_subject($subject_id); $lessons = get_lessons($subject_id, $date_from, $date_to); $lessons_count = count($lessons); $students_list = get_student_classes_list($subject['class_id'], 0); $active_leson = false; foreach ($students_list as $key => $student) { $students_list[$key]['grades'] = get_student_lesson_grades($student['student_id'], $subject_id, $date_from, $date_to); } $renderArray['lessons'] = $lessons; $renderArray['lessons_count'] = $lessons_count; $renderArray['students_list'] = $students_list; } else { $renderArray['lesson_types'] = get_lesson_types(); } $template = $twig->loadTemplate('teachers/' . $template_name); echo $template->render($renderArray);
<br> <label>File (PDF only| max. 10 Mo) :</label> <br> <input type = "file" name = "my_file" id = "my_file"> <br> <label>File Title (max. 50 caractères) :</label> <br> <input type="text" name="part_title" placeholder = "File Title" id="part_title"> <br> <input type = "hidden" name = "max_file_size" value = "10485760"> <input type="submit" name="submit" value="Submit" /> </form> <?php $lesson_title_array = array(); $lesson_title_array = get_lessons(); if (empty($lesson_title_array)) { echo "No lesson yet !"; } else { foreach ($lesson_title_array as $lesson_title) { $i = 1; $part_title_array = array(); $part_title_array = get_parts($lesson_title); ?> <table> <thead> <tr> <th class = "ico"> <img src = "../design/images/logoicon.jpg" alt = "logoicon"> </th> <th colspan="2">