<?
// Digger_auth configuration file
// Version 1.0

// Version 1.0 - Set up global config system

// Select Database to use:
//include "odbc.php3";
//include $PHPLIB_DIR."mysql.php3";
  $this->CONFIG['track_logins'] = false;

  $this->CONFIG['allow_override'] = true;

  $this->CONFIG['use_cookies'] = false;

// Scripts running as CGI under Apache on Unix will probably need 
// to use $PATH_INFO instead of $PHP_SELF.

  $this->CONFIG['ttl'] = 0;

  $this->CONFIG['colors']['body'] = array('bgcolor'    => '#ffffff',
                                          'text'       => '#000000',
                                          'background' => '');

  $this->CONFIG['colors']['table'] = array('bgcolor' => '#c0c0c0');

  # Name
  # Mysql -> Database name
  # ODBC -> DSN name
  global $SQL_APP_HOST,$SQL_APP_DB,$SQL_APP_USR,$SQL_APP_PWD;
  $this->CONFIG['db'] = array('host' => $SQL_APP_HOST,
                              'name' => $SQL_APP_DB,
                              'uid'  => $SQL_APP_USR,
                              'pwd'  => $SQL_APP_PWD);

  $this->CONFIG['tables'] = array('session' => 'auth_sessions',
                                  'user'    => 'auth_users',
                                  'group'   => 'auth_groups',
                                  'member'  => 'auth_members',
                                  'login'   => 'auth_logins');

  $this->CONFIG['fields']['users']['id'] = 'userid';
  $this->CONFIG['fields']['users']['username'] = 'username';
  $this->CONFIG['fields']['users']['password'] = 'password';
  $this->skiplogin=1;
/*
  $this->CONFIG['fields']['sessions']['id']='id';
  $this->CONFIG['fields']['sessions']['userid']='userid';
  $this->CONFIG['fields']['sessions']['expires']='expires';
  $this->CONFIG['fields']['sessions']['challenge']='challenge';
//  $this->CONFIG['fields']['sessions']['ipaddress']='ipaddress';
  global $REMOTE_ADDR;
  $this->CONFIG['fields']['sessions']['ipaddress']="'".$REMOTE_ADDR."'";
*/
  // These two values must be single-quoted, comma-separated lists.
  // Example:  'users'  => "'user1', 'user2'"
  //           'groups' => "'group1', 'group2'"
  $this->CONFIG['allow'] = array('users'  => "'%'",
                                 'groups' => "'administrator','anonymous'");

  // The name of the current application.  This can be used to force
  // applications to not share session IDs, thereby allowing different
  // session settings for those apps.
  // FIXME:  For now, this value can only be set in this file or
  //         in a .auth file.  Sorry.
  $this->CONFIG['appname'] = '';

  // Files to Include before and after the Login HTML
  $this->CONFIG['loginheader']='';
  $this->CONFIG['loginfooter']='';

  $this->CONFIG['errors'] = array('unknown' => 'An unknown error has occurred.',
                                  'none' => '',
                                  'no username' => 'Please enter your Username.',
                                  'no SID cookie' => 'Your browser must support cookies.',
                                  'no SID' => '<H1>Please Login.</H1>',
                                  'database' => 'Database error.',
                                  'no session' => '<H1>Please Login.</H1>',
                                  'bad username' => 'Unknown Username.<br>Please check your spelling and try again.',
                                  'bad password' => 'Incorrect Password.<br>Please try again.',
                                  'session expired' => 'Your session has expired due to inactivity.<br>Please log in again.',
                                  'not logged in' => 'Your session is not logged in.<br>Please try again.',
				  'not permitted' => 'You are not authorized for this area.');

?>
