} $chapter = $_GET['chapter']; echo Navigation_Passage::getVersesFragment($bible, $book, $chapter, -1); die; } @($verse = $_GET['verse']); if (isset($verse)) { $book = $_GET['book']; if (!is_numeric($book)) { $database_books = Database_Books::getInstance(); $book = $database_books->getIdFromEnglish($book); } $chapter = $_GET['chapter']; Navigation_Passage::setBookChapterVerse($book, $chapter, $verse); die; } @($previousverse = $_GET['previousverse']); if (isset($previousverse)) { Navigation_Passage::gotoPreviousVerse($bible); } @($nextverse = $_GET['nextverse']); if (isset($nextverse)) { Navigation_Passage::gotoNextVerse($bible); } @($passage = $_GET['passage']); if (isset($passage)) { Navigation_Passage::setPassage($bible, $passage); die; } echo Navigation_Passage::getNavigator($bible);
if (!in_array($book, $books)) { if (count($books) > 0) { $book = $books[0]; } else { $book = 0; } $ipc_focus->set($book, 1, 1); } } } $view = new Assets_View(__FILE__); // Active Bible, and check access. $bible = Access_Bible::clamp($database_config_user->getBible()); $view->view->bible = $bible; // Store the active Bible in the page's javascript. $view->view->navigationCode = Navigation_Passage::code($bible); // Write access? $write_access = Access_Bible::write($bible); $view->view->write_access = $write_access; $chapterLoaded = Locale_Translate::_("Loaded"); $chapterSaving = Locale_Translate::_("Saving..."); $chapterRetrying = Locale_Translate::_("Retrying..."); $write_access = $write_access ? "true" : "false"; $script = <<<EOD var editorChapterLoaded = '{$chapterLoaded}'; var editorChapterSaving = '{$chapterSaving}'; var editorChapterRetrying = '{$chapterRetrying}'; var editorWriteAccess = {$write_access}; EOD; $view->view->script = $script; $class = Filter_CustomCSS::getClass($bible);
public function run() { $this->view->view->include_jquery_ui = $this->includeJQueryUI; $this->view->view->include_jquery_ui_subset = $this->JQueryUISubset; $this->view->view->head_lines = $this->headLines; $this->view->view->display_topbar = $this->displayTopbar(); if ($this->view->view->display_topbar) { $menu_main = new Menu_Main(); $this->view->view->mainmenu = $menu_main->create(); $menu_user = new Menu_User(); $this->view->view->usermenu = $menu_user->create(); } $this->view->view->display_navigator = $this->displayNavigator; if ($this->view->view->display_navigator) { $database_config_user = Database_Config_User::getInstance(); $bible = Access_Bible::clamp($database_config_user->getBible()); $this->view->view->navigationHtml = Navigation_Passage::getContainer(); $this->view->view->navigationCode = Navigation_Passage::code($bible, true); } $this->view->view->included_stylesheet = $this->includedStylesheet; $this->view->view->included_editor_stylesheet = $this->includedEditorStylesheet; $this->view->render("xhtml_start.php"); $this->view->render("header.php"); }
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]); } }
// Optionally handle a call to the page to set the passage. @($switchbook = $_GET['switchbook']); @($switchchapter = $_GET['switchchapter']); @($switchverse = $_GET['switchverse']); if (isset($switchbook)) { $switchbook = Filter_Numeric::integer_in_string($switchbook); if (!isset($switchchapter)) { $switchchapter = 1; } $switchchapter = Filter_Numeric::integer_in_string($switchchapter); if (!isset($switchverse)) { $switchverse = 1; } $switchverse = Filter_Numeric::integer_in_string($switchverse); $ipc_focus->set($switchbook, $switchchapter, $switchverse); Navigation_Passage::recordHistory($switchbook, $switchchapter, $switchverse); } // Check whether a Bible editor is alive. $timestamp = $database_ipc->getBibleAlive(); $alive = $timestamp > time() - 5; if ($alive) { // If a Bible editor is alive, send javascript to the browser to close this new window. $message = Locale_Translate::_("The passage has been opened in the existing Bible editor in another browser tab."); $script = <<<EOD <!doctype html> <html> <head> </head> <body> <script> setTimeout (closeself, 1000);
@($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();
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;