2001-08-08 01:04:49 +02:00
|
|
|
<?php
|
2003-08-28 16:16:30 +02:00
|
|
|
/**************************************************************************\
|
2003-10-21 02:06:44 +02:00
|
|
|
* eGroupWare xmlrpc server *
|
2004-01-01 16:38:15 +01:00
|
|
|
* http://www.egroupware.org *
|
2003-10-21 02:06:44 +02:00
|
|
|
* This file written by Miles Lott <milos@groupwhere.org> *
|
2003-08-28 16:16:30 +02:00
|
|
|
* -------------------------------------------- *
|
|
|
|
* This program is free software; you can redistribute it and/or modify it *
|
|
|
|
* under the terms of the GNU General Public License as published by the *
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
|
|
* option) any later version. *
|
|
|
|
\**************************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
/* $Source$ */
|
|
|
|
|
2001-12-05 17:19:12 +01:00
|
|
|
$GLOBALS['phpgw_info'] = array();
|
2001-08-23 04:54:25 +02:00
|
|
|
$GLOBALS['phpgw_info']['flags'] = array(
|
2003-08-28 16:16:30 +02:00
|
|
|
'currentapp' => 'login',
|
|
|
|
'noheader' => True,
|
2001-12-11 03:01:37 +01:00
|
|
|
'disable_Template_class' => True
|
2001-08-08 01:04:49 +02:00
|
|
|
);
|
2003-08-28 16:16:30 +02:00
|
|
|
include('header.inc.php');
|
2001-08-08 01:04:49 +02:00
|
|
|
|
2003-10-21 02:04:56 +02:00
|
|
|
$server = CreateObject('phpgwapi.xmlrpc_server');
|
|
|
|
/* uncomment here if you want to show all of the testing functions for compatibility */
|
2004-03-12 18:58:55 +01:00
|
|
|
//include(PHPGW_API_INC . '/xmlrpc.interop.php');
|
2003-10-21 02:04:56 +02:00
|
|
|
|
|
|
|
/* Note: this command only available under Apache */
|
2003-08-28 16:16:30 +02:00
|
|
|
$headers = getallheaders();
|
2004-03-12 18:58:55 +01:00
|
|
|
//print_r($headers);
|
|
|
|
$auth_header = $headers['Authorization'] ? $headers['Authorization'] : $headers['authorization'];
|
|
|
|
|
|
|
|
if(eregi('Basic *([^ ]*)',$auth_header,$auth))
|
2001-08-20 01:55:58 +02:00
|
|
|
{
|
2004-03-12 18:58:55 +01:00
|
|
|
list($sessionid,$kp3) = explode(':',base64_decode($auth[1]));
|
|
|
|
//echo "auth='$auth[1]', sessionid='$sessionid', kp3='$kp3'\n";
|
2003-08-28 16:16:30 +02:00
|
|
|
}
|
2004-03-13 18:54:26 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
$sessionid = get_var('sessionid',array('COOKIE','GET'));
|
|
|
|
$kp3 = get_var('kp3',array('COOKIE','GET'));
|
|
|
|
}
|
|
|
|
$server->authed = $GLOBALS['phpgw']->session->verify($sessionid,$kp3);
|
2003-08-28 16:16:30 +02:00
|
|
|
|
2004-03-13 18:54:26 +01:00
|
|
|
$server->service($_SERVER['HTTP_RAW_POST_DATA']);
|
2003-10-21 02:04:56 +02:00
|
|
|
?>
|