示例#1
0
include ($plugin_dir.'/config/config.php');

//include commsy auth interface
include ($plugin_dir.'/commsy_auth.php');
$auth = new CommsyAuthManager($environment);

include_once($plugin_dir.'/server/db_mysql.php');
$mediabirdDb = new MediabirdDboMySql();

//set database interface 
$auth->setDb($mediabirdDb);

if($mediabirdDb->connect()) {
		
		$controller = new MediabirdController($mediabirdDb,$auth);
		$reply = $controller->dispatch($action, $_POST);
		
		$mediabirdDb->disconnect();
		
		MediabirdUtility::jsonHeader();
		if(!empty($reply)) {
			echo json_encode($reply);
		}
}
else {
	exit;
}
flush();
exit();
?>