当前位置: 首页>>代码示例>>PHP>>正文


PHP fAuthorization::setLoginPage方法代码示例

本文整理汇总了PHP中fAuthorization::setLoginPage方法的典型用法代码示例。如果您正苦于以下问题:PHP fAuthorization::setLoginPage方法的具体用法?PHP fAuthorization::setLoginPage怎么用?PHP fAuthorization::setLoginPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fAuthorization的用法示例。


在下文中一共展示了fAuthorization::setLoginPage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: define

fORM::mapClassToTable('Role', TBL_ROLE);
fORM::mapClassToTable('Permission', TBL_PERMISSION);
fORM::mapClassToTable('Category', TBL_CATEGORY);
fORM::mapClassToTable('UserPermission', TBL_USER_PERMISSION);
fORM::mapClassToTable('Log', 'log');
/* Public Directories & Files */
define('SITE', 'http:' . DS . DS . $_SERVER['HTTP_HOST'] . DS . 'adminv3' . DS);
define('CSS', SITE . 'css' . DS);
define('JS', SITE . 'js' . DS);
define('SCRIPT', JS . 'script' . DS);
define('HOME', SITE . 'home' . DS);
define('BANNER', SITE . 'banner' . DS);
define('GEOLOCATION', SITE . 'geolocation' . DS);
define('USER', SITE . 'user' . DS);
define('CATEGORIES', SITE . 'categories' . DS);
define('LOGOUT', SITE . 'logout' . DS);
define('LOGIN', SITE . 'login' . DS);
define('IMAGES', SITE . 'images' . DS);
define('ICON', IMAGES . 'icon' . DS);
/* Private Directories & Files */
define('INCLUDES', ROOT . 'includes' . DS);
define('LOAD', ROOT . 'load' . DS);
/* Session */
define('SESSION_ID_USER', 'idUser');
define('SESSION_REGIONS', 'regions');
define('SALT', '#^&(!)()');
$db = new fDatabase('mysql', 'adminv2n', 'root', 'tortoise');
fORMDatabase::attach($db);
fAuthorization::setLoginPage(SITE . 'login.php');
fAuthorization::setAuthLevels(array('super' => 100, 'admin' => 80, 'cliente' => 20, 'adminUsers' => 80, 'employee' => 50, 'guest' => 25));
$acceptedFiles = array('image/gif', 'image/bmp', 'image/jpeg', 'image/pjpeg', 'image/png', 'application/msword', 'application/pdf', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'text/plain', 'text/richtext', 'text/html', 'video/mpeg', 'video/x-mpeg2', 'video/msvideo', 'video/quicktime', 'video/vivo', 'video/wavelet', 'video/x-sgi-movie', 'video/x-flv', 'video/mp4', 'audio/x-wav', 'audio/x-mp3', 'audio/midi');
开发者ID:nevermind89x,项目名称:Mi-morelia,代码行数:31,代码来源:config.php

示例2: error_reporting

<?php

error_reporting(E_ALL & ~E_NOTICE);
include __DIR__ . '/load_flourish.php';
include __DIR__ . '/load_plugins.php';
require __DIR__ . '/config.php';
require __DIR__ . '/core.php';
fSession::setPath(SESSIONS_PATH);
fSession::setLength('1 day 2 hours');
$db = new fDatabase('mysql', DB_NAME, DB_USER, DB_PASS, DB_HOST);
fAuthorization::setLoginPage(LOGIN_BASE);
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:11,代码来源:init.php

示例3: testGetLoginPage

 public function testGetLoginPage()
 {
     fAuthorization::setLoginPage('/login/');
     $this->assertEquals('/login/', fAuthorization::getLoginPage());
 }
开发者ID:nurulimamnotes,项目名称:flourish-old,代码行数:5,代码来源:fAuthorizationTest.php

示例4: define

<?php

define('DOC_ROOT', realpath(dirname(__FILE__) . '/../'));
define('URL_ROOT', path_fix(substr(DOC_ROOT, strlen(realpath($_SERVER['DOCUMENT_ROOT'])))) . '/');
define('URL_ROOT_TRIM', ltrim(URL_ROOT, "\\"));
error_reporting(E_STRICT | E_ALL);
fCore::enableErrorHandling('html');
fCore::enableExceptionHandling('html');
fTimestamp::setDefaultTimezone('Asia/Kuala_Lumpur');
fAuthorization::setLoginPage(URL_ROOT . 'authentication.php');
fAuthorization::setAuthLevels(array('super' => 1000, 'admin' => 100, 'user' => 50, 'guest' => 25));
// This prevents cross-site session transfer
fSession::setPath(DOC_ROOT . '/session/');
include DOC_ROOT . '/resources/library/flourish/constructor_functions.php';
/**
 * Configuration Settings
 *
 */
$config = array("db" => array("dbName" => "umw_mms", "dbHost" => "localhost", "dbUsername" => "useradmin", "password" => "test0"), "title" => "Material Management System", "version" => "v2.00b");
/**
 * Automatically includes classes
 * 
 * @throws Exception
 * 
 * @param  string $class  Name of the class to load
 * @return void
 */
function __autoload($class)
{
    $flourish_file = DOC_ROOT . '/resources/library/flourish/' . $class . '.php';
    if (file_exists($flourish_file)) {
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:config.php

示例5: define

<?php

define('DOC_ROOT', realpath(dirname(__FILE__) . '/../'));
define('URL_ROOT', substr(DOC_ROOT, strlen(realpath($_SERVER['DOCUMENT_ROOT']))) . '/');
error_reporting(E_STRICT | E_ALL);
fCore::enableErrorHandling('html');
fCore::enableExceptionHandling('html');
fCore::disableContext();
fTimestamp::setDefaultTimezone('America/New_York');
fAuthorization::setLoginPage(URL_ROOT . 'log_in');
include DOC_ROOT . '/inc/constructor_functions.php';
/**
 * Automatically includes classes
 * 
 * @throws Exception
 * 
 * @param  string $class  Name of the class to load
 * @return void
 */
function __autoload($class)
{
    $flourish_file = DOC_ROOT . '/inc/flourish/' . $class . '.php';
    if (file_exists($flourish_file)) {
        return require $flourish_file;
    }
    $file = DOC_ROOT . '/inc/classes/' . $class . '.php';
    if (file_exists($file)) {
        return require $file;
    }
    throw new Exception('The class ' . $class . ' could not be loaded');
}
开发者ID:hicapacity,项目名称:safecast.org,代码行数:31,代码来源:config.php

示例6: array

    $config_error = true;
}
if ($config_exit) {
    print $config_error;
    exit;
}
$status_array = array('0' => 'OK', '1' => 'Error', '2' => 'Warning');
$visibility_array = array('0' => 'Public', '1' => 'Private');
$over_under_array = array('0' => 'Over', '1' => 'Under');
$breadcrumbs = array();
$breadcrumbs[] = array('name' => 'Home', 'url' => '#', 'active' => false);
error_reporting(E_STRICT | E_ALL);
fCore::enableErrorHandling('html');
fCore::enableExceptionHandling('html');
fTimestamp::setDefaultTimezone($GLOBALS['TIMEZONE']);
fAuthorization::setLoginPage(User::makeURL('login'));
fAuthorization::setAuthLevels(array('admin' => 100, 'user' => 50, 'guest' => 25));
// This prevents cross-site session transfer
fSession::setPath($GLOBALS['SESSION_FILES']);
if (!fAuthorization::checkLoggedIn()) {
    if ($GLOBALS['ALLOW_HTTP_AUTH'] && (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']))) {
        unset($_SERVER['PHP_AUTH_PW']);
        //no need for a clear text password hanging around.
        try {
            $user = new User(array('username' => $_SERVER['PHP_AUTH_USER']));
            // Auto Register User
            fAuthorization::setUserToken($user->getEmail());
            fAuthorization::setUserAuthLevel($user->getRole());
            fSession::set('user_id', $user->getUserId());
            fSession::set('user_name', $user->getUsername());
        } catch (fNotFoundException $e) {
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:config.php

示例7: fDatabase

<?php

require __DIR__ . '/translate.php';
fText::registerComposeCallback('pre', 'translate');
fSession::setPath(SESSIONS_PATH);
fSession::setLength('1 day 2 hours');
fORMDatabase::attach(new fDatabase('mysql', DB_NAME, DB_USER, DB_PASS, DB_HOST));
fAuthorization::setLoginPage(SITE_BASE . '/login2');
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:8,代码来源:init.php


注:本文中的fAuthorization::setLoginPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。