<?php
if (!array_key_exists('coregrade', $GLOBALS)) {	
	$coregrade = new coregrade_api_oameye\coregrade();

	$USER = $_SERVER['SCRIPT_FILENAME'];
	$USER = str_replace('/home', '', $USER);
	$USER = strtok($USER, '/');
	if ($USER=='opt') $USER = 'root';
	// Load API class
/*	$USER="savvy";
	$savvyext_class = 'savvyext_api_' . $USER . '\\SavvyExt';
	$savvyext = new $savvyext_class();
*/
        
         $coregrade_class = 'coregrade_api_' . $USER . '\\coregrade';
        if (!is_object($coregrade)) {
            $coregrade = new $coregrade_class();
        }
}



