<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

    include './system.inc.php';
    include './libs/Class.Services.php';
    include './libs/Class.Sms.php';
    include './libs/Class.Sva.Log.php';
    include './libs/Class.Sva.Tool.php';
    include './libs/Class.mail.php';
    include './libs/class.phpmailer.php';
    include './libs/class.pop3.php';
    include './libs/class.smtp.php';
    include './commons/utilities.php';
    include './libs/Class.MMG.Management.php';
	include './libs/Class.Xml.Handler.php';
	include './libs/PHPExcel/IOFactory.php';
	require_once "./libs/class.writeexcel_workbook.inc.php";
    require_once "./libs/class.writeexcel_worksheet.inc.php";
	
	
    
    
    $svaLog = new SVALog($cfg['web.log.path'], $cfg['web.log.filename'], $cfg['web.log.level']);
	
    $xmlHandler = new xmlHandler($svaLog);
    
     switch ($cfg['db.type']) {
      
      case 0 : include './libs/Class.mysql.json.php'; 
      $dba = new MysqlJson($cfg['db.host'], $cfg['db.username'], $cfg['db.password'], $cfg['db.database'], NULL, $svaLog);
          
               break;
      case 1 : include './libs/Class.oracle.json.php'; 
	  $dba = new DBAccess ( $cfg['db.host'], $cfg['db.username'], $cfg['db.password'], $cfg['db.database'], $cfg['db.tnsname'], $svaLog);
              break;
      
	  
	 
	  
	  
      
  }
  $adm = new MMGManagement( $dba );

?>
