function page_access_level($level) { $session_logic = Session_Logic::getInstance(); if ($level > $session_logic->currentLevel()) { $header = new Assets_Header("Privileges"); $header->setLogin(); $header->run(); $view = new Assets_View(__FILE__); $view->render("privileges.php"); Assets_Page::footer(); die; } }
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);
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();
$database_bibles = Database_Bibles::getInstance(); $ipc_focus = Ipc_Focus::getInstance(); @($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.
public static function header($title, $searchQuery = "") { $header = new Assets_Header($title); $header->setSearchQuery($searchQuery); $header->run(); }
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); $database_resources = Database_Resources::getInstance(); $database_offlineresources = Database_OfflineResources::getInstance(); @($add = $_POST['entry']); if (isset($add)) { $database_resources->save($add, '<?php $output = "dummy"; ?>'); } @($delete = $_GET['delete']); if (isset($delete)) { // User cannot delete Resources in an open demo. include "config/open.php"; if (!$open_installation) { $database_resources->delete($delete); $database_offlineresources->delete($delete); } } $database_resources = Database_Resources::getInstance(); $header = new Assets_Header(Locale_Translate::_("Resources")); $header->jQueryUIOn("dialog"); $header->run(); $view = new Assets_View(__FILE__); $resources = $database_resources->getNames(); $view->view->resources = $resources; $view->render("admin.php"); Assets_Page::footer();
$database_config_user->setConsultationNotesBibleSelector(""); $database_config_user->setConsultationNotesAssignmentSelector(""); $database_config_user->setConsultationNotesSubscriptionSelector(0); $database_config_user->setConsultationNotesSeveritySelector(-1); $database_config_user->setConsultationNotesTextSelector(0); switch ($preset_selector) { case "assigned": $database_config_user->setConsultationNotesAssignmentSelector($session_logic->currentUser()); break; case "subscribed": $database_config_user->setConsultationNotesSubscriptionSelector(1); break; case "subscribeddayidle": $database_config_user->setConsultationNotesSubscriptionSelector(1); $database_config_user->setConsultationNotesNonEditSelector(1); break; case "subscribedweekidle": $database_config_user->setConsultationNotesSubscriptionSelector(1); $database_config_user->setConsultationNotesNonEditSelector(3); break; case "forverse": $database_config_user->setConsultationNotesPassageSelector(0); break; } } $header = new Assets_Header(Locale_Translate::_("Consultation Notes")); $header->setNavigator(); $header->run(); $view = new Assets_View(__FILE__); $view->render("index.php"); Assets_Page::footer();
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();
function display_header() { // Delayed header display. $header = new Assets_Header(Locale_Translate::_("Login")); $header->setBodyOnload('document.form.user.focus();'); $header->run(); }
<?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); $assets_header = new Assets_Header(Locale_Translate::_("Bibles")); $assets_header->run(); $view = new Assets_View(__FILE__); $bibles = Access_Bible::bibles(); // Add general Bible. $bibles[] = Notes_Logic::generalBibleName(); $view->view->bibles = $bibles; $view->render("bible-n.php"); Assets_Page::footer();
$userlevel = $session_logic->currentLevel(); if (!$exists) { // Check on existence of the job. $contents = Locale_Translate::_("This job does not exist."); } else { if ($level > $userlevel) { // Check user access to the job. $contents = Locale_Translate::_("This job is not available to you."); } else { if ($result != "") { $contents = $result; } else { if ($progress != "") { $contents = $progress; } else { $contents = Locale_Translate::_("The job is in the queue."); } } } } // If the result is still pending, refresh the page regularly. if ($result == "") { header("Refresh: 3"); } $header = new Assets_Header(Locale_Translate::_("Job")); $header->setEditorStylesheet(); $header->run(); $view = new Assets_View(__FILE__); $view->view->contents = $contents; $view->render("index.php"); Assets_Page::footer();
} if (isset($_GET['currentprint'])) { $database_config_user->setSprintMonth(date("n")); $database_config_user->setSprintYear(date("Y")); } if (isset($_GET['nextsprint'])) { $month = $database_config_user->getSprintMonth(); $year = $database_config_user->getSprintYear(); $time = mktime(0, 0, 0, $month + 1, 1, $year); $database_config_user->setSprintMonth(date("n", $time)); $database_config_user->setSprintYear(date("Y", $time)); } $bible = Access_Bible::clamp($database_config_user->getBible()); $month = $database_config_user->getSprintMonth(); $year = $database_config_user->getSprintYear(); $header = new Assets_Header(Locale_Translate::_("Sprint")); $view = new Assets_View(__FILE__); @($title = $_POST['add']); if (isset($title)) { $database_sprint->storeTask($bible, $year, $month, $title); $view->view->success = Locale_Translate::_("New task added"); // Focus the entry for adding tasks only in case a new task was added. $header->setBodyOnload('document.addtask.add.focus();'); } @($mail = $_GET['mail']); if (isset($mail)) { Sprint_Logic::burndown($bible, true); $view->view->success = Locale_Translate::_("The information was mailed to the subscribers"); // Give the burndown logic time to update the sprint history, // so the page will display the updated burndown chart. sleep(2);
$ipc_focus->set($passage['book'], $passage['chapter'], $passage['verse']); Navigation_Passage::recordHistory($passage['book'], $passage['chapter'], $passage['verse']); } // Set the correct default Bible for the user. $database_config_user = Database_Config_User::getInstance(); $bible = $database_modifications->getNotificationBible($id); if ($bible) { $database_config_user->setBible($bible); } die; } // Remove personal change proposals and their matching change notifications. if (isset($_GET['match'])) { $database_modifications->clearNotificationMatches($username, "☺", "♺"); } $header = new Assets_Header(Locale_Translate::_("Changes")); $header->setStylesheet(); $header->run(); $view = new Assets_View(__FILE__); // Read the identifiers but limit the number of results. $ids = array(); @($filter = $_GET['filter']); if ($filter == "personal") { $ids = $database_modifications->getNotificationPersonalIdentifiers($username, "☺", true); $view->view->filter = 1; } else { if ($filter == "team") { $ids = $database_modifications->getNotificationTeamIdentifiers($username, "♺", true); $view->view->filter = 2; } else { $ids = $database_modifications->getNotificationIdentifiers($username, true);
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); $header = new Assets_Header(Locale_Translate::_("Edit Note Source")); $header->setBodyOnload('document.noteid.identifier.focus();'); $header->run(); $view = new Assets_View(__FILE__); @($noteIdentifier = $_GET['identifier']); if (isset($_POST['identifier'])) { $noteIdentifier = $_POST['identifier']; $noteIdentifier = Filter_Numeric::integer_in_string($noteIdentifier); } $database_notes = Database_Notes::getInstance(); if (isset($_POST['data'])) { $noteData = $_POST['data']; if ($database_notes->identifierExists($noteIdentifier)) { $noteData = $database_notes->setContents($noteIdentifier, $noteData); $view->view->success = Locale_Translate::_("The note was saved"); } else {
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(); $ipc_focus = Ipc_Focus::getInstance(); $id = $_GET['id']; // When a note is opened, then the passage navigator should go to the passage that belongs to that note. $passages = $database_notes->getPassages($id); if (is_array($passages)) { if (!empty($passages)) { $ipc_focus->set($passages[0][0], $passages[0][1], $passages[0][2]); Navigation_Passage::recordHistory($passages[0][0], $passages[0][1], $passages[0][2]); } } $header = new Assets_Header(Locale_Translate::_("Note")); // After adding a comment to a note it returns to the note. // When doing nothing for several seconds, the browser then returns to the list of notes. if (isset($_GET['temporal'])) { $header->addHeadLine('<META HTTP-EQUIV="refresh" CONTENT="5;URL=index.php">'); } $header->run(); $view = new Assets_View(__FILE__); $view->view->id = $id; $summary = $database_notes->getSummary($id); $view->view->summary = $summary; $content = $database_notes->getContents($id); $view->view->content = $content; $view->render("note.php"); Assets_Page::footer();