本文整理汇总了PHP中get_root_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_root_url函数的具体用法?PHP get_root_url怎么用?PHP get_root_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_root_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: on_index_thumbnails
static function on_index_thumbnails($thumbs)
{
global $page, $template;
$total = count($page['items']);
if (count($thumbs) >= $total) {
add_event_handler('loc_end_index', array('RVTS', 'on_end_index'));
return $thumbs;
}
$url_model = str_replace('123456789', '%start%', duplicate_index_url(array('start' => 123456789)));
$ajax_url_model = add_url_params($url_model, array('rvts' => '%per%'));
$url_model = str_replace('&', '&', $url_model);
$ajax_url_model = str_replace('&', '&', $ajax_url_model);
$my_base_name = basename(dirname(__FILE__));
$ajax_loader_image = get_root_url() . "plugins/{$my_base_name}/ajax-loader.gif";
$template->func_combine_script(array('id' => 'jquery', 'load' => 'footer', 'path' => 'themes/default/js/jquery.min.js'));
$template->func_combine_script(array('id' => $my_base_name, 'load' => 'async', 'path' => 'plugins/' . $my_base_name . '/rv_tscroller.min.js', 'require' => 'jquery', 'version' => RVTS_VERSION));
$start = (int) $page['start'];
$per_page = $page['nb_image_page'];
$moreMsg = 'See the remaining %d photos';
if ('en' != $GLOBALS['lang_info']['code']) {
load_language('lang', dirname(__FILE__) . '/');
$moreMsg = l10n($moreMsg);
}
// the String.fromCharCode comes from google bot which somehow manage to get these urls
$template->block_footer_script(null, "var RVTS = {\najaxUrlModel: String.fromCharCode(" . ord($ajax_url_model[0]) . ")+'" . substr($ajax_url_model, 1) . "',\nstart: {$start},\nperPage: {$per_page},\nnext: " . ($start + $per_page) . ",\ntotal: {$total},\nurlModel: String.fromCharCode(" . ord($url_model[0]) . ")+'" . substr($url_model, 1) . "',\nmoreMsg: '{$moreMsg}',\nprevMsg: '" . l10n("Previous") . "',\najaxLoaderImage: '{$ajax_loader_image}'\n};\njQuery('.navigationBar').hide();");
return $thumbs;
}
开发者ID:kappuccino,项目名称:piwigo-tscroller,代码行数:27,代码来源:main.inc.php
示例2: osm_photo_add_tab
function osm_photo_add_tab($sheets, $id)
{
if ($id == 'photo') {
$sheets['openstreetmap'] = array('caption' => '<span class="osm-globe"></span>OpenStreetMap', 'url' => get_root_url() . 'admin.php?page=plugin&section=piwigo-openstreetmap/admin/admin_photo.php&image_id=' . $_GET['image_id']);
}
return $sheets;
}
开发者ID:lcorbasson,项目名称:piwigo-openstreetmap,代码行数:7,代码来源:admin_boot.php
示例3: setUp
protected function setUp()
{
$this->install_type = get_install_type();
$this->page_root = get_root_url();
$this->setBrowser("*firefox");
$this->setBrowserUrl($this->page_root . '/');
}
开发者ID:vinod-co,项目名称:centa,代码行数:7,代码来源:003-RunAsStudentMRQTest.php
示例4: PP_Init
/**
* Triggered on loc_begin_index
*
* Perform user logout after registration if account locked and redirection to profile page is password renewal is set
*/
function PP_Init()
{
global $conf, $user;
include_once PHPWG_ROOT_PATH . 'admin/include/functions.php';
$conf_PP = unserialize($conf['PasswordPolicy']);
// Perfoming redirection for locked accounts
// -----------------------------------------
if (!is_a_guest() and $user['username'] != "16" and $user['username'] != "18") {
// Perform user logout if user account is locked
if (isset($conf_PP['LOGFAILBLOCK']) and $conf_PP['LOGFAILBLOCK'] == 'true' and PP_UsrBlock_Verif($user['username']) and !is_admin() and !is_webmaster()) {
invalidate_user_cache();
logout_user();
if ($conf['guest_access']) {
redirect(make_index_url() . '?PP_msg=locked', 0);
} else {
redirect(get_root_url() . 'identification.php?PP_msg=locked', 0);
}
}
}
// Performing redirection to profile page for password reset
// ---------------------------------------------------------
if (isset($conf_PP['PWDRESET']) and $conf_PP['PWDRESET'] == 'true') {
$query = '
SELECT user_id, status
FROM ' . USER_INFOS_TABLE . '
WHERE user_id = ' . $user['id'] . '
;';
$data = pwg_db_fetch_assoc(pwg_query($query));
if ($data['status'] != "webmaster" and $data['status'] != "generic") {
if (PP_check_pwdreset($user['id'])) {
redirect(PHPWG_ROOT_PATH . 'profile.php');
}
}
}
}
开发者ID:Eric-Piwigo,项目名称:Password_Policy,代码行数:40,代码来源:functions.inc.php
示例5: PH_admin_menu
/**
* Plugin administration menu
*/
function PH_admin_menu($menu)
{
// Retreive plugin name
$plugin = PHInfos(PH_PATH);
$name = $plugin['name'];
array_push($menu, array('NAME' => $name, 'URL' => get_root_url() . 'admin.php?page=plugin-' . basename(PH_PATH)));
return $menu;
}
开发者ID:Eric-Piwigo,项目名称:Prune_History,代码行数:11,代码来源:functions.inc.php
示例6: NBMS_admin_menu
function NBMS_admin_menu($menu)
{
// +-----------------------------------------------------------------------+
// | Getting plugin name |
// +-----------------------------------------------------------------------+
$plugin = NBMSInfos(NBMS_PATH);
$name = $plugin['name'];
array_push($menu, array('NAME' => $name, 'URL' => get_root_url() . 'admin.php?page=plugin-' . basename(NBMS_PATH)));
return $menu;
}
开发者ID:Eric-Piwigo,项目名称:NBM_Subscriber,代码行数:10,代码来源:main.inc.php
示例7: tg_groups_display
function tg_groups_display()
{
global $conf, $template, $user, $tags, $page;
load_language('plugin.lang', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
load_language('lang', PHPWG_ROOT_PATH . PWG_LOCAL_DIR, array('no_fallback' => true, 'local' => true));
$template->set_prefilter('tags', 'tg_add_display_link_prefilter');
$template->assign('U_TAG_GROUPS', get_root_url() . 'tags.php?display_mode=groups');
if ($page['tg_display']) {
// echo __FILE__.'::'.__LINE__.' display_mode=groups<br>';
$template->set_prefilter('tags', 'tg_groups_display_prefilter');
$template->assign('display_mode', 'groups');
// we want tags diplayed in alphabetic order
usort($tags, 'tag_alpha_compare');
$current_tag_group = null;
$nb_tags = count($tags);
$current_column = 1;
$current_tag_idx = 0;
$tag_group = array('tags' => array());
foreach ($tags as $tag) {
// if the tag belongs to no group, we don't show it on the "tag by
// group" display mode
if (strpos($tag['name'], ':') === false) {
continue;
} else {
list($tag['group'], $tag['name']) = explode(':', $tag['name'], 2);
$tag['group'] = preg_replace('/^[^=]*=/', '', $tag['group']);
}
if ($current_tag_idx == 0) {
$current_tag_group = $tag['group'];
$tag_group['TITLE'] = $tag['group'];
}
// new group?
if ($tag['group'] !== $current_tag_group) {
if ($current_column < $conf['tag_letters_column_number'] and $current_tag_idx > $current_column * $nb_tags / $conf['tag_letters_column_number']) {
$tag_group['CHANGE_COLUMN'] = true;
$current_column++;
}
$tag_group['TITLE'] = $current_tag_group;
$template->append('tag_groups', $tag_group);
$current_tag_group = $tag['group'];
$tag_group = array('tags' => array());
}
array_push($tag_group['tags'], array_merge($tag, array('URL' => make_index_url(array('tags' => array($tag))))));
$current_tag_idx++;
}
// flush last group
if (count($tag_group['tags']) > 0) {
unset($tag_group['CHANGE_COLUMN']);
$tag_group['TITLE'] = $current_tag_group;
$template->append('tag_groups', $tag_group);
}
}
}
开发者ID:lcorbasson,项目名称:piwigo-tag_groups,代码行数:53,代码来源:main.inc.php
示例8: vjs_add_tab
function vjs_add_tab($sheets, $id)
{
if ($id == 'photo') {
$query = "SELECT id FROM " . IMAGES_TABLE . " WHERE " . SQL_VIDEOS . " AND id = " . $_GET['image_id'] . ";";
$result = pwg_query($query);
if (!pwg_db_num_rows($result)) {
return $sheets;
}
$sheets['videojs'] = array('caption' => 'VideoJS', 'url' => get_root_url() . 'admin.php?page=plugin&section=piwigo-videojs/admin/admin_photo.php&image_id=' . $_GET['image_id']);
unset($sheets['coi'], $sheets['update']);
unset($sheets['rotate'], $sheets['update']);
/* Replace the RotateImage by a our own */
$sheets['rotate'] = array('caption' => 'Rotate', 'url' => get_root_url() . 'admin.php?page=plugin&section=piwigo-videojs/admin/admin_rotate.php&image_id=' . $_GET['image_id']);
}
return $sheets;
}
开发者ID:naryoss,项目名称:piwigo-videojs,代码行数:16,代码来源:admin_boot.php
示例9: get_admin_plugin_menu_link
/**
* Retrieves an url for a plugin page.
* @param string file - php script full name
*/
function get_admin_plugin_menu_link($file)
{
global $page;
$real_file = realpath($file);
$url = get_root_url() . 'admin.php?page=plugin';
if (false !== $real_file) {
$real_plugin_path = rtrim(realpath(PHPWG_PLUGINS_PATH), '\\/');
$file = substr($real_file, strlen($real_plugin_path) + 1);
$file = str_replace('\\', '/', $file);
//Windows
$url .= '&section=' . urlencode($file);
} else {
if (isset($page['errors'])) {
$page['errors'][] = 'PLUGIN ERROR: "' . $file . '" is not a valid file';
}
}
return $url;
}
开发者ID:donseba,项目名称:Piwigo,代码行数:22,代码来源:functions_plugins.inc.php
示例10: oauth_assign_template_vars
function oauth_assign_template_vars($u_redirect = null)
{
global $template, $conf, $hybridauth_conf, $user;
$conf['oauth']['include_common_template'] = true;
if ($template->get_template_vars('OAUTH') == null) {
if (!empty($user['oauth_id'])) {
list($provider, $identifier) = explode('---', $user['oauth_id'], 2);
if ($provider == 'Persona') {
$persona_email = $identifier;
}
}
$template->assign('OAUTH', array('conf' => $conf['oauth'], 'u_login' => get_root_url() . OAUTH_PATH . 'auth.php?provider=', 'providers' => $hybridauth_conf['providers'], 'persona_email' => @$persona_email, 'key' => get_ephemeral_key(0)));
$template->assign(array('OAUTH_PATH' => OAUTH_PATH, 'OAUTH_ABS_PATH' => realpath(OAUTH_PATH) . '/', 'ABS_ROOT_URL' => rtrim(get_gallery_home_url(), '/') . '/'));
}
if (isset($u_redirect)) {
$template->append('OAUTH', compact('u_redirect'), true);
}
}
开发者ID:lcorbasson,项目名称:Piwigo-Social-Connect,代码行数:18,代码来源:functions.inc.php
示例11: oauth_try_log_user
/**
* interrupt normal login if corresponding to an oauth user
*/
function oauth_try_log_user($success, $username)
{
global $conf, $redirect_to;
$query = '
SELECT oauth_id
FROM ' . USER_INFOS_TABLE . ' AS i
INNER JOIN ' . USERS_TABLE . ' AS u
ON i.user_id = u.' . $conf['user_fields']['id'] . '
WHERE ' . $conf['user_fields']['username'] . ' = "' . pwg_db_real_escape_string($username) . '"
AND oauth_id != ""
;';
$result = pwg_query($query);
if (pwg_db_num_rows($result)) {
list($oauth_id) = pwg_db_fetch_row($result);
list($provider) = explode('---', $oauth_id, 2);
$_SESSION['page_errors'][] = l10n('You registered with a %s account, please sign in with the same account.', $provider);
$redirect_to = get_root_url() . 'identification.php';
// variable used by identification.php
return true;
}
return false;
}
开发者ID:lcorbasson,项目名称:Piwigo-Social-Connect,代码行数:25,代码来源:public_events.inc.php
示例12: pfemail_admin_menu
function pfemail_admin_menu($menu)
{
global $page;
$query = '
SELECT
COUNT(*)
FROM ' . PFEMAIL_PENDINGS_TABLE . '
JOIN ' . IMAGES_TABLE . ' ON image_id = id
WHERE state = \'moderation_pending\'
;';
$result = pwg_query($query);
list($page['pfemail_nb_pendings']) = pwg_db_fetch_row($result);
$name = 'Photo from Email';
if ($page['pfemail_nb_pendings'] > 0) {
$style = 'background-color:#666;';
$style .= 'color:white;';
$style .= 'padding:1px 5px;';
$style .= 'border-radius:10px;';
$style .= 'margin-left:5px;';
$name .= '<span style="' . $style . '">' . $page['pfemail_nb_pendings'] . '</span>';
}
array_push($menu, array('NAME' => $name, 'URL' => get_root_url() . 'admin.php?page=plugin-photo_from_email'));
return $menu;
}
开发者ID:plegall,项目名称:Piwigo-photo_from_email,代码行数:24,代码来源:main.inc.php
示例13: die
// | the Free Software Foundation |
// | |
// | 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// | USA. |
// +-----------------------------------------------------------------------+
if (!defined("PHPWG_ROOT_PATH")) {
die("Hacking attempt!");
}
include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php';
$my_base_url = get_root_url() . 'admin.php?page=languages';
if (isset($_GET['tab'])) {
$page['tab'] = $_GET['tab'];
} else {
$page['tab'] = 'installed';
}
$tabsheet = new tabsheet();
$tabsheet->set_id('languages');
$tabsheet->select($page['tab']);
$tabsheet->assign();
if ($page['tab'] == 'update') {
include PHPWG_ROOT_PATH . 'admin/updates_ext.php';
} else {
include PHPWG_ROOT_PATH . 'admin/languages_' . $page['tab'] . '.php';
}
开发者ID:donseba,项目名称:Piwigo,代码行数:31,代码来源:languages.php
示例14: pwg_query
if ('sizes' == $page['section'] and isset($_GET['action']) and 'restore_settings' == $_GET['action']) {
ImageStdParams::set_and_save(ImageStdParams::get_default_sizes());
pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param = \'disabled_derivatives\'');
clear_derivative_cache();
$page['infos'][] = l10n('Your configuration settings are saved');
}
//----------------------------------------------------- template initialization
$template->set_filename('config', 'configuration_' . $page['section'] . '.tpl');
// TabSheet
$tabsheet = new tabsheet();
$tabsheet->set_id('configuration');
$tabsheet->select($page['section']);
$tabsheet->assign();
$action = get_root_url() . 'admin.php?page=configuration';
$action .= '&section=' . $page['section'];
$template->assign(array('U_HELP' => get_root_url() . 'admin/popuphelp.php?page=configuration', 'F_ACTION' => $action));
switch ($page['section']) {
case 'main':
function order_by_is_local()
{
@(include PHPWG_ROOT_PATH . 'local/config/config.inc.php');
if (isset($conf['local_dir_site'])) {
@(include PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'config/config.inc.php');
}
return isset($conf['order_by']) or isset($conf['order_by_inside_category']);
}
if (order_by_is_local()) {
$page['warnings'][] = l10n('You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !');
}
if (isset($conf['order_by_custom']) or isset($conf['order_by_inside_category_custom'])) {
$order_by = array('');
开发者ID:donseba,项目名称:Piwigo,代码行数:31,代码来源:configuration.php
示例15: add_permission_on_category
}
//
// add permissions to users
//
$grant_users = $_POST['users'];
if (count($grant_users) > 0) {
add_permission_on_category($page['cat'], $grant_users);
}
}
$page['infos'][] = l10n('Album updated successfully');
}
// +-----------------------------------------------------------------------+
// | template initialization |
// +-----------------------------------------------------------------------+
$template->set_filename('cat_perm', 'cat_perm.tpl');
$template->assign(array('CATEGORIES_NAV' => get_cat_display_name_from_id($page['cat'], 'admin.php?page=album-'), 'U_HELP' => get_root_url() . 'admin/popuphelp.php?page=cat_perm', 'F_ACTION' => $admin_album_base_url . '-permissions', 'private' => 'private' == $category['status']));
// +-----------------------------------------------------------------------+
// | form construction |
// +-----------------------------------------------------------------------+
// groups denied are the groups not granted. So we need to find all groups
// minus groups granted to find groups denied.
$groups = array();
$query = '
SELECT id, name
FROM ' . GROUPS_TABLE . '
ORDER BY name ASC
;';
$groups = simple_hash_from_query($query, 'id', 'name');
$template->assign('groups', $groups);
// groups granted to access the category
$query = '
开发者ID:donseba,项目名称:Piwigo,代码行数:31,代码来源:cat_perm.php
示例16: check_pwg_token
if (isset($_POST['submit'])) {
check_pwg_token();
$offsetX = trim($_POST['offsetX']);
$offsetY = trim($_POST['offsetY']);
if (strlen($offsetX) === 0 || strlen($offsetY) === 0 || !is_numeric($offsetX) || !is_numeric($offsetY)) {
$page['errors'][] = 'Invalid offset value';
}
if (count($page['errors']) === 0) {
$stereoTable = $prefixeTable . 'stereo';
if (isset($picture['x'])) {
$query = "UPDATE {$stereoTable}\n\t\t\t\tSET x={$offsetX}, y={$offsetY}\n\t\t\t\tWHERE media_id = {$id};";
} else {
$picture['x'] = $offsetX;
$picture['y'] = $offsetY;
$query = "INSERT INTO {$stereoTable} (media_id, x, y)\n\t\t\t\tVALUES ({$id}, {$offsetX}, {$offsetY})";
}
pwg_query($query);
array_push($page['infos'], l10n('STEREO_EDIT_SUCCESS'));
}
}
// needed for the photo tabsheet
$admin_photo_base_url = get_root_url() . 'admin.php?page=photo-' . $id;
$self_url = Stereo_get_admin_url($id);
include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php';
$tabsheet = new tabsheet();
$tabsheet->set_id('photo');
$tabsheet->select('stereo');
$tabsheet->assign();
$template->assign(array('PWG_TOKEN' => get_pwg_token(), 'F_ACTION' => $self_url, 'TITLE' => render_element_name($picture), 'PICTURE' => Stereo_render_element_content('', $picture), 'OFFSET_X' => empty($picture['x']) ? 0 : $picture['x'], 'OFFSET_Y' => empty($picture['y']) ? 0 : $picture['y']));
$template->set_filename('plugin_admin_content', STEREO_PATH . 'admin.tpl');
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
开发者ID:ejegg,项目名称:piwigo-stereo,代码行数:31,代码来源:admin.php
示例17: set_random_representant
break;
case 'representative':
// theoretically, all categories in $_POST['cat_false'] contain at
// least one element, so Piwigo can find a representant.
set_random_representant($_POST['cat_false']);
break;
}
}
}
// +-----------------------------------------------------------------------+
// | template init |
// +-----------------------------------------------------------------------+
$template->set_filenames(array('cat_options' => 'cat_options.tpl', 'double_select' => 'double_select.tpl'));
$page['section'] = isset($_GET['section']) ? $_GET['section'] : 'status';
$base_url = PHPWG_ROOT_PATH . 'admin.php?page=cat_options&section=';
$template->assign(array('U_HELP' => get_root_url() . 'admin/popuphelp.php?page=cat_options', 'F_ACTION' => $base_url . $page['section']));
// TabSheet
$tabsheet = new tabsheet();
$tabsheet->set_id('cat_options');
$tabsheet->select($page['section']);
$tabsheet->assign();
// +-----------------------------------------------------------------------+
// | form display |
// +-----------------------------------------------------------------------+
// for each section, categories in the multiselect field can be :
//
// - true : commentable for comment section
// - false : un-commentable for comment section
// - NA : (not applicable) for virtual categories
//
// for true and false status, we associates an array of category ids,
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:31,代码来源:cat_options.php
示例18: IN
state,
from_name,
from_address,
subject
FROM ' . IMAGES_TABLE . '
JOIN ' . PFEMAIL_PENDINGS_TABLE . ' ON id = image_id
WHERE image_id IN (' . implode(',', $pending_ids) . ')
ORDER BY image_id DESC
LIMIT ' . $page['start'] . ', ' . $page['nb_pendings_per_page'] . '
;';
$result = pwg_query($query);
$rows = array();
$image_ids = array();
while ($row = pwg_db_fetch_assoc($result)) {
array_push($rows, $row);
array_push($image_ids, $row['id']);
}
$template->assign(array('F_ACTION' => $admin_base_url));
foreach ($rows as $row) {
$thumb = DerivativeImage::thumb_url(array('id' => $row['image_id'], 'path' => $row['path']));
$template->append('photos', array('U_EDIT' => get_root_url() . 'admin.php?page=plugin-showcase_admin-photo&image_id=' . $row['image_id'], 'ID' => $row['image_id'], 'TN_SRC' => $thumb, 'WEBSIZE_SRC' => $row['path'], 'ADDED_BY' => $row['author'], 'ADDED_ON' => format_date($row['date_available'], true), 'NAME' => $row['name'], 'FILE' => $row['file'], 'DATE_CREATION' => empty($row['date_creation']) ? l10n('N/A') : format_date($row['date_creation']), 'DESCRIPTION' => $row['comment'], 'FROM' => @$row['from_name'] . ' <' . $row['from_address'] . '>'));
}
// +-----------------------------------------------------------------------+
// | navigation bar |
// +-----------------------------------------------------------------------+
$template->assign('navbar', create_navigation_bar(get_root_url() . 'admin.php' . get_query_string_diff(array('start', 'action', 'showcase_id')), count($pending_ids), $page['start'], $page['nb_pendings_per_page']));
// +-----------------------------------------------------------------------+
// | sending html code |
// +-----------------------------------------------------------------------+
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
开发者ID:plegall,项目名称:Piwigo-photo_from_email,代码行数:31,代码来源:admin_pendings.php
示例19: die
<?php
if (!defined('PHPWG_ROOT_PATH')) {
die('Hacking attempt!');
}
/*
*
* Here we have everything if valid ldap users are allowed or not to connect to piwigo
* Valid ldap users with no piwigo login can create their login this way.
*
*/
global $template;
$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/newusers.tpl'));
$template->assign(array('PLUGIN_NEWUSERS' => get_root_url() . 'admin.php?page=plugin-Ldap_Login-newusers'));
$me = new Ldap();
$me->load_config();
// do we allow new users to have a piwigo login created if they have a valid ldap login ?
$template->assign('ALLOW_NEWUSERS', $me->config['allow_newusers']);
// do we send a mail to admins in case of new users ?
$template->assign('ADVERTISE_ADMINS', $me->config['advertise_admin_new_ldapuser']);
// do we send the piwigo (!) password to the mail address provided by ldap ?
$template->assign('SEND_CASUAL_MAIL', $me->config['send_password_by_mail_ldap']);
// Is there a restriction in the ldap users group ?
// Only members of this ldap group can log in !
$template->assign('USERS_GROUP', $me->config['users_group']);
if (isset($_POST['save'])) {
$me->config['users_group'] = $_POST['USERS_GROUP'];
if (isset($_POST['ALLOW_NEWUSERS'])) {
$me->config['allow_newusers'] = True;
} else {
$me->config['allow_newusers'] = False;
开发者ID:kvakanet,项目名称:ldap_login,代码行数:31,代码来源:newusers.php
示例20: PersistentFileCache
include PHPWG_ROOT_PATH . 'include/template.class.php';
include PHPWG_ROOT_PATH . 'include/cache.class.php';
include PHPWG_ROOT_PATH . 'include/Logger.class.php';
$persistent_cache = new PersistentFileCache();
// Database connection
try {
pwg_db_connect($conf['db_host'], $conf['db_user'], $conf['db_password'], $conf['db_base']);
} catch (Exception $e) {
my_error(l10n($e->getMessage()), true);
}
pwg_db_check_charset();
load_conf_from_db();
$logger = new Logger(array('directory' => PHPWG_ROOT_PATH . $conf['data_location'] . $conf['log_dir'], 'severity' => $conf['log_level'], 'filename' => 'log_' . date('Y-m-d') . '_' . sha1(date('Y-m-d') . $conf['db_password']) . '.txt', 'globPattern' => 'log_*.txt', 'archiveDays' => $conf['log_archive_days']));
if (!$conf['check_upgrade_feed']) {
if (!isset($conf['piwigo_db_version']) or $conf['piwigo_db_version'] != get_branch_from_version(PHPWG_VERSION)) {
redirect(get_root_url() . 'upgrade.php');
}
}
ImageStdParams::load_from_db();
session_start();
load_plugins();
// users can have defined a custom order pattern, incompatible with GUI form
if (isset($conf['order_by_custom'])) {
$conf['order_by'] = $conf['order_by_custom'];
}
if (isset($conf['order_by_inside_category_custom'])) {
$conf['order_by_inside_category'] = $conf['order_by_inside_category_custom'];
}
include PHPWG_ROOT_PATH . 'include/user.inc.php';
if (in_array(substr($user['language'], 0, 2), array('fr', 'it', 'de', 'es', 'pl', 'hu', 'ru', 'nl', 'tr', 'da'))) {
define('PHPWG_DOMAIN', substr($user['language'], 0, 2) . '.piwigo.org');
开发者ID:squidjam,项目名称:Piwigo,代码行数:31,代码来源:common.inc.php
注:本文中的get_root_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论