本文整理汇总了PHP中Assets_View类的典型用法代码示例。如果您正苦于以下问题:PHP Assets_View类的具体用法?PHP Assets_View怎么用?PHP Assets_View使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Assets_View类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: page_access_level
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;
}
}
示例2: Assets_Header
echo "{$key}\n";
}
die;
}
@($id = $_GET['id']);
if (isset($id)) {
// Get the and passage for this identifier.
$passage = Filter_Books::integer2passage($id);
$book = $passage[0];
$chapter = $passage[1];
$verse = $passage[2];
// Get the plain text.
$text = $database_search->getBibleVerseText($bible, $book, $chapter, $verse);
// Format it.
$link = Filter_Books::linkForOpeningEditorAt($book, $chapter, $verse);
$output = "<div>{$link} {$text}</div>";
// Output to browser.
echo $output;
// Done.
die;
}
$header = new Assets_Header(Locale_Translate::_("Search"));
$header->run();
$view = new Assets_View(__FILE__);
$view->view->bible = $bible;
$script = <<<EOD
var searchBible = "{$bible}";
EOD;
$view->view->script = $script;
$view->render("originals.php");
Assets_Page::footer();
示例3: Copyright
<?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();
示例4: page_access_level
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);
$ids = array();
foreach ($order as $english) {
$id = $database_books->getIdFromEnglish($english);
示例5: page_access_level
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) {
$ids = $database_modifications->getNotificationIdentifiers($user);
示例6: Copyright
<?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();
示例7: page_access_level
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::_("Mail"));
$view = new Assets_View(__FILE__);
// Email form submission.
if (isset($_POST['email'])) {
$form_is_valid = true;
$sitename = $_POST['sitename'];
$sitemail = $_POST['sitemail'];
if (strlen($sitemail) > 0) {
$validator = new Zend_Validate_EmailAddress();
if (!$validator->isValid($sitemail)) {
$form_is_valid = false;
$view->view->site_name_error = Locale_Translate::_("The email address does not appear to be valid");
}
}
if ($form_is_valid) {
$config_general = Database_Config_General::getInstance();
$config_general->setSiteMailName($sitename);
示例8: footer
public static function footer()
{
$view = new Assets_View(__FILE__);
$view->render('footer.php');
$view->render('xhtml_finish.php');
}
示例9: Copyright
<?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);
$database_notes = Database_Notes::getInstance();
$header = new Assets_Header(Locale_Translate::_("Notes status"));
$header->run();
$view = new Assets_View(__FILE__);
$statuses = $database_notes->getPossibleStatuses();
$view->view->statuses = $statuses;
$view->render("status-n.php");
Assets_Page::footer();
示例10: page_access_level
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);
$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);
$view->view->url = $url;
$ready = false;
$database_shell = Database_Shell::getInstance();
$output = "";
$contents = array();
switch ($database_shell->logic("collaboration_take_repo", 0, $output)) {
case 1:
$workingdirectory = dirname(__FILE__);
$object = escapeshellarg($object);
shell_exec("cd {$workingdirectory}; php collaboration_take_repo-cli.php {$object} > {$output} 2>&1 &");
break;
示例11: page_access_level
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_history = Database_History::getInstance();
$session_logic = Session_Logic::getInstance();
$ipc_focus = Ipc_Focus::getInstance();
$username = $session_logic->currentUser();
$focused_book = $ipc_focus->getBook();
$focused_chapter = $ipc_focus->getChapter();
$focused_verse = $ipc_focus->getVerse();
$header = new Assets_Header(Locale_Translate::_("Change History"));
$header->setNavigator();
$header->setStylesheet();
$header->run();
$view = new Assets_View(__FILE__);
// Bits for the display state.
$state = array();
// Where to start displaying items.
// It displays a limited number of items for performance reasons.
@($start = $_GET['start']);
if (!isset($start)) {
$start = 0;
}
if (!is_numeric($start)) {
$start = 0;
}
$state['start'] = $start;
// Filter on Bible / book / chapter / verse.
@($passage = $_GET['passage']);
if (!isset($passage)) {
示例12: Assets_View
}
// Note unassign handler.
@($unassign = $_POST['unassign']);
if (isset($unassign)) {
$notes_logic->unassignUser(Filter_Numeric::integer_in_string($unassign), $session_logic->currentUser());
die;
}
// Note mark for deletion handler.
@($delete = $_POST['delete']);
if (isset($delete)) {
$identifier = Filter_Numeric::integer_in_string($delete);
$notes_logic->markForDeletion($identifier);
die;
}
// From here on the script will produce output.
$view = new Assets_View(__FILE__);
$session_logic = Session_Logic::getInstance();
$username = $session_logic->currentUser();
$level = $session_logic->currentLevel();
$view->view->level = $level;
// The identifier of the change notification.
@($id = $_GET["get"]);
$view->view->id = $id;
// Get old text, modification, new text.
$old_text = $database_modifications->getNotificationOldText($id);
$view->view->old_text = $old_text;
$modification = $database_modifications->getNotificationModification($id);
$view->view->modification = $modification;
$new_text = $database_modifications->getNotificationNewText($id);
$view->view->new_text = $new_text;
// Bibles and passage.
示例13: page_access_level
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();
示例14: page_access_level
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::_("Verse mappings"));
$view = new Assets_View(__FILE__);
$database_mappings = Database_Mappings::getInstance();
$session_logic = Session_Logic::getInstance();
$username = $session_logic->currentUser();
$userlevel = $session_logic->currentLevel();
$name = $_GET['name'];
$view->view->name = Filter_Html::sanitize($name);
//$write = $database_styles->hasWriteAccess ($username, $name);
$write = true;
if ($userlevel >= Filter_Roles::ADMIN_LEVEL) {
$write = true;
}
if (isset($_POST['submit'])) {
$data = $_POST['data'];
if ($write) {
$database_mappings->import($name, $data);
示例15: page_access_level
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();