本文整理汇总了PHP中_load_language_file函数的典型用法代码示例。如果您正苦于以下问题:PHP _load_language_file函数的具体用法?PHP _load_language_file怎么用?PHP _load_language_file使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_load_language_file函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_preview_code
function show_preview_code($row)
{
global $xerte_toolkits_site;
$string_for_flash = $xerte_toolkits_site->users_file_area_short . $row['template_id'] . "-" . $row['username'] . "-" . $row['template_name'] . "/";
$xmlfile = $string_for_flash . "preview.xml";
$xmlFixer = new XerteXMLInspector();
$xmlFixer->loadTemplateXML($xmlfile);
if (strlen($xmlFixer->getName()) > 0) {
$title = $xmlFixer->getName();
} else {
$title = XERTE_PREVIEW_TITLE;
}
$string_for_flash_xml = $xmlfile . "?time=" . time();
$string_for_flash = $xerte_toolkits_site->users_file_area_short . $row['template_id'] . "-" . $row['username'] . "-" . $row['template_name'] . "/";
$template_path_string = "modules/decision/parent_templates/" . $row['template_name'] . "/";
require_once "config.php";
_load_language_file("/modules/decision/preview.inc");
// $engine is assumed to be html5 if flash is NOT set
$page_content = file_get_contents($xerte_toolkits_site->basic_template_path . $row['template_framework'] . "/player_html5/rloObject.htm");
$page_content = str_replace("%TITLE%", $title, $page_content);
$page_content = str_replace("%TEMPLATEPATH%", $template_path_string, $page_content);
$page_content = str_replace("%XMLPATH%", $string_for_flash, $page_content);
$page_content = str_replace("%XMLFILE%", $string_for_flash_xml, $page_content);
echo $page_content;
}
示例2: dont_show_template
function dont_show_template($optional = '')
{
global $xerte_toolkits_site;
_load_language_file("/modules/xerte/module_functions.inc");
$edit_site_logo = $xerte_toolkits_site->site_logo;
$pos = strrpos($edit_site_logo, '/') + 1;
$edit_site_logo = substr($edit_site_logo, 0, $pos) . "edit_" . substr($edit_site_logo, $pos);
$edit_organisational_logo = $xerte_toolkits_site->organisational_logo;
$pos = strrpos($edit_organisational_logo, '/') + 1;
$edit_organisational_logo = substr($edit_organisational_logo, 0, $pos) . "edit_" . substr($edit_organisational_logo, $pos);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="modules/Xerte/js/swfobject.js"></script>
<script src="website_code/scripts/opencloseedit.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="website_code/styles/frontpage.css" media="screen" type="text/css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto; width:800px">
<div class="edit_topbar" style="width:800px">
<img src="<?php
echo $edit_site_logo;
?>
" style="margin-left:10px; float:left" />
<img src="<?php
echo $edit_organisational_logo;
?>
" style="margin-right:10px; float:right" />
</div>
<div style="margin:0 auto">
<?php
echo XERTE_DISPLAY_FAIL;
if ($optional !== '') {
echo '</div><div>' . $optional;
}
?>
</div></div></body></html><?php
die;
}
示例3: _load_language_file
<?php
_load_language_file("/website_code/php/workspaceproperties/workspace_library.inc");
function workspace_templates_menu()
{
echo "<p class=\"header\"><span>My projects</span></p>";
echo "<div class=\"menu_holder\"><div class=\"menu_button\"><a href=\"javascript:workspace_templates_template()\">" . WORKSPACE_LIBRARY_MY . "</a></div>";
echo "<div class=\"menu_button\"><a href=\"javascript:shared_templates_template()\">" . WORKSPACE_LIBRARY_SHARED . "</a></div>";
echo "<div class=\"menu_button\"><a href=\"javascript:public_templates_template()\">" . WORKSPACE_LIBRARY_PUBLIC . "</a></div>";
echo "<div class=\"menu_button\"><a href=\"javascript:usage_templates_template()\">" . WORKSPACE_LIBRARY_USAGE . "</a></div>";
echo "<div class=\"menu_button\"><a href=\"javascript:rss_templates_template()\">" . WORKSPACE_LIBRARY_RSS . "</div>";
echo "<div class=\"menu_button\"><a href=\"javascript:syndication_templates_template()\">" . WORKSPACE_LIBRARY_OPEN . "</a></div>";
echo "<div class=\"menu_button\"><a href=\"javascript:peer_templates_template()\">" . WORKSPACE_LIBRARY_PEER . "</a></div>";
echo "<div class=\"menu_button\"><a href=\"javascript:xml_templates_template()\">" . WORKSPACE_LIBRARY_XML . "</a></div>";
echo "</div>";
}
function workspace_menu_create($size)
{
echo "<div style=\"clear:left; margin-left:20px; margin-top:10px; width:90%; float:left;\">";
echo "<div style=\"float:left; width:" . $size . "%; height:20px;\">" . WORKSPACE_LIBRARY_TEMPLATE_NAME . "</div>";
}
示例4: _load_language_file
<?php
/**
*
* duplicate_template, allows the template to be duplicated
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/
require_once "../../../config.php";
include "../user_library.php";
include "../template_library.php";
include "../template_status.php";
_load_language_file("/website_code/php/templates/duplicate_template.inc");
$database_connect_id = database_connect("new_template database connect success", "new_template database connect fail");
/*
* get the root folder for this user
*/
if (is_numeric($_POST['template_id'])) {
if (is_user_creator(mysql_real_escape_string($_POST['template_id']))) {
if ($_POST['folder_id'] == "workspace") {
$folder_id = get_user_root_folder();
} else {
$folder_id = $_POST['folder_id'];
}
/*
* get the maximum id number from templates, as the id for this template
*/
$maximum_template_id = get_maximum_template_number();
示例5: _load_language_file
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
_load_language_file("/modules/xerte/export_page.inc");
echo "<p>" . XERTE_EXPORT_DESCRIPTION . "</p>";
if (get_default_engine($_POST['template_id']) == 'javascript') {
echo "<p><img id=\"html5\" src=\"website_code/images/TickBoxOn.gif\" onclick=\"javascript:export_engine_toggle('html5')\" /> " . XERTE_EXPORT_HTML5 . "</p>";
echo "<p><img id=\"flash\" src=\"website_code/images/TickBoxOff.gif\" onclick=\"javascript:export_engine_toggle('flash')\" /> " . XERTE_EXPORT_FLASH . "</p>";
} else {
echo "<p><img id=\"html5\" src=\"website_code/images/TickBoxOff.gif\" onclick=\"javascript:export_engine_toggle('html5')\" /> " . XERTE_EXPORT_HTML5 . "</p>";
echo "<p><img id=\"flash\" src=\"website_code/images/TickBoxOn.gif\" onclick=\"javascript:export_engine_toggle('flash')\" /> " . XERTE_EXPORT_FLASH . "</p>";
}
echo "<ol type='1'>";
echo "<li>" . XERTE_EXPORT_ZIP . "<ul><li><button type=\"button\" class=\"xerte_button\" onclick=\"property_tab_download('download_frame', 'html5', 'flash', '" . $xerte_toolkits_site->site_url . url_return("export", $_POST['template_id']) . "')\"><i class=\"fa fa-download\"></i> " . XERTE_EXPORT_ZIP_LINK . "</button></li></ul></li><br />";
echo "<li>" . XERTE_EXPORT_SCORM;
echo "<ol type='a'>";
echo "<li><button type=\"button\" class=\"xerte_button\" onclick=\"property_tab_download('download_frame', 'html5', 'flash', '" . $xerte_toolkits_site->site_url . url_return("scorm_rich", $_POST['template_id']) . "')\"><i class=\"fa fa-download\"></i> " . XERTE_EXPORT_SCORM_12_LINK . "</button></li><br/>";
echo "<li><button type=\"button\" class=\"xerte_button\" onclick=\"property_tab_download('download_frame', 'html5', 'flash', '" . $xerte_toolkits_site->site_url . url_return("scorm2004", $_POST['template_id']) . "')\"><i class=\"fa fa-download\"></i> " . XERTE_EXPORT_SCORM_2004_LINK . "</button></li><br /></ol></li>";
echo "<li>" . XERTE_EXPORT_ZIP_ARCHIVE . "<ul><li><button type=\"button\" class=\"xerte_button\" onclick=\"property_tab_download('download_frame', 'html5', 'flash', '" . $xerte_toolkits_site->site_url . url_return("export_full", $_POST['template_id']) . "')\"><i class=\"fa fa-download\"></i> " . XERTE_EXPORT_ZIP_ARCHIVE_LINK . "</button></li></ul><br /></li>";
示例6: dirname
* additional information regarding copyright ownership.
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once dirname(__FILE__) . "/config.php";
require_once dirname(__FILE__) . "/website_code/php/template_library.php";
_load_language_file("/properties.inc");
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php
echo PROPERTIES_TITLE;
?>
</title>
<!--
Properties HTML page
Version 1.0
示例7: _load_language_file
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once "../../../config.php";
require "../user_library.php";
if (is_user_admin()) {
_load_language_file("/extend.inc");
if (file_exists($xerte_toolkits_site->root_file_path . "modules/" . $_POST['name'] . "/templates/")) {
$dir = opendir($xerte_toolkits_site->root_file_path . "modules/" . $_POST['name'] . "/templates/");
while ($template = readdir($dir)) {
if ($template != "." && $template != "..") {
$data = file_get_contents($xerte_toolkits_site->root_file_path . "modules/" . $_POST['name'] . "/templates/" . $template . "/" . $template . ".info");
$info = explode("\n", $data);
$template_object = array();
$template_name = array();
while ($attribute = array_pop($info)) {
$attr_data = explode(":", $attribute);
$template_object['name'] = trim($inner_folder);
$template_name['name'] = trim($inner_folder);
switch (trim(strtolower($attr_data[0]))) {
case "display name":
$template_object['display_name'] = trim($attr_data[1]);
示例8: dont_show_template
dont_show_template();
} else {
if ($row_play['access_to_whom'] == "Public") {
/*
* Public - Increment the number of users and show the template
*/
db_query("UPDATE {$xerte_toolkits_site->database_table_prefix}templatedetails SET number_of_uses=number_of_uses+1 WHERE template_id=?", array($safe_template_id));
show_template($row_play);
} else {
if ($row_play['access_to_whom'] == "Password") {
/*
* Password protected - Check if there has been a post
*/
// if ($_SERVER['REQUEST_METHOD'] == 'POST') {
require_once $xerte_toolkits_site->php_library_path . "login_library.php";
_load_language_file("/website_code/php/display_library.inc");
if (!isset($mysqli)) {
$mysqli = new mysqli($xerte_toolkits_site->database_host, $xerte_toolkits_site->database_username, $xerte_toolkits_site->database_password, $xerte_toolkits_site->database_name);
if ($mysqli->error) {
try {
throw new Exception("0MySQL error {$mysqli->error} <br> Query:<br> {$query}", $mysqli->errno);
} catch (Exception $e) {
echo "Error No: " . $e->getCode() . " - " . $e->getMessage() . "<br />";
echo nl2br($e->getTraceAsString());
}
}
}
if (!isset($lti)) {
require_once 'LTI/ims-lti/UoN_LTI.php';
if (strlen($xerte_toolkits_site->database_table_prefix) > 0) {
$lti = new UoN_LTI($mysqli, array('table_prefix' => $xerte_toolkits_site->database_table_prefix));
示例9: dirname
<?php
require_once dirname(__FILE__) . "/config.php";
_load_language_file("/workspaceproperties.inc");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><?php
echo WORKSPACE_PROPERTIES_TITLE;
?>
</title>
<!--
University of Nottingham Xerte Online Toolkits
Workspace properties HTML page
Version 1.0
-->
<link href="website_code/styles/workspacemanagement_tab.css" media="screen" type="text/css" rel="stylesheet" />
<link href="website_code/styles/properties_tab.css" media="screen" type="text/css" rel="stylesheet" />
<link href="website_code/styles/folderproperties_tab.css" media="screen" type="text/css" rel="stylesheet" />
<link href="website_code/styles/frontpage.css" media="screen" type="text/css" rel="stylesheet" />
<link href="website_code/styles/xerte_buttons.css" media="screen" type="text/css" rel="stylesheet" />
<?php
示例10: show_preview_code2
function show_preview_code2($row, $row_username)
{
global $xerte_toolkits_site, $youtube_api_key;
_load_language_file("/modules/xerte/preview.inc");
$template_dir = $xerte_toolkits_site->users_file_area_full . $row['template_id'] . "-" . $row['username'] . "-" . $row['template_name'] . "/";
/*
* Format the XML strings to provide data to the engine
*/
if (!file_exists($template_dir . '/preview.xml')) {
$buffer = file_get_contents($template_dir . "/data.xml");
$fp = fopen($template_dir . "/preview.xml", "x");
fwrite($fp, $buffer);
fclose($fp);
}
$string_for_flash = $xerte_toolkits_site->users_file_area_short . $row['template_id'] . "-" . $row_username['username'] . "-" . $row['template_name'] . "/";
$xmlfile = $string_for_flash . "preview.xml";
$xmlFixer = new XerteXMLInspector();
$xmlFixer->loadTemplateXML($xmlfile);
if (strlen($xmlFixer->getName()) > 0) {
$title = $xmlFixer->getName();
} else {
$title = XERTE_PREVIEW_TITLE;
}
$string_for_flash_xml = $xmlfile . "?time=" . time();
$flash_js_dir = "modules/" . $row['template_framework'] . "/";
$template_path = "modules/" . $row['template_framework'] . "/parent_templates/" . $row['template_name'] . "/";
$rlo_file = $template_path . $row['template_name'] . ".rlt";
list($x, $y) = explode("~", get_template_screen_size($row['template_name'], $row['template_framework']));
// determine the correct engine to use
$engine = 'flash';
$extra_flags = explode(";", $row['extra_flags']);
foreach ($extra_flags as $flag) {
$parameter = explode("=", $flag);
switch ($parameter[0]) {
case 'engine':
$engine = $parameter[1];
break;
}
}
// If given as a parameter, force this engine
// If given as a parameter, force this engine
if (isset($_REQUEST['engine'])) {
if ($_REQUEST['engine'] == 'other') {
if ($engine == 'flash') {
$engine = 'javascript';
} else {
$engine = 'flash';
}
} else {
$engine = $_REQUEST['engine'];
}
}
if ($engine == 'flash') {
$page_content = file_get_contents($xerte_toolkits_site->basic_template_path . $row['template_framework'] . "/player/rloObject.htm");
$page_content = str_replace("%WIDTH%", $x, $page_content);
$page_content = str_replace("%HEIGHT%", $y, $page_content);
$page_content = str_replace("%TITLE%", $title, $page_content);
$page_content = str_replace("%RLOFILE%", $rlo_file, $page_content);
$page_content = str_replace("%JSDIR%", $flash_js_dir, $page_content);
$page_content = str_replace("%XMLPATH%", $string_for_flash, $page_content);
$page_content = str_replace("%XMLFILE%", $string_for_flash_xml, $page_content);
$page_content = str_replace("%SITE%", $xerte_toolkits_site->site_url, $page_content);
$tracking = "<script type=\"text/javascript\" src=\"" . $flash_js_dir . "js/xttracking_noop.js\"></script>";
$page_content = str_replace("%TRACKING_SUPPORT%", $tracking, $page_content);
} else {
// $engine is assumed to be html5 if flash is NOT set
$page_content = file_get_contents($xerte_toolkits_site->basic_template_path . $row['template_framework'] . "/player_html5/rloObject.htm");
$page_content = str_replace("%TITLE%", $title, $page_content);
$page_content = str_replace("%TEMPLATEPATH%", $template_path, $page_content);
$page_content = str_replace("%XMLPATH%", $string_for_flash, $page_content);
$page_content = str_replace("%XMLFILE%", $string_for_flash_xml, $page_content);
$page_content = str_replace("%THEMEPATH%", $xerte_toolkits_site->site_url . "themes/" . $row['template_name'] . "/", $page_content);
// Handle offline variables
$page_content = str_replace("%OFFLINESCRIPTS%", "", $page_content);
$page_content = str_replace("%OFFLINEINCLUDES%", "", $page_content);
$page_content = str_replace("%MATHJAXPATH%", "//cdn.mathjax.org/mathjax/latest/", $page_content);
$tracking = "<script type=\"text/javascript\" src=\"" . $template_path . "common_html5/js/xttracking_noop.js\"></script>";
$page_content = str_replace("%TRACKING_SUPPORT%", $tracking, $page_content);
$page_content = str_replace("%YOUTUBEAPIKEY%", $youtube_api_key, $page_content);
}
echo $page_content;
}
示例11: show_preview_code
function show_preview_code($row)
{
global $xerte_toolkits_site;
$string_for_flash = $xerte_toolkits_site->users_file_area_short . $row['template_id'] . "-" . $row['username'] . "-" . $row['template_name'] . "/";
$xmlfile = $string_for_flash . "preview.xml";
$xmlFixer = new XerteXMLInspector();
$xmlFixer->loadTemplateXML($xmlfile);
$string_for_flash_xml = $xmlfile . "?time=" . time();
$string_for_flash = $xerte_toolkits_site->users_file_area_short . $row['template_id'] . "-" . $row['username'] . "-" . $row['template_name'] . "/";
$template_path_string = "modules/site/parent_templates/" . $row['template_name'];
require_once "config.php";
_load_language_file("/modules/site/preview.inc");
?>
<!DOCTYPE html>
<html xmlns:fb="http://ogp.me/ns/fb#">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title><?php
echo SITE_PREVIEW_TITLE;
?>
</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!--jquery-->
<script src="<?php
echo $template_path_string;
?>
/common/js/jquery.js"></script>
<!--styles -->
<link href="<?php
echo $template_path_string;
?>
/common/css/bootstrap.css" rel="stylesheet">
<link href="<?php
echo $template_path_string;
?>
/common/css/bootstrap-responsive.css" rel="stylesheet">
<!--custom styles for this template-->
<link href="<?php
echo $template_path_string;
?>
/common/css/custom.css" rel="stylesheet">
<!--support for IE < 6-8 -->
<script src="<?php
echo $template_path_string;
?>
/common/js/html5shiv.js"></script>
<!--media element and initialisation-->
<script src="<?php
echo $template_path_string;
?>
/common/mediaelement/mediaelement-and-player.min.js"></script>
<link rel="stylesheet" href="<?php
echo $template_path_string;
?>
/common/mediaelement/mediaelementplayer.min.css" />
<script type="text/javascript">
var FileLocation = "<?php
echo $string_for_flash;
?>
";
var templateLocation = "<?php
echo $template_path_string;
?>
/";
var projectXML = "<?php
echo $string_for_flash_xml;
?>
/"; //this is the file to read, not the xml
</script>
<script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"></script>
</head>
<body data-twttr-rendered="true" data-spy="scroll" data-target="#contentTable" onunload="window.opener.innerWidth +=2;window.opener.innerWidth -=2;">
<!--facebookAPI-->
<div id="fb-root"></div>
<script src="<?php
echo $template_path_string;
?>
/common/js/initFB.js" defer></script>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
//.........这里部分代码省略.........
示例12: output_editor_code
/**
*
* Function create folder loop
* This function outputs the xerte editor code
* @param array $row_edit - the mysql query for this folder
* @param number $xerte_toolkits_site - a number to make sure that we enter and leave each folder correctly
* @param bool $read_status - a read only flag for this template
* @param number $version_control - a setting to handle the delettion of lock files when the window is closed
* @version 1.0
* @author Patrick Lockley
*/
function output_editor_code($row_edit, $xerte_toolkits_site, $read_status, $version_control)
{
require_once "config.php";
_load_language_file("/modules/xerte/edit.inc");
$row_username = db_query_one("select username from {$xerte_toolkits_site->database_table_prefix}logindetails where login_id=?", array($row_edit['user_id']));
if (empty($row_username)) {
die("Invalid user id ?");
}
/**
* create the preview xml used for editing
*/
$preview = $xerte_toolkits_site->root_file_path . $xerte_toolkits_site->users_file_area_short . $row_edit['template_id'] . "-" . $row_username['username'] . "-" . $row_edit['template_name'] . "/preview.xml";
$data = $xerte_toolkits_site->root_file_path . $xerte_toolkits_site->users_file_area_short . $row_edit['template_id'] . "-" . $row_username['username'] . "-" . $row_edit['template_name'] . "/data.xml";
if (!file_exists($preview) && file_exists($data)) {
copy($data, $preview);
chmod($preview, 0777);
}
/**
* set up the strings used in the flash vars
*/
$string_for_flash_xml = $xerte_toolkits_site->users_file_area_short . $row_edit['template_id'] . "-" . $row_username['username'] . "-" . $row_edit['template_name'] . "/preview.xml";
$string_for_flash_media = $xerte_toolkits_site->users_file_area_short . $row_edit['template_id'] . "-" . $row_username['username'] . "-" . $row_edit['template_name'] . "/media/";
$string_for_flash_xwd = "modules/" . $row_edit['template_framework'] . "/parent_templates/" . $row_edit['template_name'] . "/";
/**
* sort of the screen sies required for the preview window
*/
$temp = explode("~", get_template_screen_size($row_edit['template_name'], $row_edit['template_framework']));
$edit_site_logo = $xerte_toolkits_site->site_logo;
$pos = strrpos($edit_site_logo, '/') + 1;
$edit_site_logo = substr($edit_site_logo, 0, $pos) . "edit_" . substr($edit_site_logo, $pos);
$edit_organisational_logo = $xerte_toolkits_site->organisational_logo;
$pos = strrpos($edit_organisational_logo, '/') + 1;
$edit_organisational_logo = substr($edit_organisational_logo, 0, $pos) . "edit_" . substr($edit_organisational_logo, $pos);
/**
* set up the onunload function used in version control
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php
echo XERTE_EDIT_TITLE;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="website_code/styles/frontpage.css" media="screen" type="text/css" rel="stylesheet" />
<link rel="icon" href="favicon_edit.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon_edit.ico" type="image/x-icon" />
<script src="modules/xerte/js/swfobject.js"></script>
<script src="website_code/scripts/opencloseedit.js"></script>
<script src="website_code/scripts/template_management.js"></script>
<script src="website_code/scripts/ajax_management.js"></script>
<script type="text/javascript" language="javascript">
function getSessionID(){
var id;
var auth = '<?php
echo strtolower($xerte_toolkits_site->authentication_method);
?>
';
var browser = (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) ? 'firefox' :
((navigator.userAgent.toLowerCase().indexOf('safari') > -1) ? 'safari' :
'other');
//Pass data to upload (Firefox Flash Cookie Bug) which we are
//It first checks moodle, then defaults
if (auth == 'moodle') {
//Its Moodle integration so we need the whole cookie
return 'BROWSER=' + browser + '&AUTH=moodle&COOKIE=' + escape(document.cookie);
}
else if ((id = document.cookie.match(/PHPSESSID=[^;]+/))) {
// Its Default authentication so we only need session id
return 'BROWSER=' + browser + '&AUTH=xerte&' + id;
}
return null;
}
function setunload(){
window.onbeforeunload = bunload;
}
function hideunload(){
window.onbeforeunload = function(){};
//.........这里部分代码省略.........
示例13: _load_language_file
<?php
require_once "../../../config.php";
_load_language_file("/website_code/php/management/user_templates.inc");
require "../user_library.php";
require "../url_library.php";
require "management_library.php";
if (is_user_admin()) {
$database_id = database_connect("templates list connected", "template list failed");
$query = "select * from " . $xerte_toolkits_site->database_table_prefix . "logindetails order by surname,firstname,username";
$query_response = mysql_query($query);
// Fetch users only once and put the results in a php array
$logins = array();
while ($login = mysql_fetch_array($query_response, MYSQL_ASSOC)) {
$logins[] = $login;
}
echo "<form name=\"user_templates\" action=\"javascript:list_templates_for_user('list_user')\"><select id=\"list_user\">";
foreach ($logins as $row_users) {
echo "<option value=\"" . $row_users['login_id'] . "\">" . $row_users['firstname'] . " " . $row_users['surname'] . " (" . $row_users['username'] . ")</option>";
}
echo "</select>";
//}
echo "<button type=\"submit\" class=\"xerte_button\">" . USERS_MANAGEMENT_TEMPLATE_VIEW . "</button></form></div><div id=\"usertemplatelist\"></div>";
mysql_close($database_id);
} else {
management_fail();
}
示例14: _load_language_file
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once "../../../config.php";
_load_language_file("/website_code/php/management/error_list.inc");
require "../user_library.php";
require "management_library.php";
if (is_user_admin()) {
$path = $xerte_toolkits_site->error_log_path;
$error_file_list = opendir($path);
echo "<div style=\"float:left; margin:10px; width:100%; height:30px; position:relative; border-bottom:1px solid #999\"><button type=\"button\" class=\"xerte_button\" onclick=\"javascript:delete_error_logs()\"><i class=\"fa fa-trash-o\"></i> " . DELETE_ALL . "</button></div>";
while ($file = readdir($error_file_list)) {
if (strpos($file, ".log") != 0) {
$user_parameter = substr($file, 0, strlen($file) - 4);
$prefix = $xerte_toolkits_site->database_table_prefix;
$query_for_full_name = "select login_id, firstname, surname from {$prefix}logindetails where username= ?";
$params = array($user_parameter);
$query_for_full_name_response = db_query($query_for_full_name, $params);
if (sizeof($query_for_full_name_response) > 0) {
$row_name = $query_for_full_name_response[0];
示例15: _load_language_file
<?php
/**
*
* name select template, displays usernames so people can choose to share a template
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/
require_once "../../../config.php";
_load_language_file("/website_code/php/properties/name_select_template.inc");
if (is_numeric($_POST['template_id'])) {
$search = mysql_real_escape_string($_POST['search_string']);
$tutorial_id = mysql_real_escape_string($_POST['template_id']);
$database_id = database_connect("Template name select share access database connect success", "Template name select share database connect failed");
/**
* Search the list of user logins for user with that name
*/
if (strlen($search) != 0) {
$query_for_names = "select login_id, firstname, surname from " . $xerte_toolkits_site->database_table_prefix . "logindetails WHERE ((firstname like \"" . $search . "%\") or (surname like \"" . $search . "%\")) and login_id not in( SELECT user_id from " . $xerte_toolkits_site->database_table_prefix . "templaterights where template_id=\"" . $tutorial_id . "\" ) ORDER BY firstname ASC";
$query_names_response = mysql_query($query_for_names);
if (mysql_num_rows($query_names_response) != 0) {
while ($row = mysql_fetch_array($query_names_response)) {
echo "<p>" . $row['firstname'] . " " . $row['surname'] . " (" . $row['login_id'] . ") - <button type=\"button\" class=\"xerte_button\" onclick=\"share_this_template('" . $tutorial_id . "', '" . $row['login_id'] . "')\">" . NAME_SELECT_CLICK . "</button></p>";
}
} else {
echo "<p>" . NAME_SELECT_DETAILS_FAIL . "</p>";
}
}