$database_config_user = Database_Config_User::getInstance(); $database_config_bible = Database_Config_Bible::getInstance(); $database_bibles = Database_Bibles::getInstance(); $ipc_focus = Ipc_Focus::getInstance(); @($switchbook = $_GET['switchbook']); @($switchchapter = $_GET['switchchapter']); @($switchverse = $_GET['switchverse']); if (isset($switchbook) && isset($switchchapter)) { $switchbook = Filter_Numeric::integer_in_string($switchbook); $switchchapter = Filter_Numeric::integer_in_string($switchchapter); $verse = 1; if (!isset($switchverse)) { $switchverse = 1; } $ipc_focus->set($switchbook, $switchchapter, $switchverse); Navigation_Passage::recordHistory($switchbook, $switchchapter, $switchverse); } $header = new Assets_Header(Locale_Translate::_("Edit")); $header->setNavigator(); $header->setEditorStylesheet(); $header->run(); @($changebible = $_GET['changebible']); if (isset($changebible)) { if ($changebible == "") { $dialog_list = new Dialog_List2(Locale_Translate::_("Select which Bible to open in the editor")); $bibles = Access_Bible::bibles(); foreach ($bibles as $bible) { $dialog_list->add_row($bible, "&changebible={$bible}"); } $dialog_list->run(); } else {
@($remove = $_POST['remove']); if (isset($remove)) { $trash_handler = Trash_Handler::getInstance(); $trash_handler->changeNotification($remove); $database_modifications->deleteNotification($remove); die; } // Handle AJAX call to navigate to the passage belonging to the change notification. @($navigate = $_POST['navigate']); if (isset($navigate)) { $id = $navigate; $passage = $database_modifications->getNotificationPassage($id); if ($passage != NULL) { $ipc_focus = Ipc_Focus::getInstance(); $ipc_focus->set($passage['book'], $passage['chapter'], $passage['verse']); Navigation_Passage::recordHistory($passage['book'], $passage['chapter'], $passage['verse']); } // Set the correct default Bible for the user. $database_config_user = Database_Config_User::getInstance(); $bible = $database_modifications->getNotificationBible($id); if ($bible) { $database_config_user->setBible($bible); } die; } // Remove personal change proposals and their matching change notifications. if (isset($_GET['match'])) { $database_modifications->clearNotificationMatches($username, "☺", "♺"); } $header = new Assets_Header(Locale_Translate::_("Changes")); $header->setStylesheet();
public static function gotoPreviousVerse($bible) { $ipc_focus = Ipc_Focus::getInstance(); $currentBook = $ipc_focus->getBook(); $currentChapter = $ipc_focus->getChapter(); $currentVerse = $ipc_focus->getVerse(); $passage = Navigation_Passage::getPreviousVerse($bible, $currentBook, $currentChapter, $currentVerse); if ($passage[0] != 0) { $ipc_focus->set($passage[0], $passage[1], $passage[2]); Navigation_Passage::recordHistory($passage[0], $passage[1], $passage[2]); } }
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ require_once "../bootstrap/bootstrap.php"; page_access_level(Filter_Roles::CONSULTANT_LEVEL); $database_notes = Database_Notes::getInstance(); $ipc_focus = Ipc_Focus::getInstance(); $id = $_GET['id']; // When a note is opened, then the passage navigator should go to the passage that belongs to that note. $passages = $database_notes->getPassages($id); if (is_array($passages)) { if (!empty($passages)) { $ipc_focus->set($passages[0][0], $passages[0][1], $passages[0][2]); Navigation_Passage::recordHistory($passages[0][0], $passages[0][1], $passages[0][2]); } } $header = new Assets_Header(Locale_Translate::_("Note")); // After adding a comment to a note it returns to the note. // When doing nothing for several seconds, the browser then returns to the list of notes. if (isset($_GET['temporal'])) { $header->addHeadLine('<META HTTP-EQUIV="refresh" CONTENT="5;URL=index.php">'); } $header->run(); $view = new Assets_View(__FILE__); $view->view->id = $id; $summary = $database_notes->getSummary($id); $view->view->summary = $summary; $content = $database_notes->getContents($id); $view->view->content = $content;