Example #1
0
}
require_once _CALEM_DIR_ . 'server/conf/calem.php';
//Configuration
require_once _CALEM_DIR_ . 'server/conf/soap_map.php';
//Soap mapping
require_once _CALEM_DIR_ . 'server/include/log4php/LoggerManager.php';
//Logger
require_once _CALEM_DIR_ . 'server/include/core/CalemSoapRequest.php';
require_once _CALEM_DIR_ . 'server/include/util/CalemHttpHelper.php';
//Must have PEAR SOAP on the path
require_once 'SOAP/Parser.php';
//Disable browser side cache
header('Cache-Control: no-cache');
//Start handling the request.
$logger =& LoggerManager::getLogger('CalemSoapService');
$postData = CalemHttpHelper::getPostData();
$calemSoapRequest = new CalemSoapRequest();
if ($logger->isInfoEnabled()) {
    $logger->info("acceptedEncoding=" . $_SERVER['HTTP_ACCEPT_ENCODING'] . ", Received a post request=" . $postData);
}
if (!$postData) {
    if ($logger->isDebugEnabled()) {
        $logger->debug("Invalid post data.");
    }
    $calemSoapRequest->sendFault(CALEM_SF_NO_POSTDATA);
}
//Processing postData
$parser =& new SOAP_Parser($postData);
$request_headers = $parser->getHeaders();
if ($request_headers) {
    if (!is_a($request_headers, 'SOAP_Value')) {
Example #2
0
require_once _CALEM_DIR_ . 'server/include/util/CalemExit.php';
require_once _CALEM_DIR_ . 'server/include/util/CalemMsg.php';
if ($_CALEM_conf['calem_mode'] == CALEM_PRODUCTION && is_dir(_CALEM_DIR_ . '/installation')) {
    $loginErrorText = CalemMsg::getMsg("installation_not_deleted");
    require _CALEM_DIR_ . $_CALEM_conf['noses_allowed_actions']['LoginAction'];
    //Close down logger
    CalemExit::exitCalem();
}
//Disable browser side cache
header('Cache-Control: no-cache');
//Start handling the request.
$logger =& LoggerManager::getLogger('main');
$sid = isset($_REQUEST['sessionId']) ? $_REQUEST['sessionId'] : null;
if ($logger->isInfoEnabled()) {
    require_once _CALEM_DIR_ . 'server/include/util/CalemHttpHelper.php';
    $logger->info("uri=" . $_SERVER['REQUEST_URI'] . ", post: " . CalemHttpHelper::getPostData() . ', agent=' . $_SERVER['HTTP_USER_AGENT']);
}
$action = isset($_REQUEST['calemAction']) ? $_REQUEST['calemAction'] : null;
//This is the only action supported so far so make it simple at this point.
if ($action) {
    $succ = false;
    $lang = $_REQUEST[CALEM_PARAM_LANG];
    if (!$lang) {
        $lang = $_CALEM_conf['client_language'];
    }
    if ($action == 'LoginAction') {
        setCookie('CALEM_LANG', $_REQUEST[CALEM_PARAM_LANG], time() + $_CALEM_conf['setting_cookie_expire']);
        $login_username = $_REQUEST['username'];
        $login_password = $_REQUEST['password'];
        require_once _CALEM_DIR_ . 'server/modules/admin/soap/CalemLoginSo.php';
        $ex = '';