Fixed multiple bugs in linking patient notes to documents.
[openemr.git] / library / freeb / xmlrpc_server.php
bloba022b38ff509665b0dc7caee89c742c0a844c51d
1 <?php
2 require_once("xmlrpc.inc");
3 require_once("xmlrpcs.inc");
4 require_once("OpenemrBillingServer.class.php");
6 require_once(dirname(__FILE__) . "/../../includes/config.php");
8 $auth=false;
10 if ($_SERVER['PHP_AUTH_USER'] == $GLOBALS['oer_config']['freeb']['username'] && $_SERVER['PHP_AUTH_PW'] == $GLOBALS['oer_config']['freeb']['password']) {
11 $auth = true;
15 session_start();
17 $oerbill = new OpenemrBillingServer($GLOBALS['xmlrpcerruser']);
19 $s=new xmlrpc_server(false,false);
21 if (! $auth) {
22 header('WWW-Authenticate: Basic realm="Unauthorized Access Prohibited"');
23 header("HTTP/1.0 401 Unauthorized");
24 return new xmlrpcresp(0, &$oerbill->xmlrpcerruser, $GLOBALS['xmlrpcerruser']);
27 $s->registerMethods(&$oerbill);
28 $s->service();