Exemplo n.º 1
0
if (isset($_GET['texttoggle'])) {
    $database_config_bible->setExportTextDuringNight($bible, !$database_config_bible->getExportTextDuringNight($bible));
    $view->view->success = Locale_Translate::_("The setting for nightly export to basic USFM format and text was updated.");
}
$view->view->text = $database_config_bible->getExportTextDuringNight($bible);
if (isset($_GET['textnow'])) {
    Export_Logic::scheduleTextAndBasicUsfm($bible);
    $view->view->success = Locale_Translate::_("The Bible is being exported to basic USFM format and text.");
}
if (isset($_GET['odttoggle'])) {
    $database_config_bible->setExportOdtDuringNight($bible, !$database_config_bible->getExportOdtDuringNight($bible));
    $view->view->success = Locale_Translate::_("The setting for nightly export to OpenDocument was updated.");
}
$view->view->odt = $database_config_bible->getExportOdtDuringNight($bible);
if (isset($_GET['odtnow'])) {
    Export_Logic::scheduleOpenDocument($bible);
    $view->view->success = Locale_Translate::_("The Bible is being exported to OpenDocument format.");
}
if (isset($_GET['dropcapstoggle'])) {
    $database_config_bible->setExportChapterDropCapsFrames($bible, Filter_Bool::not($database_config_bible->getExportChapterDropCapsFrames($bible)));
}
if (isset($_GET['pagewidth'])) {
    $dialog_entry = new Dialog_Entry("", Locale_Translate::_("Please enter a page width in millimeters"), $database_config_bible->getPageWidth($bible), "pagewidth", Locale_Translate::_("The width of A4 is 210 mm. The width of Letter is 216 mm."));
    die;
}
if (isset($_POST['pagewidth'])) {
    $value = $_POST['entry'];
    $value = Filter_Numeric::integer_in_string($value);
    if ($value >= 30 && $value <= 500) {
        $database_config_bible->setPageWidth($bible, $value);
    }