示例#1
0
if (isset($source)) {
    if ($source == "") {
        $dialog_list = new Dialog_List2(Locale_Translate::_("Select which Bible to use as the source where to read the cross references from"));
        $bibles = Access_Bible::bibles();
        foreach ($bibles as $bible) {
            $dialog_list->add_row($bible, "&source={$bible}");
        }
        $dialog_list->run();
    } else {
        $database_config_user->setSourceXrefBible($source);
    }
}
@($target = $_GET['target']);
if (isset($target)) {
    if ($target == "") {
        $dialog_list = new Dialog_List2(Locale_Translate::_("Select which Bible to insert the cross references into"));
        $bibles = Access_Bible::bibles();
        foreach ($bibles as $bible) {
            if (Access_Bible::write($bible)) {
                $dialog_list->add_row($bible, "&target={$bible}");
            }
        }
        $dialog_list->run();
    } else {
        $database_config_user->setTargetXrefBible($target);
    }
}
$source = $database_config_user->getSourceXrefBible();
if (!Access_Bible::read($source)) {
    $source = "";
    $database_config_user->setSourceXrefBible($source);
示例#2
0
    $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);
        if (!in_array($book, $books)) {
            if (count($books) > 0) {
                $book = $books[0];
            } else {
                $book = 0;
示例#3
0
$success = "";
$error = "";
// Character sets submission.
if (isset($_POST['sets'])) {
    $firstset = $_POST['firstset'];
    $database_config_bible->setHyphenationFirstSet($bible, $firstset);
    $secondset = $_POST['secondset'];
    $database_config_bible->setHyphenationSecondSet($bible, $secondset);
    $success = Locale_Translate::_("The two sets of characters were saved");
}
$firstset = $database_config_bible->getHyphenationFirstSet($bible);
$secondset = $database_config_bible->getHyphenationSecondSet($bible);
@($bible = $_GET['bible']);
if (isset($bible)) {
    if ($bible == "") {
        $dialog_list = new Dialog_List2(Locale_Translate::_("Which Bible would you like to take the data from?"));
        $bibles = Access_Bible::bibles();
        foreach ($bibles as $item) {
            $dialog_list->add_row($item, "bible={$item}");
        }
        $dialog_list->run();
    } else {
        $database_config_user->setBible($bible);
    }
}
$bible = Access_Bible::clamp($database_config_user->getBible());
if (isset($_GET['run'])) {
    if ($bible == "") {
        $error = Locale_Translate::_("No Bible given");
    } else {
        if ($firstset == "") {
示例#4
0
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

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::ADMIN_LEVEL);
Assets_Page::header(Locale_Translate::_("Language"));
$database_config_general = Database_Config_General::getInstance();
@($language = $_GET['language']);
if (isset($language)) {
    if ($language == "") {
        $dialog_list = new Dialog_List2(Locale_Translate::_("Set the default language for the site"));
        $languages = Locale_Logic::getLocalizations();
        foreach ($languages as $language) {
            $dialog_list->add_row(Locale_Logic::getLanguage($language), "&language={$language}");
        }
        $dialog_list->run();
    } else {
        $database_config_general->setSiteLanguage(Locale_Logic::filterDefault($language));
    }
}
$view = new Assets_View(__FILE__);
$view->view->language = Locale_Logic::getLanguage($database_config_general->getSiteLanguage());
$view->render("language.php");
Assets_Page::footer();
示例#5
0
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::TRANSLATOR_LEVEL);
$header = new Assets_Header(Locale_Translate::_("Consistency"));
$header->run();
$database_config_user = Database_Config_User::getInstance();
$database_bibles = Database_Bibles::getInstance();
$database_usfmresources = Database_UsfmResources::getInstance();
$ipc_focus = Ipc_Focus::getInstance();
@($add = $_GET['add']);
if (isset($add)) {
    if ($add == "") {
        $dialog_list = new Dialog_List2(Locale_Translate::_("Would you like to add a Resource?"));
        $resources = Resource_Logic::getNames();
        foreach ($resources as $resource) {
            $dialog_list->add_row($resource, "&add={$resource}");
        }
        $dialog_list->run();
    } else {
        $resources = $database_config_user->getConsistencyResources();
        $resources[] = $add;
        $resources = array_unique($resources, SORT_STRING);
        $database_config_user->setConsistencyResources($resources);
    }
}
@($remove = $_GET['remove']);
if (isset($remove)) {
    $resources = $database_config_user->getConsistencyResources();
示例#6
0
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

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::TRANSLATOR_LEVEL);
Assets_Page::header(Locale_Translate::_("Styles"));
$view = new Assets_View(__FILE__);
$database_config_user = Database_Config_User::getInstance();
if (isset($_GET['sheet'])) {
    $sheet = $_GET['sheet'];
    if ($sheet == "") {
        $dialog_list = new Dialog_List2(Locale_Translate::_("Would you like to switch to another stylesheet?"));
        $database_styles = Database_Styles::getInstance();
        $sheets = $database_styles->getSheets();
        foreach ($sheets as $sheet) {
            $parameter = "&sheet={$sheet}";
            $dialog_list->add_row($sheet, $parameter);
        }
        $dialog_list->run();
    } else {
        $database_config_user->setStylesheet($sheet);
    }
}
$stylesheet = $database_config_user->getStylesheet();
$view->view->stylesheet = Filter_Html::sanitize($stylesheet);
$view->render("indext.php");
Assets_Page::footer();
示例#7
0
        $database_config_user->setPrintPassageTo(implode(".", $topassage));
        // Match starting passage.
        $frompassage = explode(".", $database_config_user->getPrintPassageFrom());
        if (Filter_Books::passage2integer($topassage) < Filter_Books::passage2integer($frompassage)) {
            // Set starting passage to a sensible value.
            $frompassage[0] = $topassage[0];
            $frompassage[1] = 0;
            $frompassage[2] = 0;
            $database_config_user->setPrintPassageFrom(implode(".", $frompassage));
        }
    }
}
@($toverse = $_GET['toverse']);
if (isset($toverse)) {
    if ($toverse == "") {
        $dialog_list = new Dialog_List2(Locale_Translate::_("Select a verse"));
        $passage = explode(".", $database_config_user->getPrintPassageTo());
        $usfm = $database_bibles->getChapter($bible, $passage[0], $passage[1]);
        $verses = Filter_Usfm::getVerseNumbers($usfm);
        foreach ($verses as $verse) {
            $parameter = "toverse={$verse}";
            $dialog_list->add_row($verse, $parameter);
        }
        $dialog_list->run();
    } else {
        // Set ending verse.
        $topassage = explode(".", $database_config_user->getPrintPassageTo());
        $topassage[2] = $toverse;
        $database_config_user->setPrintPassageTo(implode(".", $topassage));
        // Match starting verse.
        $frompassage = explode(".", $database_config_user->getPrintPassageFrom());