mirror of
https://github.com/kcozens/OpenSimSearch.git
synced 2026-08-14 08:52:28 +00:00
Update query.php for Events Search
git-svn-id: http://forge.opensimulator.org/svn/ossearch/trunk@49 109abde3-1f22-4c10-b5d7-b6b0135cd00c
This commit is contained in:
+45
-2
@@ -233,7 +233,7 @@ function dir_events_query($method_name, $params, $app_data)
|
||||
return;
|
||||
}
|
||||
|
||||
$terms = array();
|
||||
$terms = array();
|
||||
|
||||
if ($flags & 0x2000) $terms[] = "mature = 'false'";
|
||||
|
||||
@@ -268,6 +268,49 @@ function dir_events_query($method_name, $params, $app_data)
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "event_info_query",
|
||||
"event_info_query");
|
||||
|
||||
function event_info_query($method_name, $params, $app_data)
|
||||
{
|
||||
$req = $params[0];
|
||||
|
||||
$eventID = $req['eventID'];
|
||||
|
||||
$sql = "select * from events where eventID = $eventID"
|
||||
|
||||
$result = mysql_query($sql);
|
||||
|
||||
$data = array();
|
||||
while (($row = mysql_fetch_assoc($result)))
|
||||
{
|
||||
$data[] = array(
|
||||
"event_id" => $row["eventID"],
|
||||
"creator" => $row["Creator"],
|
||||
"name" => $row["Name"],
|
||||
"category" => $row["Category"],
|
||||
"description" => $row["Desc"],
|
||||
"date" => $row["Date"],
|
||||
"dateUTC" => $row["DateUTC"],
|
||||
"duration" => $row["Duration"],
|
||||
"covercharge" => $row["Cover"],
|
||||
"coveramount" => $row["Amount"],
|
||||
"simName" => $row["SimName"],
|
||||
"globalposition" => $row["GlobalPos"],
|
||||
"eventflags" => $row["EventFlags"]
|
||||
);
|
||||
}
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => True,
|
||||
'errorMessage' => "",
|
||||
'data' => $data
|
||||
));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
#
|
||||
# Process the request
|
||||
#
|
||||
@@ -275,4 +318,4 @@ function dir_events_query($method_name, $params, $app_data)
|
||||
$request_xml = $HTTP_RAW_POST_DATA;
|
||||
xmlrpc_server_call_method($xmlrpc_server, $request_xml, '');
|
||||
xmlrpc_server_destroy($xmlrpc_server);
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user