diff options
| author | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-09-16 15:57:55 +0000 |
|---|---|---|
| committer | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-09-16 15:57:55 +0000 |
| commit | 40940b95aaefd87f9af96439669cc6cb184d69ef (patch) | |
| tree | f0d65eaa1369aeaca88f5774f2ca2cba4932ca27 /php/Attic/examples/sample-idp/admin_user.php | |
| parent | 7ea2275ca076a880c27448cdbdfe09ffa9f15db8 (diff) | |
| download | lasso-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/admin_user.php')
| -rw-r--r-- | php/Attic/examples/sample-idp/admin_user.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/php/Attic/examples/sample-idp/admin_user.php b/php/Attic/examples/sample-idp/admin_user.php index 99d97457..ca5f14ba 100644 --- a/php/Attic/examples/sample-idp/admin_user.php +++ b/php/Attic/examples/sample-idp/admin_user.php @@ -22,16 +22,21 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - $config = unserialize(file_get_contents('config.inc')); - + require_once 'Log.php'; require_once 'DB.php'; + + $config = unserialize(file_get_contents('config.inc')); $number_of_users = 5; $db = &DB::connect($config['dsn']); if (DB::isError($db)) - die($db->getMessage()); + die("Could not connect to the database"); + + // create logger + $conf['db'] = $db; + $logger = &Log::factory($config['log_handler'], 'log', $_SERVER['PHP_SELF'], $conf); // Show XML dump if (!empty($_GET['dump']) && !empty($_GET['type'])) @@ -105,9 +110,9 @@ if (!isset($_GET['show_all'])) $query .= " OFFSET $startUser LIMIT " . ($startUser + $number_of_users); $res =& $db->query($query); - if (DB::isError($res)) - die($res->getMessage()); - + + if (DB::isError($db)) + die($db->getMessage()); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
