validateUser($agentid, $sessionid); if ($id) { $membership_levels = array( 'levels' => array( 'id' => "00000000-0000-0000-0000-000000000000", 'description' => "some level" ) ); $landUse = array( 'upgrade' => false, 'action' => "" . $this::SYSURL . "" ); $currency = array( 'estimatedCost' => "200.00" ); // convert_to_real($amount)); $membership = array( 'upgrade' => false, 'action' => "" . $this::SYSURL . "", 'levels' => $membership_levels ); $response_xml = xmlrpc_encode(array( 'success' => true, 'currency' => $currency, 'membership' => $membership, 'landUse' => $landUse, 'currency' => $currency, 'confirm' => $confirmvalue )); header("Content-type: text/xml"); print $response_xml; } else { header("Content-type: text/xml"); $response_xml = xmlrpc_encode(array( 'success' => false, 'errorMessage' => "\n\nUnable to Authenticate\n\nClick URL for more info.", 'errorURI' => "" . $this::SYSURL . "" )); print $response_xml; } return ""; }); $request_xml = file_get_contents('php://input'); xmlrpc_server_call_method($xmlrpc_server, $request_xml, ''); xmlrpc_server_destroy($xmlrpc_server); } private function validateUser($agent_id, $s_session_id) { $stmt = $this->app->db()->prepare("SELECT UserID FROM Presence WHERE UserID=? AND SecureSessionID = ?"); $stmt->execute(array($agent_id, $s_session_id)); if ($stmt->rowCount() == 0) { return false; } $res = $stmt->fetch(); return $res['UserID']; } }