file table.sql was added on branch rel-310 on 2009-07-31 19:39:59 +0000
[openemr.git] / library / freeb / xmlrpc_server.php
blob42165d97ecb5f321aa0e2f3dd9a07d387c44ceac
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();