Location: PHPKode > projects > MyAppFW PHP Application Framework > myappfw-0.1-beta/include/incl_conf/global.inc.php
<?php

    if(!defined("CAN_CONTINUE")){ echo "No Direct Access Allowed..."; exit(); }

    require('config.inc.php');
    require($path['script_path'].'/libs/phpmailer/class.phpmailer.php');
    require_once($path['script_path'].'/libs/adodb/adodb.inc.php');
    require_once($path['script_path'].'/libs/adodb/adodb-exceptions.inc.php');
    require_once($path['script_path'].'/include/incl_class/class.template.php');

    session_start();

    // --------------------
    // Load all our classes
    // --------------------

    // Template Class
    $template = new Template();
    $template->selectTemplate('default');

    // ADODB
    $DB = NewADOConnection('mysql');
    $DB->Connect($dba['hostname'], $dba['username'], $dba['password'], $dba['dbname']);
    $DB->debug = $dba['debug'];

    if (!$DB->IsConnected()) {
        die("Unable to connect to MySQL Database.");
    }

    $mail = new PHPMailer();
    $mail->PluginDir = $path['script_path']."/libs/phpmailer";
    $mail->Host     = $mail_c['hostname'];
    $mail->SMTPAuth = $mail_c['require_smtp_auth'];
    $mail->Username = $mail_c['smtp_username'];
    $mail->Password = $mail_c['smtp_password'];
    $mail->From     = $mail_c['from_address'];
    $mail->FromName = $mail_c['from_name'];

    // ------------------------
    // Load all our config vars
    // ------------------------

    $rs = $DB->Execute("SELECT * FROM `".$dba['prefix']."config`");
    if ($rs === false) die("Failed loading config variables!");
    while (!$rs->EOF) {
	$config[$rs->fields['config_var']] = $rs->fields['config_val'];
	$rs->MoveNext();
    }

?>
Return current item: MyAppFW PHP Application Framework