From ed4dc30dc2b00628a3d6c298b6b2d6ec7f74ab56 Mon Sep 17 00:00:00 2001 From: gareth Date: Tue, 27 Feb 2007 23:31:14 +0000 Subject: Brought in other OGS server components and the all-important caffeine script --- ogs/gridserver/usersessions/index.php | 81 +++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 ogs/gridserver/usersessions/index.php (limited to 'ogs/gridserver/usersessions/index.php') diff --git a/ogs/gridserver/usersessions/index.php b/ogs/gridserver/usersessions/index.php new file mode 100644 index 0000000..3c18932 --- /dev/null +++ b/ogs/gridserver/usersessions/index.php @@ -0,0 +1,81 @@ +0) { + $info=mysql_fetch_assoc($result); + $circuit_code = $info['circuit_code']; + if($circuit_code == 0) $circuit_code=$params['4']; + $secure_session_id=$info['secure_session_id']; + $session_id=$info['session_id']; + + $query = "SELECT * FROM local_user_profiles WHERE userprofile_LLUUID='$agent_id'"; + $result=mysql_query($query); + $userinfo=mysql_fetch_assoc($result); + $firstname=$userinfo['profile_firstname']; + $lastname=$userinfo['profile_lastname']; + $agent_id=$userinfo['userprofile_LLUUID']; + $exists=1; +} else { + $exists=0; +} + +// if only 3 params, assume we are sending an XML response +if(count($params)==3) { + output_xml_block("usersession",Array( + 'authkey' => $sim_sendkey, + 'circuit_code' => $circuit_code, + 'agent_id' => $agent_id, + 'session_id' => $session_id, + 'secure_session_id' => $secure_session_id, + 'firstname' => $firstname, + 'lastname' => $lastname + )); +} + +switch($cmd) { + case 'exists': + echo $exists; + break; +} +?> -- cgit v1.1