Example #1
0
@($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 {
        $database_config_user->setBible($changebible);
        // Going to another Bible, ensure that the focused book exists there.
        $book = $ipc_focus->getBook();
        $books = $database_bibles->getBooks($changebible);