<?php
// last modified 2007-07-20
if(defined('PSA_CONFIG_INC')) return TRUE;
define('PSA_CONFIG_INC',TRUE);
$PSA_SCR=array(
'phptype' => 'mysql', // which PEAR::MDB database driver are you using?
'username' => 'username', // database user name
'password' => 'password', // database password for above user name
'host' => 'localhost', // database host name or IP address
'database' => 'database', // the name of the database on the server
'login_form' => '',
'uripath' => '', // The site's doc root according to URI in most cases it is '',
// but also might be something like '/~username'
);
// do you want this script to output, or only set the $PSA_OUTPUT variable when calling the
// _restrict.php file?
define('PSA_DISPLAY_OUTPUT_RESTRICT',TRUE);
// do you want this script to output, or only set the $PSA_OUTPUT variable when calling
// using the administrative interface?
define('PSA_DISPLAY_OUTPUT',TRUE);
// Do you want to show the name of the site in the user or
define('PSA_SHOW_SITE_NAME',TRUE);
define('PSA_SITE_NAME','exmaple.com');
// If you want to have password recovery (forgot password?) ability for users,
// simply change this one to TRUE or FALSE to disable
define('PSA_PASS_RECOVER',TRUE);
// password reset/recover email information
$PSA_RESETPASS_EMAIL=array(
'activateLink' => '', // The url for activating the password reset process
// if this is not set, the URL that appears in the
// messages will look something like this:
// http://www.example.com:80/PSA/index.php?psaSec=passwordreset&id=USERNAME&ukey=4a4e9749f324858bec2ac40c6e2d6a38-61843899
'headers' => '', // And additional headers you want to add to the email
// message - used as the optional parameter for PHP's
// mail() function
'subject' => 'Password Reset Confirmation', // The email subject
'message' => '', // A custom message to prepend to the system messages
'fromName' => 'Webmaster', // From field in email
'fromEmail' => 'hide@address.com', // From email
'fromReplyTo' => 'hide@address.com' // The email address to reply to
);
// ----------------------------------------------------------------------------
// You shouldn't have to change anything below here
// ----------------------------------------------------------------------------
// uncomment this if you are debugging sessions
//define('PSA_SESS_DEBUG_FILE',PSA_PATH.'/session.debug.txt');
if(!defined('PSA_PATH')) define('PSA_PATH',dirname(__FILE__).'/..');
require_once PSA_PATH.'/include/class.phpSecurityAdm.php';
require_once PSA_PATH.'/include/sessions.php';
if(!function_exists('bindtextdomain')) require_once PSA_PATH.'/include/gettext.php';
$PSA_SYS=new phpSecurityAdm($PSA_SCR);
$PSA_err=$PSA_SYS->get_errors();
if(strlen($PSA_err)){
$PSA_SYS->error();
exit;
}
if(!defined('PSA_INSTALLING') && !defined('PSA_RESTRICT_INC'))
session_start();
// ----------------------------------------------------------------------------
// These functions are for the administration/user management part of the
// package. If you want to change how the pages look, you can edit the
// psaStyles.css file in the PSA_PATH directory.
// ----------------------------------------------------------------------------
function securityHeader($charset='iso-8859-1'){
global $PSA_SYS;
/* don't even ask about this stuff... */
$path=explode('/',$_SERVER['PHP_SELF']);
$last=array_pop($path);
$path=join('/',$path);
echo '<?xml version="1.0" encoding="iso-8859-1"?>',"\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title><?php echo (PSA_SHOW_SITE_NAME) ? PSA_SITE_NAME.': ' : ''; ?>SecurityAdmin for PHP <?php echo $PSA_SYS->version() ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
<link rel="stylesheet" href="<?php echo $path ?>/psaStyles.css" />
</head>
<body>
<?php
}
function securityFooter(){
?>
</body>
</html>
<?php
}
function link_docs(){
/* don't even ask about this stuff... */
$path=explode('/',$_SERVER['PHP_SELF']);
$last=array_pop($path);
$path=join('/',$path);
return '<a href="'.$path.'/phpSecurityAdm.html" title="'._("Documentation").'">'._("Documentation").'</a>';
}
?>