diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /web/offline.php | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'web/offline.php')
-rw-r--r-- | web/offline.php | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/web/offline.php b/web/offline.php deleted file mode 100644 index f4b26c6..0000000 --- a/web/offline.php +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | <?php | ||
2 | include("../config/os_modules_mysql.php"); | ||
3 | |||
4 | define("C_DB_TYPE","mysql"); | ||
5 | define("C_DB_HOST",$DB_HOST); | ||
6 | define("C_DB_NAME",$DB_NAME); | ||
7 | define("C_DB_USER",$DB_USER); | ||
8 | define("C_DB_PASS",$DB_PASSWORD); | ||
9 | define("C_OFFLINE_IM_TBL", "Offline_IM"); | ||
10 | include("offline_mysql.php"); | ||
11 | $DbLink = new DB; | ||
12 | $method = $_SERVER["PATH_INFO"]; | ||
13 | if ($method == "/SaveMessage/") | ||
14 | { | ||
15 | $msg = $HTTP_RAW_POST_DATA; | ||
16 | $start = strpos($msg, "?>"); | ||
17 | if ($start != -1) | ||
18 | { | ||
19 | $start+=2; | ||
20 | $msg = substr($msg, $start); | ||
21 | $parts = split("[<>]", $msg); | ||
22 | $to_agent = $parts[12]; | ||
23 | $DbLink->query("insert into ".C_OFFLINE_IM_TBL." (uuid, message) values ('" . | ||
24 | mysql_escape_string($to_agent) . "', '" . | ||
25 | mysql_escape_string($msg) . "')"); | ||
26 | echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><boolean>true</boolean>"; | ||
27 | } | ||
28 | else | ||
29 | { | ||
30 | echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><boolean>false</boolean>"; | ||
31 | } | ||
32 | exit; | ||
33 | } | ||
34 | if ($method == "/RetrieveMessages/") | ||
35 | { | ||
36 | $parms = $HTTP_RAW_POST_DATA; | ||
37 | $parts = split("[<>]", $parms); | ||
38 | $agent_id = $parts[6]; | ||
39 | $DbLink->query("select message from ".C_OFFLINE_IM_TBL." where uuid='" . | ||
40 | mysql_escape_string($agent_id) . "'"); | ||
41 | echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><ArrayOfGridInstantMessage xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">"; | ||
42 | while(list($message) = $DbLink->next_record()) | ||
43 | { | ||
44 | echo $message; | ||
45 | } | ||
46 | echo "</ArrayOfGridInstantMessage>"; | ||
47 | $DbLink->query("delete from ".C_OFFLINE_IM_TBL." where uuid='" . | ||
48 | mysql_escape_string($agent_id) . "'"); | ||
49 | exit; | ||
50 | } | ||
51 | ?> | ||