<?php
/**
 * Phoebe pedagogic planner
 *
 * PHP version 5
 *
 * LICENSE: The GNU General Public License (GPL), version 2. See LICENSE.txt
 *
 * Copyright (c) 2006-2008 JISC/HEFCE/University of Oxford
 *
 * @author      David Balch <david.balch@conted.ox.ac.uk>
 * @license     http://opensource.org/licenses/gpl-license.php GPL2
 * @link        http://phoebe-project.conted.ox.ac.uk/
 */

$serverName = $_SERVER['SERVER_NAME'];
$today = date("Y-m-d");
$errorLog = "D:\\wwwroot\\phplogs\\$serverName\\$today.log";

error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', 'On');
ini_set('error_log', $errorLog);

require_once($_SERVER['DOCUMENT_ROOT'].'/inc/config.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/nav.php');
$CNF = new CONFIG($_SERVER['DOCUMENT_ROOT']);

require_once('MDB2.php');

$mdb2 =& MDB2::singleton($CNF->dsn);

if (PEAR::isError($mdb2)) {
    die ("Could not connect to database server: ".$mdb2->getMessage());
} else {
    // Connected to database server.
    $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC);
}
?>