summaryrefslogtreecommitdiffstats
path: root/php/Attic/examples/sample-idp/login.php
diff options
context:
space:
mode:
authorChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-16 15:57:55 +0000
committerChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-16 15:57:55 +0000
commit40940b95aaefd87f9af96439669cc6cb184d69ef (patch)
treef0d65eaa1369aeaca88f5774f2ca2cba4932ca27 /php/Attic/examples/sample-idp/login.php
parent7ea2275ca076a880c27448cdbdfe09ffa9f15db8 (diff)
downloadlasso-40940b95aaefd87f9af96439669cc6cb184d69ef.tar.gz
lasso-40940b95aaefd87f9af96439669cc6cb184d69ef.tar.xz
lasso-40940b95aaefd87f9af96439669cc6cb184d69ef.zip
New logging system with a web interface.
Diffstat (limited to 'php/Attic/examples/sample-idp/login.php')
-rw-r--r--php/Attic/examples/sample-idp/login.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/php/Attic/examples/sample-idp/login.php b/php/Attic/examples/sample-idp/login.php
index 33bd4120..21b196f9 100644
--- a/php/Attic/examples/sample-idp/login.php
+++ b/php/Attic/examples/sample-idp/login.php
@@ -21,14 +21,21 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
- $config = unserialize(file_get_contents('config.inc'));
require_once 'HTML/QuickForm.php';
require_once 'Log.php';
require_once 'DB.php';
+ $config = unserialize(file_get_contents('config.inc'));
+
+ // connect to the data base
+ $db = &DB::connect($config['dsn']);
+ if (DB::isError($db))
+ die("Could not connect to the database");
+
// create logger
- $logger = &Log::factory($config['log_handler'], '', $config['log_name']."::".$_SERVER['PHP_SELF']);
+ $conf['db'] = $db;
+ $logger = &Log::factory($config['log_handler'], 'log', $_SERVER['PHP_SELF'], $conf);
/*
*
@@ -70,15 +77,6 @@
return (0);
}
- $db = &DB::connect($config['dsn']);
-
- if (DB::isError($db))
- {
- $logger->log("DB Error :" . $db->getMessage(), PEAR_LOG_ALERT);
- $logger->log("DB Error :" . $db->getDebugInfo(), PEAR_LOG_DEBUG);
- die("Could not connect to the database");
- }
-
if ($config['auth_type'] == 'auth_basic')
{
if (!isset($_SERVER['PHP_AUTH_USER']))