Ejemplo n.º 1
4
 /**
  * Constructs a book dialog
  * $action - GET or POST action to take.
  * $inclusions - NULL (in which case it does nothing), or an array of book IDs to include.
  * $exclusions - NULL (in which case it does nothing), or an array of book IDs to exclude.
  */
 public function __construct($header, $info_top, $info_bottom, $action, $inclusions, $exclusions)
 {
     $this->view = new Assets_View(__FILE__);
     $caller = $_SERVER["PHP_SELF"] . "?" . http_build_query(array());
     $this->view->view->caller = $caller;
     $this->view->view->header = $header;
     $this->view->view->info_top = $info_top;
     $this->view->view->info_bottom = $info_bottom;
     $this->view->view->action = $action;
     $database_books = Database_Books::getInstance();
     $book_ids = $database_books->getIDs();
     if (is_array($inclusions)) {
         $book_ids = $inclusions;
     }
     if (is_array($exclusions)) {
         $book_ids = array_diff($book_ids, $exclusions);
         $book_ids = array_values($book_ids);
     }
     foreach ($book_ids as $id) {
         $book_names[] = $database_books->getEnglishFromId($id);
     }
     $this->view->view->book_ids = $book_ids;
     $this->view->view->book_names = $book_names;
     $this->view->render("books2.php");
     Assets_Page::footer();
     die;
 }
Ejemplo n.º 2
0
 public function run()
 {
     $this->view->view->text_lines = $this->text_lines;
     $this->view->view->get_parameters = $this->get_parameters;
     $this->view->render("list.php");
     Assets_Page::footer();
 }
Ejemplo n.º 3
0
 /**
  * Dialog that asks the user for confirmation to perform an action.
  * $query: Array with the basic query parameters for the page where to go on clicking Cancel or Yes.
  * $question: The question to ask.
  * $action: String with the query parameter to add to the basic query in order to perform the desired action.
  */
 public function __construct($query, $question, $action)
 {
     $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;
     if ($action != "") {
         $full_query = array($action => $_GET[$action]);
         if (is_array($query)) {
             $action = "&";
         } else {
             $action = "?";
         }
         $action .= http_build_query($full_query);
     }
     $this->view->view->action = $action;
     $this->view->view->question = $question;
     $this->view->render("yes.php");
     Assets_Page::footer();
 }
Ejemplo n.º 4
0
 /**
  * Dialog that asks the user for confirmation to perform an action.
  * $question: The question to ask.
  * $action: String with the query parameter to add to the basic query.
  * In case the user gives confirmation, then the following parameters are added: &confirm=yes
  */
 public function __construct($question, $action)
 {
     $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->action = $action;
     $this->view->view->question = $question;
     $this->view->render("yes2.php");
     Assets_Page::footer();
     die;
 }
Ejemplo n.º 5
0
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;
    }
}
Ejemplo n.º 6
0
 /**
  * Entry dialog constructor
  * $query   : Nothing, or array with query variables, e.g. array ("search" => "bibledit").
  *            If any $query is passed, if Cancel is clicked in this dialog, it should go go back
  *            to the original caller page  with the $query added. Same for Ok, it would post
  *            the value entered, but also add the $query to the url.
  * $question: The question to be asked.
  * $value   : The initial value to be put into the entry.
  * $submit  : Name of POST request to submit the information.
  * $help    : Help information explaining to the user what's going on.
  */
 public function __construct($query, $question, $value, $submit, $help)
 {
     $this->view = new Assets_View(__FILE__);
     $base_url = $_SERVER['PHP_SELF'];
     if (is_array($query)) {
         $base_url .= "?" . http_build_query($query);
     }
     $this->view->view->base_url = $base_url;
     $this->view->view->question = $question;
     $this->view->view->value = $value;
     $this->view->view->submit = $submit;
     $this->view->view->help = $help;
     $this->view->render("entry.php");
     Assets_Page::footer();
 }
Ejemplo n.º 7
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.º 8
0
 public function run()
 {
     $this->view->render("text.php");
     Assets_Page::footer();
     die;
 }