Ejemplo n.º 1
0
 public static function getAll()
 {
     $database_config_user = Database_Config_User::getInstance();
     $database_styles = Database_Styles::getInstance();
     $styles_logic = Styles_Logic::getInstance();
     $stylesheet = $database_config_user->getStylesheet();
     // The styles.
     $data = $database_styles->getMarkersAndNames($stylesheet);
     $lines = array();
     $lines[] = '<select id="styleslist">';
     $line = Locale_Translate::_("Select style");
     $lines[] = "<option>{$line}</option>";
     foreach ($data as $item) {
         $marker = $item['marker'];
         $data = $database_styles->getMarkerData($stylesheet, $marker);
         $category = $data['category'];
         $category = $styles_logic->categoryText($category);
         $line = $marker . " " . $item['name'] . " (" . $category . ")";
         $lines[] = "<option>{$line}</option>";
     }
     $lines[] = '</select>';
     // Link for cancelling.
     $lines[] = " ";
     $lines[] = '<a href="cancel">[' . Locale_Translate::_("cancel") . ']</a>';
     $html = implode("\n", $lines);
     return $html;
 }
Ejemplo n.º 2
0
 public function __construct($header)
 {
     $this->view = new Assets_View(__FILE__);
     $caller_url = $_SERVER["PHP_SELF"] . "?" . http_build_query(array());
     $this->view->view->caller_url = $caller_url;
     $this->view->view->header = $header;
     $this->view->view->info_top = Locale_Translate::_("Here are the various options:");
     $this->view->view->info_bottom = Locale_Translate::_("Please pick one.");
 }
Ejemplo n.º 3
0
 /**
  * setup - Sets up a confirmation cycle in order to change something in the database.
  *         If e.g. the user requests the email address to be changed, an initial email will be
  *         sent, which the user should confirm.
  * $to - Email address for the initial email and the response.
  * $initial_subject - The subject of the initial email message.
  * $initial_body - The body of the initial email message.
  * $query - The query to be executed on the database if the user confirms the email successfully.
  * $subsequent_subject - The subject of the email to send upon user confirmation.
  * $subsequent_body - The body of the email to send upon user confirmation.
  */
 public function setup($to, $initial_subject, $initial_body, $query, $subsequent_subject, $subsequent_body)
 {
     $database_confirm = Database_Confirm::getInstance();
     $confirmation_id = $database_confirm->getNewID();
     $initial_subject .= " {$confirmation_id}";
     $initial_body .= "\n\n";
     $initial_body .= Locale_Translate::_("Please confirm this request by replying to this email. There is a confirmation number in the subject line. Your reply should have this same confirmation number in the subject line.");
     $database_mail = Database_Mail::getInstance();
     $database_mail->send($to, $initial_subject, $initial_body);
     $database_confirm->store($confirmation_id, $query, $to, $subsequent_subject, $subsequent_body);
 }
Ejemplo n.º 4
0
 public static function client_demo_warning()
 {
     $warning = "";
     if (Filter_Client::enabled()) {
         $database_config_general = Database_Config_General::getInstance();
         $address = $database_config_general->getServerAddress();
         if ($address == self::demo_address()) {
             $warning = Locale_Translate::_("Warning:") . " " . Locale_Translate::_("The client is connected to a public demo server.") . " " . Locale_Translate::_("Everybody can modify the data on that server.") . " " . Locale_Translate::_("After send and receive your data will reflect the data on the server.");
         }
     }
     return $warning;
 }
Ejemplo n.º 5
0
 /**
  * Creates book template with ID $book in Bible $bible.
  * If a $chapter is given instead of NULL, it creates that chapter only.
  */
 public static function create($bible, $book, $chapter, &$feedback)
 {
     $database_bibles = Database_Bibles::getInstance();
     $database_versifications = Database_Versifications::getInstance();
     $database_books = Database_Books::getInstance();
     $database_logs = Database_Logs::getInstance();
     $database_config_bible = Database_Config_Bible::getInstance();
     $bible_id = $database_bibles->getID($bible);
     if ($bible_id == 0) {
         $feedback[] = Locale_Translate::_("Bible {$bible} does not exist: Cannot create book");
         return false;
     }
     if ($book == 0) {
         $feedback[] = Locale_Translate::_("Invalid book while creating a book template");
         return false;
     }
     // The chapters that have been created.
     $chaptersCreated = array();
     // Chapter 0.
     if (!isset($chapter) || $chapter == 0) {
         $data = "\\id " . $database_books->getUsfmFromId($book) . "\n";
         $data .= "\\h " . $database_books->getEnglishFromId($book) . "\n";
         $data .= "\\toc2 " . $database_books->getEnglishFromId($book) . "\n";
         Bible_Logic::storeChapter($bible, $book, 0, $data);
         $chaptersCreated[] = 0;
     }
     // Subsequent chapters.
     $versification = $database_config_bible->getVersificationSystem($bible);
     $versification_data = $database_versifications->getBooksChaptersVerses($versification);
     foreach ($versification_data as $row) {
         if ($book == $row["book"]) {
             $ch = $row["chapter"];
             $verse = $row["verse"];
             if (!isset($chapter) || $chapter == $ch) {
                 $data = "\\c {$ch}\n";
                 $data .= "\\p\n";
                 for ($i = 1; $i <= $verse; $i++) {
                     $data .= "\\v {$i}\n";
                 }
                 Bible_Logic::storeChapter($bible, $book, $ch, $data);
                 $chaptersCreated[] = $ch;
             }
         }
     }
     // Done.
     if (count($chaptersCreated) == 0) {
         $feedback[] = Locale_Translate::_("No chapters have been craeted");
         return false;
     }
     $chaptersCreated = implode(" ", $chaptersCreated);
     $feedback[] = Locale_Translate::_("The following chapters have been created:") . " " . $chaptersCreated;
     return true;
 }
Ejemplo n.º 6
0
 /**
  * This filter produces files in USFM, html and text format.
  * The text files are to be used for showing the differences between them.
  * The files contain all verses that differ.
  * $bible: The Bible to go through.
  * $directory: The existing directory where to put the files.
  * Two files are created: verses_old.usfm and verses_new.usfm.
  * The book chapter.verse precede each verse.
  */
 public static function produceVerseLevel($bible, $directory)
 {
     $database_bibles = Database_Bibles::getInstance();
     $database_modifications = Database_Modifications::getInstance();
     $database_books = Database_Books::getInstance();
     $database_config_bible = Database_Config_Bible::getInstance();
     $stylesheet = $database_config_bible->getExportStylesheet($bible);
     $old_vs_usfm = array();
     $new_vs_usfm = array();
     $filter_text_old = new Filter_Text($bible);
     $filter_text_old->html_text_standard = new Html_Text(Locale_Translate::_("Bible"));
     $filter_text_old->text_text = new Text_Text();
     $filter_text_new = new Filter_Text($bible);
     $filter_text_new->html_text_standard = new Html_Text(Locale_Translate::_("Bible"));
     $filter_text_new->text_text = new Text_Text();
     $books = $database_modifications->getTeamDiffBooks($bible);
     foreach ($books as $book) {
         $bookname = $database_books->getEnglishFromId($book);
         $chapters = $database_modifications->getTeamDiffChapters($bible, $book);
         foreach ($chapters as $chapter) {
             // Go through the combined verse numbers in the old and new chapter.
             $old_chapter_usfm = $database_modifications->getTeamDiff($bible, $book, $chapter);
             $new_chapter_usfm = $database_bibles->getChapter($bible, $book, $chapter);
             $old_verse_numbers = Filter_Usfm::getVerseNumbers($old_chapter_usfm);
             $new_verse_numbers = Filter_Usfm::getVerseNumbers($new_chapter_usfm);
             $verses = array_merge($old_verse_numbers, $new_verse_numbers);
             $verses = array_unique($verses);
             sort($verses, SORT_NUMERIC);
             foreach ($verses as $verse) {
                 $old_verse_text = Filter_Usfm::getVerseText($old_chapter_usfm, $verse);
                 $new_verse_text = Filter_Usfm::getVerseText($new_chapter_usfm, $verse);
                 if ($old_verse_text != $new_verse_text) {
                     $usfmCode = "\\p {$bookname} {$chapter}.{$verse} {$old_verse_text}";
                     $old_vs_usfm[] = $usfmCode;
                     $filter_text_old->addUsfmCode($usfmCode);
                     $usfmCode = "\\p {$bookname} {$chapter}.{$verse} {$new_verse_text}";
                     $new_vs_usfm[] = $usfmCode;
                     $filter_text_new->addUsfmCode($usfmCode);
                 }
             }
         }
     }
     file_put_contents("{$directory}/verses_old.usfm", implode("\n", $old_vs_usfm));
     file_put_contents("{$directory}/verses_new.usfm", implode("\n", $new_vs_usfm));
     $filter_text_old->run($stylesheet);
     $filter_text_new->run($stylesheet);
     $filter_text_old->html_text_standard->save("{$directory}/verses_old.html");
     $filter_text_new->html_text_standard->save("{$directory}/verses_new.html");
     $filter_text_old->text_text->save("{$directory}/verses_old.txt");
     $filter_text_new->text_text->save("{$directory}/verses_new.txt");
 }
Ejemplo n.º 7
0
 public function create($breadcrumbs)
 {
     $tableElement = $this->htmlText->newTable();
     $tableRowElement = $this->htmlText->newTableRow($tableElement);
     $tableDataElement = $this->htmlText->newTableData($tableRowElement);
     if (is_array($breadcrumbs)) {
         $crumbAdded = false;
         foreach ($breadcrumbs as $breadcrumb) {
             if ($crumbAdded) {
                 $spanElement = $this->htmlText->newElement("span");
                 $spanElement->nodeValue = Filter_Html::sanitize("»");
                 $tableDataElement->appendChild($spanElement);
             }
             $this->htmlText->addLink($tableDataElement, $breadcrumb[1], "", $breadcrumb[0], "", ' ' . $breadcrumb[0] . ' ');
             $crumbAdded = true;
         }
     }
     $tableDataElement = $this->htmlText->newTableData($tableRowElement, true);
     $formElement = $this->htmlText->newElement("form");
     $tableDataElement->appendChild($formElement);
     $formElement->setAttribute("action", "../../../webbible/search.php");
     $formElement->setAttribute("method", "GET");
     $formElement->setAttribute("name", "search");
     $formElement->setAttribute("id", "search");
     $inputElement = $this->htmlText->newElement("input");
     $formElement->appendChild($inputElement);
     $inputElement->setAttribute("name", "q");
     $inputElement->setAttribute("type", "text");
     $inputElement->setAttribute("placeholder", Locale_Translate::_("Search the Bible"));
     $inputElement = $this->htmlText->newElement("input");
     $formElement->appendChild($inputElement);
     $inputElement->setAttribute("type", "image");
     $inputElement->setAttribute("name", "search");
     $inputElement->setAttribute("src", "lens.png");
     $inputElement = $this->htmlText->newElement("input");
     $formElement->appendChild($inputElement);
     $inputElement->setAttribute("type", "hidden");
     $inputElement->setAttribute("name", "url");
     $inputElement->setAttribute("value", $this->searchBackLinkUrl);
     $inputElement = $this->htmlText->newElement("input");
     $formElement->appendChild($inputElement);
     $inputElement->setAttribute("type", "hidden");
     $inputElement->setAttribute("name", "text");
     $inputElement->setAttribute("value", $this->searchBackLinkText);
 }
Ejemplo n.º 8
0
 public static function text($role)
 {
     switch ($role) {
         case self::GUEST_LEVEL:
             return Locale_Translate::_("Guest");
         case self::MEMBER_LEVEL:
             return Locale_Translate::_("Member");
         case self::CONSULTANT_LEVEL:
             return Locale_Translate::_("Consultant");
         case self::TRANSLATOR_LEVEL:
             return Locale_Translate::_("Translator");
         case self::MANAGER_LEVEL:
             return Locale_Translate::_("Manager");
         case self::ADMIN_LEVEL:
             return Locale_Translate::_("Administrator");
     }
     return Locale_Translate::_("Guest");
 }
Ejemplo n.º 9
0
 /**
  * Dialog that presents the user with a list of options and asks the user to pick one.
  * $query: Array with the basic query parameters for the page where to go on clicking Cancel or making a choice.
  * $info_top, $info_bottom - If these are left empty, they take standard values.
  * $horizontal - if true the list of options shows horizontally, rather than vertically, and the $info_ does not show.
  */
 public function __construct($query, $header, $info_top, $info_bottom, $horizontal = false)
 {
     $this->view = new Assets_View(__FILE__);
     $caller_url = $_SERVER["PHP_SELF"];
     if (is_array($query)) {
         $full_query = array();
         foreach ($query as $value) {
             $full_query = array_merge($full_query, array($value => $_GET[$value]));
         }
         $caller_url .= "?" . http_build_query($full_query);
     }
     $this->view->view->caller_url = $caller_url;
     $this->view->view->header = $header;
     if ($info_top == "") {
         $info_top = Locale_Translate::_("Here are the various options:");
     }
     $this->view->view->info_top = $info_top;
     if ($info_bottom == "") {
         $info_bottom = Locale_Translate::_("Please pick one.");
     }
     $this->view->view->info_bottom = $info_bottom;
     $this->view->view->horizontal = $horizontal;
 }
Ejemplo n.º 10
0
<li>
  <?php 
echo Locale_Translate::_("Can synchronize the local Consultation Notes with the Consultation Notes on a Bibledit-Web server.");
?>
</li>
<li>
  <?php 
echo Locale_Translate::_("After connecting to a server, the first time you synchronize, you will get the same data as on the server.");
?>
  <?php 
echo Locale_Translate::_("Local Bible data and Notes not on the server will be erased.");
?>
  <?php 
echo Locale_Translate::_("Bible data and Notes on the server will be downloaded.");
?>
  <?php 
echo Locale_Translate::_("This is good because it means that your data will be backed up to the server.");
?>
</li>
<li>
  <?php 
echo Locale_Translate::_("Does not send or receive email.");
?>
</li>
<li>
  <?php 
echo Locale_Translate::_("User is always logged in.");
?>
</li>
</ul>
Ejemplo n.º 11
0
echo Locale_Translate::_("missing punctuation at the end of a verse");
?>
</p>

<p>
<a href="settings.php?patterns=">
<?php 
if ($this->check_patterns == true) {
    ?>
 ☑ <?php 
} else {
    ?>
 ☐ <?php 
}
?>
</a>
  <?php 
echo Locale_Translate::_("patterns in the text");
?>
  [<a href="settingspatterns.php"><?php 
echo Locale_Translate::_("settings");
?>
</a>]
</p>

<br>
<p><a href="settingssentences.php"><?php 
echo Locale_Translate::_("Settings for the sentence structure");
?>
</a></p>
Ejemplo n.º 12
0
// Store the verse USFM in the array.
$usfmArray[$verse] = $usfm;
// Create the updated chapter USFM as a string.
$usfm = implode("\n", $usfmArray);
$stylesheet = $database_config_user->getStylesheet();
$book_chapter_text = Filter_Usfm::import($usfm, $stylesheet);
foreach ($book_chapter_text as $data) {
    $book_number = $data[0];
    $chapter_number = $data[1];
    $chapter_data_to_save = $data[2];
    if (($book_number == $book || $book_number == 0) && $chapter_number == $chapter) {
        // Collect some data about the changes for this user.
        $username = $session_logic->currentUser();
        $oldID = $database_bibles->getChapterId($bible, $book, $chapter);
        $oldText = $database_bibles->getChapter($bible, $book, $chapter);
        // Safely store the chapter.
        $saved = Filter_Bibles::safeStoreChapter($bible, $book, $chapter, $chapter_data_to_save);
        if ($saved) {
            // Store details for the user's changes.
            $newID = $database_bibles->getChapterId($bible, $book, $chapter);
            $newText = $chapter_data_to_save;
            $database_modifications->recordUserSave($username, $bible, $book, $chapter, $oldID, $oldText, $newID, $newText);
            echo Locale_Translate::_("Saved");
        } else {
            echo Locale_Translate::_("Not saved because of too many changes");
        }
    } else {
        echo Locale_Translate::_("Save failure");
        $database_logs->log("The following data could not be saved and was discarded: " . $chapter_data_to_save);
    }
}
Ejemplo n.º 13
0
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.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::TRANSLATOR_LEVEL);
$header = new Assets_Header(Locale_Translate::_("Order"));
$header->jQueryUIOn("sortable");
$header->run();
$view = new Assets_View(__FILE__);
$database_config_bible = Database_Config_Bible::getInstance();
$database_books = Database_Books::getInstance();
$database_bibles = Database_Bibles::getInstance();
$bible = Access_Bible::clamp($_GET['bible']);
$view->view->bible = Filter_Html::sanitize($bible);
@($reset = $_GET["reset"]);
if (isset($reset)) {
    $database_config_bible->setBookOrder($bible, "");
}
@($order = $_POST['order']);
if (isset($order)) {
    $order = explode(",", $order);
Ejemplo n.º 14
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.
*/
?>
<h1><?php 
echo Locale_Translate::_("Public");
?>
</h1>
<p><a href="bibleworks2esword.php"><?php 
echo Locale_Translate::_("Tool to convert a text file suitable for BibleWorks into a text file suitable for eSword");
?>
</a></p>
Ejemplo n.º 15
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.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::CONSULTANT_LEVEL);
$database_notes = Database_Notes::getInstance();
$notes_logic = Notes_Logic::getInstance();
$database_users = Database_Users::getInstance();
$header = new Assets_Header(Locale_Translate::_("Severity"));
$header->run();
$view = new Assets_View(__FILE__);
$severities = $database_notes->getPossibleSeverities();
$view->view->severities = $severities;
$view->render("severity-n.php");
Assets_Page::footer();
Ejemplo n.º 16
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.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::GUEST_LEVEL);
Assets_Page::header(Locale_Translate::_("Navigation"));
$view = new Assets_View(__FILE__);
$view->render("navigation.php");
Assets_Page::footer();
Ejemplo n.º 17
0
</p>
<p><?php 
echo Locale_Translate::_("What to do with the search results");
?>
:</p>
<p><input type="radio" id="load" name="share" checked="checked"><?php 
echo Locale_Translate::_("Display them on the page");
?>
</p>
<p><input type="radio" id="add" name="share"><?php 
echo Locale_Translate::_("Add them to the ones already on the page");
?>
</p>
<p><input type="radio" id="remove" name="share"><?php 
echo Locale_Translate::_("Remove them from the ones already on the page");
?>
</p>
<p><input type="radio" id="intersect" name="share"><?php 
echo Locale_Translate::_("Display the intersection of them and the ones already on the page");
?>
</p>
<div id="searchresults"></div>
<script><?php 
echo $this->script;
?>
</script>
<script type="text/javascript" src="search2.js?<?php 
echo Config_Logic::version();
?>
"></script>
Ejemplo n.º 18
0
<li>
  <p><?php 
echo Locale_Translate::_("Make everything to be owned by the web server user:"******"Configure access control:");
?>
</p>
  <p><code>$ sudo cp /var/www/bibledit-web/config/lighttpd.conf /etc/lighttpd/conf-enabled</code></p>
</li>
<li>
  <p><?php 
echo Locale_Translate::_("Reload the web server so the new configuration takes effect:");
?>
</p>
  <p><code>$ sudo service lighttpd restart</code></p>
</li>
<li><?php 
echo Locale_Translate::_("Bibledit-Web will be accessible through:");
?>
 http://website.org/bibledit-web.</li>
<li><?php 
echo Locale_Translate::_("Open the web address in the browser, and follow the steps on the screen to configure Bibledit-Web and log in.");
?>
</li>
</ol>
Ejemplo n.º 19
0
</p>
<p>
  * <?php 
echo Locale_Translate::_("Slowing down the network connection.");
?>
</p>
<p>
  * <?php 
echo Locale_Translate::_("Slowing down the shell server.");
?>
</p>
<p>
  <?php 
echo Locale_Translate::_("It has also been observed that the Bibledit databases regularly got corrupted due to insufficient file locking on the shared platform.");
?>
</p>
<p>
  <?php 
echo Locale_Translate::_("To make good use of Bibledit-Web, a VPS (Virtual Private Server) is recommended.");
?>
  <?php 
echo Locale_Translate::_("Good providers are:");
?>
</p>
<p>
  * <a href="http://ramnode.com/vps.php">RamNode</a>, Premium OpenVZ SSD 128MB for $15 per year (2014).
</p>
<p>
  * <a href="https://www.digitalocean.com/?refcode=5189a8e56d7a">Digital Ocean</a>, 512 Mb / 1 CPU / 20 Gb SSD Disk for $5 per month = $60 per year (2014).
</p>
Ejemplo n.º 20
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.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::GUEST_LEVEL);
Assets_Page::header(Locale_Translate::_("Typesetting in InDesign"));
$view = new Assets_View(__FILE__);
$view->render("typesettingindesign.php");
Assets_Page::footer();
Ejemplo n.º 21
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.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::MANAGER_LEVEL);
Assets_Page::header(Locale_Translate::_("Import"));
$file = $_GET['file'];
$folder = Filter_Archive::uncompress($file, true);
$view = new Assets_View(__FILE__);
$view->view->folder = $folder;
$view->render("import3.php");
Assets_Page::footer();
    foreach ($output as $line) {
        echo "{$line}\n";
    }
}
$command = "cd {$shelldirectory}; git commit -a -m admin-sync";
echo "{$command}\n";
exec($command, $output, $exit_code);
echo "Exit code {$exit_code}\n";
if ($exit_code != 0) {
    foreach ($output as $line) {
        echo "{$line}\n";
    }
}
// Push data to remote repository.
echo Locale_Translate::_("Step 2/2: Pushing the data to the remote repository") . "\n";
$command = "cd {$shelldirectory}; git push 2>&1";
echo "{$command}\n";
exec($command, $output, $exit_code);
if ($exit_code == 0) {
    echo Locale_Translate::_("Your data was pushed to the remote repository successfully.") . "\n";
} else {
    echo "Exit code {$exit_code}\n";
    foreach ($output as $line) {
        echo "{$line}\n";
    }
    echo Locale_Translate::_("Pushing your data to the remote repository failed.") . "\n";
}
// Sync the data to the USB flash drive to avoid data loss when the USB flash drive is unplugged before data was written to it.
exec("sync");
$database_shell = Database_Shell::getInstance();
$database_shell->stopProcess("collaboration_take_yourself", 0);
Ejemplo n.º 23
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.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::GUEST_LEVEL);
Assets_Page::header(Locale_Translate::_("Methodology"));
$view = new Assets_View(__FILE__);
$view->render('methodology.php');
Assets_Page::footer();
Ejemplo n.º 24
0
    foreach ($bibles as $bible) {
        if ($font == $database_config_bible->getTextFont($bible)) {
            $font_in_use = true;
        }
    }
    if (!$font_in_use) {
        unlink($font);
    } else {
        Assets_Page::error(Locale_Translate::_("The font could not be deleted because it is in use."));
    }
}
// Upload a font.
if (isset($_POST['upload'])) {
    // Upload may take time in case the file is large or the network is slow.
    ignore_user_abort(true);
    set_time_limit(0);
    $filename = $_FILES['data']['name'];
    $tmpfile = $_FILES['data']['tmp_name'];
    if (move_uploaded_file($tmpfile, $filename)) {
        Assets_Page::success(Locale_Translate::_("The font has been uploaded."));
    } else {
        Assets_Page::error(Filter_Upload::error2text($_FILES['data']['error']));
    }
}
$header = new Assets_Header(Locale_Translate::_("Fonts"));
$header->run();
$view = new Assets_View(__FILE__);
$view->view->upload_max_filesize = ini_get("upload_max_filesize");
$view->view->fonts = Fonts_Logic::getFonts();
$view->render("index.php");
Assets_Page::footer();
Ejemplo n.º 25
0
?>
<h3><?php 
echo Locale_Translate::_("Select the new status for the note");
?>
</h3>
<ul>
<?php 
foreach ($this->statuses as $status) {
    ?>
  <li><a href="status-1.php?id=<?php 
    echo $this->id;
    ?>
&status=<?php 
    echo $status[0];
    ?>
"><?php 
    echo $status[0];
    ?>
</a></li>
<?php 
}
?>
</ul>
<h4><a href="actions.php?id=<?php 
echo $this->id;
?>
"><?php 
echo Locale_Translate::_("Cancel");
?>
</a></h4>
Ejemplo n.º 26
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.
*/
?>
<h1><?php 
echo Locale_Translate::_("Welcome");
?>
</h1>
<p><?php 
echo Locale_Translate::_("You have logged in.");
?>
</p>
Ejemplo n.º 27
0
?>
</p>
</li>

<li>
<p>
  <?php 
echo Locale_Translate::_("Start it through the menu.");
?>
</p>
</li>

<li>
<p>
  <?php 
echo Locale_Translate::_("Open Bibledit.");
?>
</p>
</li>

<li>
<p>
  <?php 
echo Locale_Translate::_("Follow the steps in the browser for the initial configuration.");
?>
</p>
</li>

</ol>

Ejemplo n.º 28
0
<li>
  <p><?php 
echo Locale_Translate::_("Make everything readable and writable to the web server user through the following commands");
?>
</p>
  <p><code>$ chown -R apache:apache bibledit-web</code></p>
</li>
<li><?php 
echo Locale_Translate::_("Bibledit-Web will be accessible through:");
?>
 http://website.org/bibledit-web.</li>
<li><?php 
echo Locale_Translate::_("Open the web address in the browser, and follow the steps on the screen to configure Bibledit-Web and log in.");
?>
</li>
<li>
  <a href="http://stackoverflow.com/questions/8551740/centos-htaccess-not-being-read" target="_blank"><?php 
echo Locale_Translate::_("Enable the use of .htaccess files in Apache to secure some Bibledit-Web folders.");
?>
</a>
  <?php 
echo Locale_Translate::_("Set");
?>
  <code>AllowOverride All</code>
  <?php 
echo Locale_Translate::_("in file");
?>
  <code>httpd.conf</code>.
</li>
</ol>
Ejemplo n.º 29
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.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::ADMIN_LEVEL);
Assets_Page::header(Locale_Translate::_("Collaboration"));
$view = new Assets_View(__FILE__);
$object = $_GET['object'];
$view->view->object = $object;
$database_config_bible = Database_Config_Bible::getInstance();
$url = $database_config_bible->getRemoteRepositoryUrl($object);
$directory = Filter_Git::git_directory($object);
$view->render("collaboration_repo_data.php");
Assets_Page::footer();
Ejemplo n.º 30
0
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.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::MANAGER_LEVEL);
Assets_Page::header(Locale_Translate::_("Changes"));
$view = new Assets_View(__FILE__);
$database_modifications = Database_Modifications::getInstance();
$config_general = Database_Config_General::getInstance();
$database_logs = Database_Logs::getInstance();
@($clear = $_GET['clear']);
if (isset($clear)) {
    // Just in case there are many change notifications to clear, be sure the script does not time out or abort.
    ignore_user_abort(true);
    set_time_limit(0);
    $database_modifications->clearNotificationsUser($clear);
}
$users = Access_User::assignees();
$pendingUsers = array();
$pendingCount = array();
foreach ($users as $user) {