aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ogs/assetserver/assetserver_config.inc.php16
-rw-r--r--ogs/assetserver/index.php25
-rw-r--r--ogs/gridserver/gridserver_config.inc.php0
-rw-r--r--ogs/gridserver/index.php0
-rw-r--r--ogs/gridserver/usersessions/.htaccess5
-rw-r--r--ogs/gridserver/usersessions/index.php85
6 files changed, 0 insertions, 131 deletions
diff --git a/ogs/assetserver/assetserver_config.inc.php b/ogs/assetserver/assetserver_config.inc.php
deleted file mode 100644
index b2199f3..0000000
--- a/ogs/assetserver/assetserver_config.inc.php
+++ /dev/null
@@ -1,16 +0,0 @@
1<?
2// All the asset server specific stuff lives here
3
4// The asset server's relative URL to the root of the webserver
5// If you place this at http://servername/assets then this would be set to /assets/index.php
6// wikipedia style URLs need to be implemented - and will be (en.wikipedia.org/wiki/blabla rather than en.wikipedia.org/wiki/index.php?something=bla or en.wikipedia.org/wiki.php/bla)
7$asset_home = "/ogs/assetserver/";
8
9// The key we expect from sims
10$sim_recvkey = "1234";
11
12// The path where the asset repository is stored, this should be readable by the webserver but NOT in the document root
13// The default below is BAD for production use and intended to be simply generic - change it or risk copyright theft
14// greater than you could ever imagine, alternatively use .htaccess or other mechanisms.
15$asset_repos = "/usr/local/sites/osgrid.org/web/ogs/assetserver/assets";
16?>
diff --git a/ogs/assetserver/index.php b/ogs/assetserver/index.php
deleted file mode 100644
index ee20229..0000000
--- a/ogs/assetserver/index.php
+++ /dev/null
@@ -1,25 +0,0 @@
1<?
2error_reporting(0); // Remember kids, PHP errors kill XML-RPC responses and REST too! will the slaughter ever end?
3
4include("assetserver_config.inc.php");
5
6// Parse out the parameters from the URL
7$params = str_replace($asset_home,'', $_SERVER['REQUEST_URI']);
8$params = str_replace("index.php/","",$params);
9$params = split('/',$params);
10
11// Die if the key doesn't match
12if($params[1]!=$sim_recvkey) {
13 die();
14}
15
16// Send requested data
17switch($params[0]) {
18 case 'getasset':
19 if($params[3]=="data") {
20 Header("Content-Length: ". (string)filesize($asset_repos . "/" . $params[2] . "/data"));
21 readfile($asset_repos . "/" . $params[2] . "/data");
22 }
23 break;
24}
25?>
diff --git a/ogs/gridserver/gridserver_config.inc.php b/ogs/gridserver/gridserver_config.inc.php
deleted file mode 100644
index e69de29..0000000
--- a/ogs/gridserver/gridserver_config.inc.php
+++ /dev/null
diff --git a/ogs/gridserver/index.php b/ogs/gridserver/index.php
deleted file mode 100644
index e69de29..0000000
--- a/ogs/gridserver/index.php
+++ /dev/null
diff --git a/ogs/gridserver/usersessions/.htaccess b/ogs/gridserver/usersessions/.htaccess
deleted file mode 100644
index 3b76a74..0000000
--- a/ogs/gridserver/usersessions/.htaccess
+++ /dev/null
@@ -1,5 +0,0 @@
1Options +FollowSymlinks
2
3RewriteEngine on
4RewriteOptions MaxRedirects=1
5RewriteRule .* index.php [L]
diff --git a/ogs/gridserver/usersessions/index.php b/ogs/gridserver/usersessions/index.php
deleted file mode 100644
index e7a3817..0000000
--- a/ogs/gridserver/usersessions/index.php
+++ /dev/null
@@ -1,85 +0,0 @@
1<?
2// DIRTY HACK ALERT!!!!!!!!!!!!!
3// The following code shows the vital importance of the r69 revision of the original gareth/ branch
4
5
6// This file parses URLs of the format:
7// usersessions/key/userid/data
8// where key is the key to authenticate with the grid, userid is the user's LLUUID and data is the data about the user's session being requested
9// if the data requested is left out, an XML response will be sent
10
11error_reporting(E_ALL); // Remember kids, PHP errors kill XML-RPC responses and REST too! will the slaughter ever end?
12
13include("../gridserver_config.inc.php");
14include("../../common/database.inc.php");
15include("../../common/util.inc.php");
16
17// Parse out the parameters from the URL
18$params = str_replace($grid_home,'', $_SERVER['REQUEST_URI']);
19$params = str_replace("index.php/","",$params);
20$params = split('/',$params);
21
22// Die if the key doesn't match
23if($params[1]!=$sim_recvkey) {
24 die();
25}
26
27$link = mysql_connect($dbhost,$dbuser,$dbpasswd)
28 OR die("Unable to connect to database");
29
30mysql_select_db($dbname)
31 or die("Unable to select database");
32
33$agent_id = strtolower($params[2]);
34$query = "SELECT * FROM sessions WHERE agent_id='$agent_id' AND session_active=1";
35
36// if we have 4 params, then param 4 is the command
37if(count($params)==4) {
38 $cmd=$params['3'];
39} else if(count($params)==5) {
40 $circuit_code=$params[3];
41 $cmd=$params[4]; // otherwise, 5 is the command and 4 is the circuit code
42}
43
44$result = mysql_query($query);
45if(mysql_num_rows($result)>0) {
46 $info=mysql_fetch_assoc($result);
47 $circuit_code = $info['circuit_code'];
48 if($circuit_code == 0) $circuit_code=$params['4'];
49 $secure_session_id=$info['secure_session_id'];
50 $session_id=$info['session_id'];
51
52 $query = "SELECT * FROM local_user_profiles WHERE userprofile_LLUUID='$agent_id'";
53 $result=mysql_query($query);
54 $userinfo=mysql_fetch_assoc($result);
55 $firstname=$userinfo['profile_firstname'];
56 $lastname=$userinfo['profile_lastname'];
57 $agent_id=$userinfo['userprofile_LLUUID'];
58 $exists=1;
59} else {
60 $exists=0;
61}
62
63// if only 3 params, assume we are sending an XML response
64if(count($params)==3) {
65 output_xml_block("usersession",Array(
66 'authkey' => $sim_sendkey,
67 'circuit_code' => $circuit_code,
68 'agent_id' => $agent_id,
69 'session_id' => $session_id,
70 'secure_session_id' => $secure_session_id,
71 'firstname' => $firstname,
72 'lastname' => $lastname
73 ));
74}
75
76switch($cmd) {
77 case 'exists':
78 echo $exists;
79 break;
80 case 'delete':
81 $query = "UPDATE sessions SET session_active=0, session_end=NOW() WHERE agent_id='$agent_id' LIMIT 1";
82 $deleteresult = mysql_query($query);
83 break;
84}
85?>