require_once '../generated-conf/config.php'; require_once '../app/functions/functions.php'; # Add topic tag (if applicable) if (isset($_GET['add_topic_tag'])) { addTopicTag($_GET['topic_id'], $_GET['verse_id'], $_GET['bible_code'], $_GET['relevant_words']); } # Add lesson tag (if applicable) if (isset($_GET['add_lesson_tag'])) { addLessonTag($_GET['lesson_id'], $_GET['verse_id'], $_GET['bible_code'], $_GET['relevant_words']); } # Get passage data $passage_data = getPassageDataAndVerses($_GET['reference_string']); # Get topics select options $topics_select_options = getTopicsSelectOptions($_GET['topic_parent_id']); # Get lessons select options $lessons_select_options = getLessonsSelectOptions($_GET['topic_parent_id']); echo <<<s <html> <head></head> <body> <h1>{$passage_data['reference']['string']}</h1> s; foreach ($passage_data['verses'] as $passage_verse_data) { echo <<<s <p> \t<b>{$passage_verse_data['text']['string']}</b> </p> <p> \t<b>Topics:</b>
require_once '../generated-conf/config.php'; require_once '../app/functions/functions.php'; # Add lesson (if applicable) if (isset($_POST['lesson_parent_id']) && isset($_POST['lesson_name'])) { addLesson($_POST['lesson_parent_id'], $_POST['lesson_name']); } # Move lesson (if applicable) if (isset($_POST['move_lesson'])) { moveLesson($_POST['lesson_id'], $_POST['lesson_parent_id']); } # Rename lesson (if applicable) if (isset($_POST['rename_lesson'])) { renameLesson($_POST['lesson_id'], $_POST['lesson_summary']); } # Get lessons select options $lessons_select_options = getLessonsSelectOptions($_POST['lesson_parent_id']); echo <<<s <html> <head></head> <body> <h1>Add lesson</h1> <form method="post"> \t<label>Lesson parent</label> \t<select name="lesson_parent_id"> \t\t{$lessons_select_options} \t</select> \t<br/> \t<label>Lesson name</label> \t<input name="lesson_name" style="width: 300px;" type="text" /> \t<br/> \t<input name="add_lesson" type="submit" value="Add lesson" />