Example #1
0
    $content = implode("\n", $result) . "\n";
    $filename = tempnam(sys_get_temp_dir(), '');
    file_put_contents($filename, $content);
    $result = array();
    exec("crontab {$filename} 2>&1", $result, $exitcode);
    if ($exitcode != 0) {
        $messages[] = "Crontab ran with an exitcode of {$exitcode}, while 0 would be expected. Therefore the scheduled task for Bibledit-Web may not have been set properly.";
        foreach ($result as $line) {
            $messages[] = "Error: " . $line;
        }
    }
    unlink($filename);
}
if (count($messages) == 0) {
    include "../filter/url.php";
    Filter_Url::redirect("step.php?referer=crontab");
    die;
}
// For Windows:
$webuser = get_current_user();
// For Linux:
if (function_exists("posix_getpwuid")) {
    $webuser = posix_getpwuid(posix_geteuid());
    $webuser = $webuser['name'];
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bibledit-Web Installation</title>
Example #2
0
// SQLite support.
$sqlite = in_array("pdo_sqlite", $extensions);
// Iconv support: Bibledit does not need it. Some Zend functions use it.
// $iconv = in_array ("iconv", $extensions);
// XML support.
$xmlreader = in_array("xmlreader", $extensions);
$xmlwriter = in_array("xmlwriter", $extensions);
$simplexml = in_array("SimpleXML", $extensions);
/*
While writing this, Zend Framework 1 works well enough.
In the future it may be needed to switch to Zend Framework 2.
This would mean that Zend Framework 1 is no longer supported.
*/
if ($mbstring && $json && $dom && $posix && $sqlite && $xmlreader && $xmlwriter && $simplexml) {
    include "../filter/url.php";
    Filter_Url::redirect("step.php?referer=libraries");
    die;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bibledit-Web Installation</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
</head>
<body>
<h1><img src="../assets/bibledit.png"> <a href="http://bibledit.org/">Bibledit-Web</a></h1>
<p>Bibledit-Web has tried to locate the libraries it relies on, and has found problems.</p>
<ul>
  <strong>
Example #3
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::CONSULTANT_LEVEL);
$database_notes = Database_Notes::getInstance();
$notes_logic = Notes_Logic::getInstance();
$id = $_GET['id'];
if (isset($_POST['submit'])) {
    $summary = $_POST['entry'];
    $notes_logic->setSummary($id, $summary);
    Filter_Url::redirect("note.php?id={$id}");
    die;
}
$header = new Assets_Header(Locale_Translate::_("Note summary"));
$header->setBodyOnload('document.form.entry.focus();');
$header->run();
$view = new Assets_View(__FILE__);
$view->view->id = $id;
$summary = $database_notes->getSummary($id);
$summary = Filter_Html::sanitize($summary);
$view->view->summary = $summary;
$view->render("summary.php");
Assets_Page::footer();
Example #4
0
if (isset($_POST['save'])) {
    $fullname = $_POST['fullname'];
    $abbreviation = $_POST['abbreviation'];
    $abbreviations = $database_config_bible->getBookAbbreviations($targetBible);
    $abbreviations = Filter_Abbreviations::display($abbreviations);
    $abbreviations .= "\n{$fullname} = {$abbreviation}";
    $database_config_bible->setBookAbbreviations($targetBible, $abbreviations);
}
$sourceAbbreviations = $database_config_bible->getBookAbbreviations($sourceBible);
$sourceAbbreviations = Filter_Abbreviations::read($sourceAbbreviations);
$sourceAbbreviations = array_values($sourceAbbreviations);
$targetAbbreviations = $database_config_bible->getBookAbbreviations($targetBible);
$targetAbbreviations = Filter_Abbreviations::read($targetAbbreviations);
$targetAbbreviations = array_values($targetAbbreviations);
$unknown_abbreviations = array_diff($sourceAbbreviations, $targetAbbreviations);
$unknown_abbreviations = array_unique($unknown_abbreviations);
foreach ($unknown_abbreviations as &$abbreviation) {
    $abbreviation = $database_books->getEnglishFromId($abbreviation);
}
$unknown_abbreviations = array_values($unknown_abbreviations);
if (empty($unknown_abbreviations)) {
    Filter_Url::redirect("clear.php");
    die;
}
$header = new Assets_Header(Locale_Translate::_("Cross references"));
$header->run();
$view = new Assets_View(__FILE__);
$view->view->remaining = count($unknown_abbreviations) - 1;
$view->view->bookname = $unknown_abbreviations[0];
$view->render("translate.php");
Assets_Page::footer();
Example #5
0
}
if (isset($_POST['save'])) {
    $urls = array();
    $widths = array();
    $row_heights = array();
    for ($row = 1; $row <= 3; $row++) {
        for ($column = 1; $column <= 5; $column++) {
            $urls[] = $_POST["url{$row}{$column}"];
            $widths[] = $_POST["width{$row}{$column}"];
        }
        $row_heights[] = $_POST["height{$row}"];
    }
    Workbench_Logic::setURLs($urls);
    Workbench_Logic::setWidths($widths);
    Workbench_Logic::setHeights($row_heights);
    Filter_Url::redirect("index.php");
    die;
}
$header = new Assets_Header(Locale_Translate::_("Edit workbench"));
$header->run();
$view = new Assets_View(__FILE__);
$urls = Workbench_Logic::getURLs(false);
$widths = Workbench_Logic::getWidths();
foreach ($urls as $key => $url) {
    $row = intval($key / 5) + 1;
    $column = $key % 5 + 1;
    $variable = "url" . $row . $column;
    $view->view->{$variable} = $url;
    $variable = "width" . $row . $column;
    $view->view->{$variable} = $widths[$key];
}
Example #6
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::MANAGER_LEVEL);
$view = new Assets_View(__FILE__);
$database_resources = Database_Resources::getInstance();
$database_offlineresources = Database_OfflineResources::getInstance();
$database_versifications = Database_Versifications::getInstance();
@($name = $_GET['name']);
$view->view->name = $name;
if (isset($_GET['download'])) {
    $versification = "English";
    $books = $database_versifications->getBooks($versification);
    foreach ($books as $book) {
        // Schedule the task with low priority so it does not get in the way of regular tasks.
        Tasks_Logic::queue(Tasks_Logic::PHP, array(__DIR__ . "/downloadcli.php", $name, $book));
    }
    Filter_Url::redirect("../journal/index.php");
    die;
}
if (isset($_GET['clear'])) {
    $database_offlineresources->delete($name);
}
$count = $database_offlineresources->count($name);
$view->view->count = $count;
$header = new Assets_Header(Locale_Translate::_("Download resource"));
$header->run();
$view->render("download.php");
Assets_Page::footer();
Example #7
0
}
if (isset($admin_email)) {
    $validator = new Zend_Validate_EmailAddress();
    if (!$validator->isValid($admin_email)) {
        unset($admin_email);
        $error[] = "Choose a valid email address.";
    }
}
if (isset($admin_username) && isset($admin_password) && isset($admin_email)) {
    $database_users->removeUser($admin_username);
    $database_users->addNewUser($admin_username, $admin_password, Filter_Roles::ADMIN_LEVEL, $admin_email);
}
$admins = $database_users->getAdministrators();
if (count($admins) != 0) {
    include "../filter/url.php";
    Filter_Url::redirect("step.php?referer=details");
    die;
}
$error = implode(" ", $error);
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bibledit-Web Installation</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
</head>
<body>
<h1><img src="../assets/bibledit.png"> <a href="http://bibledit.org/">Bibledit-Web</a></h1>
<p>Please provide the following information. You can change these settings later.</p>
<p><?php 
Example #8
0
 private function __construct()
 {
     // Default encoding.
     mb_internal_encoding("UTF-8");
     // On shared hosting the temporal location may give read or write failures.
     // Set private temporal location for PHP.
     // Set private temporal location for SQLite.
     // http://stackoverflow.com/questions/10394517/setting-sqlite-temp-store-directory
     $tmpdir = realpath(__DIR__ . "/../tmp");
     putenv("TMPDIR={$tmpdir}");
     // Check whether to run the website setup script.
     // On Linux it is sufficient to check whether the "setup" folder exists.
     // But on Windows, this setup folder cannot be deleted, so it would exist always.
     // Therefore, to support Windows, it checks whether the index file in in the setup folder.
     if (file_exists("../setup/index.php")) {
         $setupfolder = realpath("../setup");
         $myfolder = realpath(".");
         if ($setupfolder != $myfolder) {
             include "../filter/url.php";
             Filter_Url::redirect("../setup/index.php");
             die;
         }
     }
     // Set the include path: Where to look for included files.
     $this->bibledit_root_folder = dirname(dirname(__FILE__));
     $include_path = get_include_path() . PATH_SEPARATOR . $this->bibledit_root_folder;
     set_include_path($include_path);
     ini_set('include_path', $include_path);
     // Autoloader.
     // Automatically include the file that contains the $class_name.
     // E.g. class Database_Bibles would require file database/bibles.php.
     // Thus the name of the class determines which file gets required.
     // The above implies that all classes translate to files and folders in lower case.
     // An exception is made for the Zend_* classes.
     function __autoload($class_name)
     {
         if (substr($class_name, 0, 4) != "Zend") {
             $class_name = strtolower($class_name);
         }
         $path = str_replace("_", "/", $class_name);
         require_once $path . ".php";
     }
     // Register the function.
     spl_autoload_register('__autoload');
     // Disable magic quotes.
     if (function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) {
         foreach ($_GET as $k => $v) {
             $_GET[$k] = stripslashes($v);
         }
         foreach ($_POST as $k => $v) {
             $_POST[$k] = stripslashes($v);
         }
         foreach ($_COOKIE as $k => $v) {
             $_COOKIE[$k] = stripslashes($v);
         }
     }
     // General configuration database.
     $database_config_general = Database_Config_General::getInstance();
     // The site's timezone.
     $timezone = $database_config_general->getTimezone();
     if ($timezone) {
         date_default_timezone_set($timezone);
     }
     // Client mode setup.
     // In case the client mode is prepared, but not enabled,
     // the bootstrap script forwards to the client mode setup page,
     // unless it is already going to that page.
     if (Filter_Client::prepared()) {
         if (!Filter_Client::enabled()) {
             @($uri = $_SERVER["REQUEST_URI"]);
             $path = parse_url($uri, PHP_URL_PATH);
             $folder = pathinfo($path, PATHINFO_DIRNAME);
             $folder = basename($folder);
             $page = pathinfo($path, PATHINFO_BASENAME);
             if ($folder != "setup") {
                 if ($page != "topbar.php") {
                     if ($page != "client.php") {
                         Filter_Url::redirect("../administration/client.php");
                         die;
                     }
                 }
             }
         }
     }
 }
Example #9
0
This generates a start menu.

It is based on an array of all possible menu entries.
It reads the access levels of those entries.
It only keeps those menu entries the currently logged-in user has access to.

It originally self-organized the entries such that the ones used most often came earlier in the menu.
But menu entries moving around does no good. It creates confusion instead.
Therefore it was removed again.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::GUEST_LEVEL);
@($url = $_GET['url']);
if (isset($url)) {
    // Dissect the $url, as it may contain a query component also.
    $path = parse_url($url, PHP_URL_PATH);
    $query = parse_url($url, PHP_URL_QUERY);
    // When a file with the $url and the .php extension exists, go there.
    // Else go to the given $url.
    $filename = realpath("../{$path}.php");
    if (file_exists($filename)) {
        $url = "{$path}.php";
        if ($query) {
            $url .= "?{$query}";
        }
    }
    Filter_Url::redirect("../{$url}");
    die;
}
Assets_Page::header(Locale_Translate::_("Start"));
Assets_Page::footer();
Example #10
0
<?php

/*
Copyright (©) 2003-2014 Teus Benschop.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

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.
*/
include "../filter/url.php";
Filter_Url::redirect("../index/index.php");
Example #11
0
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::TRANSLATOR_LEVEL);
$database_config_user = Database_Config_User::getInstance();
$database_bibles = Database_Bibles::getInstance();
$ipc_focus = Ipc_Focus::getInstance();
$bible = $database_config_user->getTargetXrefBible();
$book = $ipc_focus->getBook();
$chapter = $ipc_focus->getChapter();
$usfm = $database_bibles->getChapter($bible, $book, $chapter);
if (isset($_GET['overwrite'])) {
    $usfm = Filter_Usfm::removeNotes($usfm, array("x"));
    Bible_Logic::storeChapter($bible, $book, $chapter, $usfm);
}
// Count the cross references in this chapter.
$xrefs = Filter_Usfm::extractNotes($usfm, array("x"));
// Count the number of xref openers / closers in this chapter.
$opener = Filter_Usfm::getOpeningUsfm("x");
str_replace($opener, "", $usfm, $openers);
$closer = Filter_Usfm::getClosingUsfm("x");
str_replace($closer, "", $usfm, $closers);
if (empty($xrefs)) {
    Filter_Url::redirect("insert.php");
    die;
}
$header = new Assets_Header(Locale_Translate::_("Cross references"));
$header->run();
$view = new Assets_View(__FILE__);
$view->view->count = count($xrefs);
$view->view->tags = $openers - $closers;
$view->render("clear.php");
Assets_Page::footer();
Example #12
0
    $note = str_replace('\\x*', "", $note);
    $note = str_replace('\\x', "", $note);
    $note = str_replace($abbreviations, "", $note);
    $note = explode(" ", $note);
    foreach ($note as $fragment) {
        if (strlen($fragment) <= 1) {
            continue;
        }
        if (intval($fragment) > 0) {
            continue;
        }
        $unknown_abbreviations[] = $fragment;
    }
}
if (empty($unknown_abbreviations)) {
    Filter_Url::redirect("translate.php");
    die;
}
$header = new Assets_Header(Locale_Translate::_("Cross references"));
$header->run();
$view = new Assets_View(__FILE__);
$unknown_abbreviations = array_unique($unknown_abbreviations);
$view->view->remaining = count($unknown_abbreviations) - 1;
$view->view->abbreviation = $unknown_abbreviations[0];
$books = $database_books->getIDs();
foreach ($books as &$book) {
    $book = $database_books->getEnglishFromId($book);
}
$view->view->books = $books;
$view->render("interpret.php");
Assets_Page::footer();
Example #13
0
<IfModule mod_php5.c>
  php_value upload_max_filesize 512M
  php_value post_max_size 512M
  php_value memory_limit 512M
</IfModule>

EOD;
@($success = file_put_contents($filename, $htaccess));
if ($success === false) {
    $message = error_get_last();
    $message = $message['message'];
    $messages[] = $message;
}
if (count($messages) == 0) {
    include "../filter/url.php";
    Filter_Url::redirect("step.php?referer=apache");
    die;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bibledit-Web Installation</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
</head>
<body>
<h1><img src="../assets/bibledit.png"> <a href="http://bibledit.org/">Bibledit-Web</a></h1>
<p>Bibledit-Web tried to configure the web server, but failed to do so.</p>
<p>More information is below.</p>
<ul>
Example #14
0
if (!is_writable($folder)) {
    $messages[] = "Bibledit-Web needs write access to folder {$folder} to store git repositories for collaboration.";
}
// Test write access to the revisions folder.
$folder = realpath("../revisions");
if (!is_writable($folder)) {
    $messages[] = "Bibledit-Web needs write access to folder {$folder} to store the daily changes.";
}
// Test write access to the dyncss folder.
$folder = realpath("../dyncss");
if (!is_writable($folder)) {
    $messages[] = "Bibledit-Web needs write access to folder {$folder} to store the dynamically created stylesheets.";
}
if (count($messages) == 0) {
    include "../filter/url.php";
    Filter_Url::redirect("step.php?referer=write");
    die;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bibledit-Web Installation</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
</head>
<body>
<h1><img src="../assets/bibledit.png"> <a href="http://bibledit.org/">Bibledit-Web</a></h1>
<p>Bibledit-Web tried to gain write access to certain locations on the web server, but did not succeed.</p>
<p>More information is below.</p>
<ul>
Example #15
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.
*/
error_reporting(E_ALL);
require_once "../bootstrap/bootstrap.php";
$crontab = new Filter_Which("crontab");
$crontab = $crontab->available;
$php = new Filter_Which("php");
$php = $php->available;
if ($crontab && $php) {
    include "../filter/url.php";
    Filter_Url::redirect("step.php?referer=binaries");
    die;
}
$binaries = dirname(__FILE__) . "/../binaries";
$binaries = realpath($binaries);
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bibledit-Web Installation</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
</head>
<body>
<h1><img src="../assets/bibledit.png"> <a href="http://bibledit.org/">Bibledit-Web</a></h1>
<p>Bibledit-Web has tried to access the programs it relies on, and has found problems.</p>
Example #16
0
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::CONSULTANT_LEVEL);
@($bible = $_GET["bible"]);
@($compare = $_GET["compare"]);
if (isset($compare)) {
    $database_jobs = Database_Jobs::getInstance();
    $jobId = $database_jobs->getNewId();
    $database_jobs->setLevel($jobId, Filter_Roles::CONSULTANT_LEVEL);
    Tasks_Logic::queue(Tasks_Logic::PHP, array(__DIR__ . "/comparecli.php", $bible, $compare, "{$jobId}"));
    Filter_Url::redirect("../jobs/index.php?id={$jobId}");
    die;
}
$header = new Assets_Header(Locale_Translate::_("Compare"));
$header->run();
// Names of the Bibles and the USFM Resources.
$names = array();
$database_bibles = Database_Bibles::getInstance();
$bibles = $database_bibles->getBibles();
$names = array_merge($names, $bibles);
$database_usfmresources = Database_UsfmResources::getInstance();
$usfm_resources = $database_usfmresources->getResources();
$names = array_merge($names, $usfm_resources);
$names = array_diff($names, array($bible));
$view = new Assets_View(__FILE__);
$view->view->bible = $bible;
Example #17
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.
*/
@($referer = $_SERVER["HTTP_REFERER"]);
@($referer = basename($referer));
if ($referer == "setup") {
    $referer = "index.php";
}
if (isset($_GET['referer'])) {
    $referer = $_GET['referer'] . ".php";
}
$steps = array("index.php", "writable1.php", "writable2.php", "libraries.php", "users1.php", "users2.php", "mail1.php", "mail2.php", "confirm1.php", "confirm2.php", "logs1.php", "logs2.php", "books1.php", "books2.php", "versifications1.php", "versifications2.php", "styles1.php", "styles2.php", "notes1.php", "notes2.php", "noteactions1.php", "noteactions2.php", "shell1.php", "shell2.php", "check1.php", "check2.php", "volatile1.php", "volatile2.php", "sprint1.php", "sprint2.php", "navigation1.php", "navigation2.php", "history1.php", "history2.php", "commits1.php", "commits2.php", "jobs1.php", "jobs2.php", "search1.php", "search2.php", "mappings1.php", "mappings2.php", "bibleactions1.php", "bibleactions2.php", "modifications1.php", "modifications2.php", "databases1.php", "databases2.php", "client1.php", "client2.php", "details.php", "binaries.php", "timer.php", "crontab.php", "apache.php", "write.php", "ready.php");
$key = array_search($referer, $steps);
if (is_numeric($key)) {
    $key++;
} else {
    $key = 0;
}
@($location = $steps[$key]);
if (!$location) {
    $location = "..";
}
include "../filter/url.php";
Filter_Url::redirect("{$location}");
Example #18
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::MANAGER_LEVEL);
$database_notes = Database_Notes::getInstance();
$notes_logic = Notes_Logic::getInstance();
$database_users = Database_Users::getInstance();
$id = $_GET['id'];
@($assign = $_GET['assign']);
if (isset($assign)) {
    if ($database_users->usernameExists($assign)) {
        $notes_logic->assignUser($id, $assign);
    }
    Filter_Url::redirect("actions.php?id={$id}");
    die;
}
$assets_header = new Assets_Header(Locale_Translate::_("Assign note"));
$assets_header->run();
$view = new Assets_View(__FILE__);
$view->view->id = $id;
// Notes can be assigned to users who have access to the Bibles the currently logged-in user has access to.
$bibles = Access_Bible::bibles();
$users = $database_users->getUsers();
foreach ($users as $offset => $user) {
    $access = false;
    foreach ($bibles as $bible) {
        if (!$access) {
            $access = $database_users->hasAccess2Bible($user, $bible);
        }
Example #19
0
<?php

/*
Copyright (©) 2003-2014 Teus Benschop.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

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.
*/
error_reporting(E_ALL);
// In server mode, there's a step that enters details for the admin user.
// In client mode, no users are created.
// To skip this admin page, simulate as if we're coming from that page.
copy("client.php", "../config/client.php");
include "../filter/url.php";
Filter_Url::redirect("binaries.php");
Example #20
0
$verses = Filter_Usfm::getVerseNumbers($usfm);
foreach ($verses as $verse) {
    $verse_usfm = Filter_Usfm::getVerseText($usfm, $verse);
    $xrefs = Filter_Usfm::extractNotes($verse_usfm, array("x"));
    foreach ($xrefs as $xref) {
        $xref['verse'] = $verse;
        $xref['offset'] = $xref[0];
        $xref['text'] = $xref[1];
        unset($xref[0]);
        unset($xref[1]);
        $allnotes[] = $xref;
    }
}
$identifier = Filter_User::myIdentifier();
$value = serialize($allnotes);
$database_volatile->setValue($identifier, "sourcexrefs", $value);
$empty = true;
foreach ($allnotes as $items) {
    if (!empty($items)) {
        $empty = false;
    }
}
if (!$empty) {
    Filter_Url::redirect("interpret.php");
    die;
}
$header = new Assets_Header(Locale_Translate::_("Cross references"));
$header->run();
$view = new Assets_View(__FILE__);
$view->render("extract.php");
Assets_Page::footer();