PHP Classes

File: config.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of David Duong  >  Usermanage  >  config.php  >  Download  
File: config.php
Role: Configuration script
Content type: text/plain
Description: Configures usermanage
Class: Usermanage
Puzzle like modular authentication class
Author: By
Last change:
Date: 10 years ago
Size: 3,693 bytes


Class file image Download
// ----------------------------------------------------------------------
// LEMP - Lightweight Efficient Modular PHP Application Framework
// @copyright 2002-2003 The CGI Open Source Federation. (
// @version $Id: config.php,v 1.37 2004/05/16 20:11:26 cogs Exp $
// ----------------------------------------------------------------------
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// 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
// GNU General Public License for more details.
// You should have recieved the lincence included with the disribution.
// If not visit
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// If handler is not: mysql then 'auth/db/' . $db['handler'] . '.php' will be loaded (if exists).
$db['type'] = 'mysql'; // What should we use to handle database interactions?
$db['host'] = 'localhost'; // example - or localhost
$db['username'] = 'your_username'; // Database user name
$db['password'] = 'your_password'; // Database password
$db['database'] = 'your_database'; // Name of the database database to use
$db['prefix'] = 'user'; // Table names will start with [prefix]_tablename. This cannot contain any underscores.

// Remove everything below (except the ? > tag) if the auth module is not used.
// General auth config
$auth_config['session_name'] = 'authok'; // The name of the cookie that User Manage uses.
$auth_config['session_expire'] = 4000; // How long should the cookie stay on the client's computer?
$auth_config['session_expire_ext'] = 2592000; // How long should a cookie last if the user requests a persistent login.

// Object Schematics:
$objects['auth']['file'] = 'auth.php';

// Set default to whichever class you want created if creat_obj is called w/o any parameters.
$objects['default'] = 'auth';

// Table schematics. If your are using a shared table, change uid, uname, pass, and sid to the matching columns.
$tables['auth_user_info']['_name'] = $db['prefix'] . '_user_info'; // Table name.
$tables['auth_user_info']['uid'] = 'uid';
$tables['auth_user_info']['uname'] = 'uname';
$tables['auth_user_info']['pass'] = 'pass';
$tables['auth_user_info']['sid'] = 'sid';

// Static/Extendible config vars. See Documentation.
$config_vars['static'][] = 'auth_config';

// Optional, usually does not need change.
define ('AUTH_DUP_UNAME', 'Form Error: Username already exists');
define ('AUTH_PW_MISMATCH', 'Form Error: The entered passwords do not match');
define ('AUTH_PW_NOT_ENTERED', 'Form Error: One or both passwords were not entered');
define ('AUTH_PW_SHORT', 'Form Error: Password length is too long');
define ('AUTH_PW_LONG', 'Form Error: Password length is too short');
define ('AUTH_INCORRECT_UID', 'Form Error: No Such UID or UID is unset');
define ('AUTH_NOT_LOGED_IN', 'Permission Denied: Must login');
define ('AUTH_SESSION_TIMEOUT', 'Permission Denied: Session timed out');
define ('AUTH_UNAME_NOT_FOUND', 'Could Not Authenticate: No Such User');
define ('AUTH_BAD_PW', 'Could Not Authenticate: Bad Password');