PHP Classes

File: config.inc.php

Recommend this page to a friend!
  Classes of Igor Feghali   Power 2 Protect   config.inc.php   Download  
File: config.inc.php
Role: Configuration script
Content type: text/plain
Description: Config File
Class: Power 2 Protect
Restrict user access to pages based on permissions
Author: By
Last change: Variable names has changed.
Date: 18 years ago
Size: 1,868 bytes
 

Contents

Class file image Download
<?

/* #INFO############################################
Author: Igor Feghali
(c) 2003-2006, ifeghali@interveritas.net
----------------------------------------------------
This file is part of Power 2 Protect Class
----------------------------------------------------
################################################# */

/* #DESCRIPTION#####################################
Contains the variables needed to be set for personal
configuration and MySQL conection parameters.
Connects to MySQL database nd starts power2protect
session.
################################################# */

// #CONFIGURATION VARS: SET THEM TO YOUR VALUES#####
$mysql_server = "localhost"; // mysql server
$mysql_user = "root"; // mysql user
$mysql_pass = ""; //mysql password for user
$mysql_db = "turismo"; // mysql database to use

$table_user = "user"; // name of the table witch contains user login,code and password
$table_usertype = "usertype"; // name of the table witch contains user types
$table_perm = "userperm"; // name of the table witch contains website permissions

$location_accessdenied = "http://localhost/turismo/admin/error_access.php"; // access denied page
$location_loginerror = "http://localhost/turismo/admin/index.php?error=invalidlogin"; // invalid login page
$location_logout = "http://localhost/turismo/admin/index.php"; // the user will be redirected to that page after logout

$session_name = "power2protect"; // anything you want
// ################################################

// #CODE############################################
if (is_null($location_accessdenied))
   
$location_accessdenied = $location_accessdenied_default;

$con = mysql_connect($mysql_server,$mysql_user,$mysql_pass);
$db = mysql_select_db($mysql_db);

session_name("power2protect");
session_start();
// #################################################

?>