├── .gitignore ├── INSTALL.md ├── LICENSE ├── LICENSE-leaflet-label.txt ├── LICENSE-leaflet-mouseposition.txt ├── LICENSE-llview-artwork.txt ├── LICENSE-phpGridServer.txt ├── LICENSE.leaflet.txt ├── README.md ├── accounts ├── rpc_createuser.php ├── rpc_getaccount.php ├── rpc_getaccounts.php ├── rpc_getmultiaccounts.php └── rpc_setaccount.php ├── admin ├── admin_login.php ├── create_admin_user.php ├── index.php ├── pages │ ├── all_regiondefaults.php │ ├── all_regions.php │ ├── all_serverparams.php │ ├── all_users.php │ ├── changeuserpassword.php │ ├── create_user.php │ ├── edit_serverparam.php │ └── show_region.php └── session.php ├── apache_config.sample ├── auth ├── rpc_authenticate.php ├── rpc_getauthinfo.php ├── rpc_release.php ├── rpc_setauthinfo.php ├── rpc_setpassword.php └── rpc_verify.php ├── avatar ├── rpc_getavatar.php ├── rpc_removeitems.php ├── rpc_resetavatar.php ├── rpc_setavatar.php └── rpc_setitems.php ├── config.acl.php ├── config.hg.php ├── config.migrations.php ├── config.mysql.php ├── config.php.sample ├── css ├── admin.css ├── main.css └── user.css ├── friends ├── rpc_deletefriend.php ├── rpc_deletefriend_string.php ├── rpc_getfriends.php ├── rpc_getfriends_string.php └── rpc_storefriend.php ├── frontpage.sample.php ├── get_grid_info.php ├── grid ├── rpc_deregister.php ├── rpc_get_default_hypergrid_regions.php ├── rpc_get_default_regions.php ├── rpc_get_fallback_regions.php ├── rpc_get_grid_extra_features.php ├── rpc_get_hyperlinks.php ├── rpc_get_neighbours.php ├── rpc_get_region_by_name.php ├── rpc_get_region_by_position.php ├── rpc_get_region_by_uuid.php ├── rpc_get_region_flags.php ├── rpc_get_region_range.php ├── rpc_get_regions_by_name.php └── rpc_register.php ├── gridmap.php ├── gridsearch.php ├── griduser ├── rpc_getgriduserinfo.php ├── rpc_getgriduserinfos.php ├── rpc_loggedin.php ├── rpc_loggedout.php ├── rpc_sethome.php └── rpc_setposition.php ├── groups ├── rpc_ADDAGENTTOGROUP.php ├── rpc_ADDNOTICE.php ├── rpc_AGENTROLE.ADD.php ├── rpc_AGENTROLE.DELETE.php ├── rpc_AGENTROLE.php ├── rpc_FINDGROUPS.php ├── rpc_GETAGENTROLES.php ├── rpc_GETGROUP.php ├── rpc_GETGROUPMEMBERS.php ├── rpc_GETGROUPROLES.php ├── rpc_GETMEMBERSHIP.php ├── rpc_GETNOTICES.php ├── rpc_GETROLEMEMBERS.php ├── rpc_INVITE.ADD.php ├── rpc_INVITE.DELETE.php ├── rpc_INVITE.GET.php ├── rpc_INVITE.php ├── rpc_PUTGROUP.ADD.php ├── rpc_PUTGROUP.UPDATE.php ├── rpc_PUTGROUP.php ├── rpc_PUTROLE.ADD.php ├── rpc_PUTROLE.UPDATE.php ├── rpc_PUTROLE.php ├── rpc_REMOVEAGENTFROMGROUP.php ├── rpc_REMOVEROLE.php ├── rpc_SETACTIVE.php └── rpc_UPDATEMEMBERSHIP.php ├── hg └── foreignagent │ └── index.php ├── hgfriends ├── rpc_deletefriendship.php ├── rpc_friendship_offered.php ├── rpc_getfriendperms.php ├── rpc_newfriendship.php ├── rpc_statusnotification.php └── rpc_validate_friendship_offered.php ├── hggroups ├── rpc_ADDNOTICE.php ├── rpc_GETGROUP.php ├── rpc_GETGROUPMEMBERS.php ├── rpc_GETGROUPROLES.php ├── rpc_GETROLEMEMBERS.php ├── rpc_POSTGROUP.php ├── rpc_REMOVEAGENTFROMGROUP.php └── rpc_VERIFYNOTICE.php ├── homecap ├── CreateInventoryCategory.php ├── FetchInventory2.php └── FetchInventoryDescendents2.php ├── index.php ├── json20rpc ├── json20rpc.php ├── jsonrpc_avatar_interests_update.php ├── jsonrpc_avatar_notes_update.php ├── jsonrpc_avatar_properties_request.php ├── jsonrpc_avatar_properties_update.php ├── jsonrpc_avatarclassifiedsrequest.php ├── jsonrpc_avatarnotesrequest.php ├── jsonrpc_avatarpicksrequest.php ├── jsonrpc_classified_delete.php ├── jsonrpc_classified_update.php ├── jsonrpc_classifieds_info_query.php ├── jsonrpc_image_assets_request.php ├── jsonrpc_pickinforequest.php ├── jsonrpc_picks_delete.php ├── jsonrpc_picks_update.php ├── jsonrpc_user_data_request.php ├── jsonrpc_user_data_update.php ├── jsonrpc_user_preferences_request.php └── jsonrpc_user_preferences_update.php ├── json_grid_info.php ├── landtool.php ├── lib ├── AssetTransferer.php ├── TarReader.php ├── accesscontrol │ ├── providers │ │ ├── ConfigurableIPAccessControl.php │ │ ├── ConfigurableIPMethodAccessControl.php │ │ ├── PrivateIPAccessControl.php │ │ ├── SimulatorAccessControl.php │ │ └── UnrestrictedMethodAccessControl.php │ └── wrappers │ │ └── AccessControlWrapper.php ├── accessdistributor │ ├── AssetService.php │ ├── AssetServiceLib.php │ └── GridUserService.php ├── archives │ └── OarAssetReader.php ├── connectors │ ├── db │ │ └── mysql │ │ │ ├── AssetService.php │ │ │ ├── AuthInfoService.php │ │ │ ├── AvatarService.php │ │ │ ├── ContentSearchService.php │ │ │ ├── FriendsService.php │ │ │ ├── GridService.php │ │ │ ├── GridUserFromInventoryService.php │ │ │ ├── GridUserService.php │ │ │ ├── GroupsService.php │ │ │ ├── HGServerDataService.php │ │ │ ├── HGTravelingDataService.php │ │ │ ├── InventoryService.php │ │ │ ├── MaptileService.php │ │ │ ├── MigrationDataService.php │ │ │ ├── OfflineIMService.php │ │ │ ├── PresenceService.php │ │ │ ├── ProfileService.php │ │ │ ├── ServerParamService.php │ │ │ ├── UserAccountService.php │ │ │ ├── _MySQLConnectionCache.php │ │ │ └── _WildcardLikeConverter.php │ ├── http │ │ ├── Curl.php │ │ └── PHP_HTTP.php │ ├── hypergrid │ │ ├── AssetRemoteConnector.php │ │ ├── GatekeeperRemoteConnector.php │ │ ├── GroupsRemoteConnector.php │ │ ├── HGFriendsRemoteConnector.php │ │ ├── InventoryRemoteConnector.php │ │ ├── ProfileRemoteConnector.php │ │ └── UserAgentRemoteConnector.php │ ├── im │ │ └── xmlrpc.php │ ├── launchagent │ │ └── json.php │ └── sim │ │ └── Friends │ │ └── LocalOnly.php ├── filesystem │ └── AssetService.php ├── helpers │ ├── capabilityPathes.php │ ├── fetchInventory.php │ ├── gridlibrary.php │ ├── groupsService.php │ ├── hgSession.php │ └── inventoryService.php ├── interfaces │ ├── AccessControlServiceInterface.php │ ├── AssetServiceInterface.php │ ├── AuthInfoServiceInterface.php │ ├── AuthenticationServiceInterface.php │ ├── AuthorizationServiceInterface.php │ ├── AvatarServiceInterface.php │ ├── ContentSearchServiceInterface.php │ ├── DestinationLookupServiceInterface.php │ ├── FriendsServiceInterface.php │ ├── FriendsSimConnectorServiceInterface.php │ ├── GatekeeperServiceInterface.php │ ├── GridServiceInterface.php │ ├── GridUserServiceInterface.php │ ├── GroupsServiceInterface.php │ ├── HGFriendsServiceInterface.php │ ├── HGServerDataServiceInterface.php │ ├── HGTravelingDataServiceInterface.php │ ├── HttpConnectorServiceInterface.php │ ├── IMServiceInterface.php │ ├── InventoryServiceInterface.php │ ├── LaunchAgentServiceInterface.php │ ├── MaptileServiceInterface.php │ ├── MigrationDataServiceInterface.php │ ├── OfflineIMServiceInterface.php │ ├── PresenceHandlerServiceInterface.php │ ├── PresenceServiceInterface.php │ ├── ProfileServiceInterface.php │ ├── ServerParamServiceInterface.php │ └── UserAccountServiceInterface.php ├── js │ ├── dynatree │ │ ├── GPL-LICENSE.txt │ │ ├── MIT-License.txt │ │ ├── jquery.dynatree.js │ │ ├── jquery.dynatree.min.js │ │ ├── skin-vista │ │ │ ├── icons.gif │ │ │ ├── loading.gif │ │ │ └── ui.dynatree.css │ │ └── skin │ │ │ ├── icons-rtl.gif │ │ │ ├── icons.gif │ │ │ ├── loading.gif │ │ │ ├── ui.dynatree.css │ │ │ ├── vline-rtl.gif │ │ │ └── vline.gif │ ├── jquery-ui │ │ ├── css │ │ │ └── no-theme │ │ │ │ └── jquery-ui-1.10.4.custom.min.css │ │ └── jquery-ui-1.10.4.custom.js │ ├── jquery │ │ └── jquery-1.11.0.min.js │ ├── leaflet-plugins │ │ ├── contextmenu │ │ │ ├── README.md │ │ │ ├── leaflet.contextmenu.css │ │ │ ├── leaflet.contextmenu.js │ │ │ ├── zoom-in.png │ │ │ └── zoom-out.png │ │ ├── fullscreen │ │ │ ├── LICENSE │ │ │ ├── Leaflet.fullscreen.js │ │ │ ├── fullscreen.png │ │ │ ├── fullscreen.svg │ │ │ ├── fullscreen@2x.png │ │ │ └── leaflet.fullscreen.css │ │ ├── geocoder │ │ │ ├── Control.Geocoder.css │ │ │ ├── Control.Geocoder.js │ │ │ ├── LICENSE │ │ │ └── images │ │ │ │ ├── Thumbs.db │ │ │ │ ├── geocoder.png │ │ │ │ └── throbber.gif │ │ ├── label │ │ │ ├── BaseMarkerMethods.js │ │ │ ├── CircleMarker.Label.js │ │ │ ├── FeatureGroup.Label.js │ │ │ ├── Label.js │ │ │ ├── Leaflet.label.js │ │ │ ├── Map.Label.js │ │ │ ├── Marker.Label.js │ │ │ ├── Path.Label.js │ │ │ └── copyright.js │ │ ├── minimap │ │ │ ├── Control.MiniMap-de.js │ │ │ ├── Control.MiniMap.css │ │ │ ├── Control.MiniMap.js │ │ │ ├── LICENSE.txt │ │ │ └── images │ │ │ │ └── toggle.png │ │ ├── mouseposition │ │ │ ├── L.Control.MousePosition.css │ │ │ ├── L.Control.MousePosition.js │ │ │ └── MIT-LICENCE.txt │ │ ├── textpath │ │ │ ├── LICENSE │ │ │ └── leaflet.textpath.js │ │ └── zoomslider │ │ │ ├── L.Control.Zoomslider.css │ │ │ ├── L.Control.Zoomslider.ie.css │ │ │ ├── L.Control.Zoomslider.js │ │ │ └── LICENSE │ └── leaflet │ │ ├── images │ │ ├── layers-2x.png │ │ ├── layers.png │ │ ├── marker-icon-2x.png │ │ ├── marker-icon.png │ │ └── marker-shadow.png │ │ ├── leaflet.css │ │ └── leaflet.js ├── permissions │ ├── AssetService │ │ └── HG.php │ ├── GridService │ │ └── Default.php │ ├── GroupsService │ │ └── Default.php │ └── InventoryService │ │ ├── AntiMel.php │ │ ├── HG1_0.php │ │ └── MakePermissive.php ├── presence │ ├── ConnectorIterator.php │ └── Simulator.php ├── rpc │ ├── agentpost.php │ ├── json.php │ ├── json20rpc.php │ ├── llsdbinary.php │ ├── llsdxml.php │ ├── os_response.php │ ├── restrpc.php │ ├── types.php │ └── xmlrpc.php ├── services.php ├── services │ ├── MaptileZoomGenerator.php │ ├── authentication │ │ ├── NoAuthenticationService.php │ │ └── PasswordAuthenticationService.php │ ├── destinationlookup │ │ ├── GridLocal.php │ │ └── HG.php │ ├── hypergrid │ │ ├── AssetGuardService.php │ │ ├── HGFriendsService.php │ │ └── InventoryGuardService.php │ └── im │ │ └── Grid.php ├── snapshots │ └── opensim-snapshot-fetcher.php ├── types │ ├── AppearanceInfo.php │ ├── Asset.php │ ├── AuthInfo.php │ ├── BinaryData.php │ ├── CircuitInfo.php │ ├── ClientInfo.php │ ├── CoalescedObject.php │ ├── DestinationInfo.php │ ├── Friend.php │ ├── GridInstantMessage.php │ ├── GridServicesInfo.php │ ├── GridUserInfo.php │ ├── GroupTypes.php │ ├── HGTravelingData.php │ ├── InventoryFolder.php │ ├── InventoryItem.php │ ├── Landmark.php │ ├── Maptile.php │ ├── Notecard.php │ ├── Presence.php │ ├── ProfileTypes.php │ ├── Quaternion.php │ ├── RegionInfo.php │ ├── SceneObjectGroup.php │ ├── ServerDataURI.php │ ├── SessionInfo.php │ ├── TextureEntry.php │ ├── UInt64.php │ ├── URI.php │ ├── UUI.php │ ├── UUID.php │ ├── UserAccount.php │ ├── Vector3.php │ ├── VisualParams.php │ └── Wearable.php └── xmltok.php ├── llsd_rpc ├── index.html ├── llsd_binary.php ├── llsd_rpc.php └── llsd_xml.php ├── llview └── inventoryicons │ ├── LICENSE-artwork.txt │ ├── inv_folder_animation.png │ ├── inv_folder_bodypart.png │ ├── inv_folder_callingcard.png │ ├── inv_folder_clothing.png │ ├── inv_folder_favorite.png │ ├── inv_folder_gesture.png │ ├── inv_folder_inbox.png │ ├── inv_folder_landmark.png │ ├── inv_folder_lostandfound.png │ ├── inv_folder_mesh.png │ ├── inv_folder_notecard.png │ ├── inv_folder_object.png │ ├── inv_folder_outbox.png │ ├── inv_folder_outfit.png │ ├── inv_folder_plain_closed.png │ ├── inv_folder_plain_open.png │ ├── inv_folder_script.png │ ├── inv_folder_snapshot.png │ ├── inv_folder_sound.png │ ├── inv_folder_texture.png │ ├── inv_folder_trash.png │ ├── inv_invalid.png │ ├── inv_item_alpha.png │ ├── inv_item_animation.png │ ├── inv_item_attach.png │ ├── inv_item_callingcard_offline.png │ ├── inv_item_callingcard_online.png │ ├── inv_item_clothing.png │ ├── inv_item_eyes.png │ ├── inv_item_gesture.png │ ├── inv_item_gesture_muted.png │ ├── inv_item_gloves.png │ ├── inv_item_hair.png │ ├── inv_item_jacket.png │ ├── inv_item_landmark.png │ ├── inv_item_landmark_visited.png │ ├── inv_item_mesh.png │ ├── inv_item_notecard.png │ ├── inv_item_object.png │ ├── inv_item_object_multi.png │ ├── inv_item_pants.png │ ├── inv_item_physics.png │ ├── inv_item_script.png │ ├── inv_item_script_dangerous.png │ ├── inv_item_shape.png │ ├── inv_item_shirt.png │ ├── inv_item_shoes.png │ ├── inv_item_skin.png │ ├── inv_item_skirt.png │ ├── inv_item_snapshot.png │ ├── inv_item_socks.png │ ├── inv_item_sound.png │ ├── inv_item_tattoo.png │ ├── inv_item_texture.png │ ├── inv_item_underpants.png │ ├── inv_item_undershirt.png │ ├── inv_item_unknown.png │ ├── inv_link_folder.png │ ├── inv_link_item.png │ ├── inv_link_overlay.png │ └── inv_reset.png ├── login └── login_to_simulator.php ├── map.php ├── offlineim ├── rpc_GET.php └── rpc_STORE.php ├── presence ├── rpc_getagent.php ├── rpc_getagents.php ├── rpc_login.php ├── rpc_logout.php ├── rpc_logoutregion.php └── rpc_report.php ├── register └── index.php ├── rest_accounts.php ├── rest_assets.php ├── rest_assets_exist.php ├── rest_auth.php ├── rest_authorization.php ├── rest_avatar.php ├── rest_foreignagent.php ├── rest_friends.php ├── rest_grid.php ├── rest_griduser.php ├── rest_groups.php ├── rest_helo.php ├── rest_hgfriends.php ├── rest_hggroups.php ├── rest_homeagent.php ├── rest_offlineim.php ├── rest_presence.php ├── rest_xinventory.php ├── search └── register.php ├── sim_grid_info.php ├── sim_grid_info ├── opensim-nini-coreprofile.php ├── opensim-nini-osprofile.php └── opensim-nini.php ├── tools ├── ConvertDotNetRobustToPhpGridServer.sql ├── RobustMigration-asset-table-optimization.sql ├── Sample-OpenSim-Config │ ├── OpenSim.ini │ └── config-include │ │ ├── CenomeCache.ini.example │ │ ├── FlotsamCache.ini.example │ │ ├── GridCommon.ini │ │ ├── phpGridServer.ini │ │ └── storage │ │ └── SQLiteStandalone.ini ├── authentication-for-concrete5.7 │ ├── create-usermap-table.sql │ └── phpgridserver │ │ ├── change_password.php │ │ ├── controller.php │ │ ├── db.xml │ │ ├── forgot_password.php │ │ ├── form.php │ │ ├── invalid_token.php │ │ ├── password_changed.php │ │ └── password_sent.php ├── dbmigration.php ├── filterobjectassets.php ├── frontpage-for-concrete5.7-integration │ ├── README.md │ └── frontpage.php ├── iis-config │ └── web.config ├── loadninifile.php ├── loadoariarassets.php ├── loadtexture.php └── opensim-collectord.php ├── user ├── fetchasset.php ├── index.php ├── inventoryicons.php ├── inventoryitem.php ├── inventorylist.php ├── inventorytree.php ├── inventoryview.php ├── jquery-stuff.php ├── pages │ ├── appearances.php │ ├── changepassword.php │ ├── default.php │ ├── friends.php │ ├── inventory.php │ ├── missinginventory.php │ ├── profile │ │ ├── 1stlife.php │ │ ├── 2ndlife.php │ │ ├── classifieds.php │ │ ├── interests.php │ │ ├── notes.php │ │ └── picks.php │ ├── purgeappearance.php │ ├── purgepresences.php │ └── regionslist.php ├── rootinventorylist.php ├── session.php └── user_login.php ├── xinventory ├── rpc_ADDFOLDER.php ├── rpc_ADDITEM.php ├── rpc_CREATEUSERINVENTORY.php ├── rpc_DELETEFOLDERS.php ├── rpc_DELETEITEMS.php ├── rpc_GETACTIVEGESTURES.php ├── rpc_GETFOLDER.php ├── rpc_GETFOLDERCONTENT.php ├── rpc_GETFOLDERFORTYPE.php ├── rpc_GETFOLDERITEMS.php ├── rpc_GETINVENTORYSKELETON.php ├── rpc_GETITEM.php ├── rpc_GETITEMASSETS.php ├── rpc_GETMULTIPLEFOLDERSCONTENT.php ├── rpc_GETMULTIPLEITEMS.php ├── rpc_GETROOTFOLDER.php ├── rpc_GETUSERINVENTORY.php ├── rpc_MOVEFOLDER.php ├── rpc_MOVEITEMS.php ├── rpc_PURGEFOLDER.php ├── rpc_UPDATEFOLDER.php └── rpc_UPDATEITEM.php └── xmlrpc ├── xmlrpc.php ├── xmlrpc_avatar_interests_update.php ├── xmlrpc_avatar_notes_update.php ├── xmlrpc_avatar_properties_request.php ├── xmlrpc_avatar_properties_update.php ├── xmlrpc_avatarclassifiedsrequest.php ├── xmlrpc_avatarnotesrequest.php ├── xmlrpc_avatarpicksrequest.php ├── xmlrpc_classified_delete.php ├── xmlrpc_classified_update.php ├── xmlrpc_classifieds_info_query.php ├── xmlrpc_dir_classified_query.php ├── xmlrpc_dir_events_query.php ├── xmlrpc_dir_land_query.php ├── xmlrpc_dir_places_query.php ├── xmlrpc_dir_popular_query.php ├── xmlrpc_event_info_query.php ├── xmlrpc_get_home_region.php ├── xmlrpc_get_region.php ├── xmlrpc_get_server_urls.php ├── xmlrpc_get_user_info.php ├── xmlrpc_get_uui.php ├── xmlrpc_get_uuid.php ├── xmlrpc_grid_instant_message.php ├── xmlrpc_link_region.php ├── xmlrpc_locate_user.php ├── xmlrpc_login_to_simulator.php ├── xmlrpc_logout_agent.php ├── xmlrpc_pickinforequest.php ├── xmlrpc_picks_delete.php ├── xmlrpc_picks_update.php ├── xmlrpc_preflightBuyLandPrep.php ├── xmlrpc_user_preferences_request.php ├── xmlrpc_user_preferences_update.php ├── xmlrpc_verify_agent.php └── xmlrpc_verify_client.php /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | *~ 3 | *.bak 4 | *.o 5 | *.a 6 | config.php 7 | RemoteSystemsTempFiles 8 | .metadata 9 | simulator/bin 10 | 11 | /lib/js/leaflet-plugins/fullscreen/*.db 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | phpGridServer 2 | GNU LGPL Version 2.1 3 | 4 | Second Life Viewer Artwork 5 | http://creativecommons.org/licenses/by-sa/3.0 6 | 7 | jquery 8 | MIT License 9 | 10 | jquery-ui 11 | MIT License 12 | 13 | dynatree 14 | MIT/GPL 15 | 16 | leaflet 17 | 2-clause BSD License 18 | 19 | leaflet-mouseposition 20 | MIT 21 | 22 | leaflet-label 23 | see LICENSE-leaflet-label.txt 24 | 25 | leaflet-geocoder 26 | 2-clause BSD License 27 | 28 | leaflet-zoomslider 29 | 2-clause BSD License 30 | 31 | leaflet-minimap 32 | 2-clause BSD License 33 | 34 | leaflet-contextmenu 35 | MIT license 36 | 37 | leaflet-fullscreen 38 | 2-clause BSD license 39 | 40 | -------------------------------------------------------------------------------- /LICENSE-leaflet-label.txt: -------------------------------------------------------------------------------- 1 | Copyright 2012 Jacob Toye 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /LICENSE-leaflet-mouseposition.txt: -------------------------------------------------------------------------------- 1 | Copyright 2012 Ardhi Lukianto 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /LICENSE-llview-artwork.txt: -------------------------------------------------------------------------------- 1 | COPYRIGHT AND PERMISSION NOTICE 2 | 3 | Second Life(TM) Viewer Artwork. Copyright (C) 2008 Linden Research, Inc. 4 | 5 | Linden Research, Inc. ("Linden Lab") licenses the Second Life viewer 6 | artwork and other works in the files distributed with this Notice under 7 | the Creative Commons Attribution-Share Alike 3.0 License, available at 8 | http://creativecommons.org/licenses/by-sa/3.0/legalcode. For the license 9 | summary, see http://creativecommons.org/licenses/by-sa/3.0/. 10 | 11 | Notwithstanding the foregoing, all of Linden Lab's trademarks, including 12 | but not limited to the Second Life brand name and Second Life Eye-in-Hand 13 | logo, are subject to our trademark policy at 14 | http://secondlife.com/corporate/trademark/. 15 | 16 | If you distribute any copies or adaptations of the Second Life viewer 17 | artwork or any other works in these files, you must include this Notice 18 | and clearly identify any changes made to the original works. Include 19 | this Notice and information where copyright notices are usually included, 20 | for example, after your own copyright notice acknowledging your use of 21 | the Second Life viewer artwork, in a text file distributed with your 22 | program, in your application's About window, or on a credits page for 23 | your work. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | phpGridServer 2 | ============= 3 | 4 | Grid Server for Virtual Worlds 5 | 6 | Second Life Viewer artwork 7 | ========================== 8 | see LICENSE-llview-artwork.txt 9 | 10 | -------------------------------------------------------------------------------- /accounts/rpc_createuser.php: -------------------------------------------------------------------------------- 1 |

All Users


2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | getAllAccounts(null); 13 | while($userAccount = $userAccounts->getUserAccount()) 14 | { 15 | ?> 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 32 |
PrincipalIDScope IDFirst NameLast NameUser LevelActions
PrincipalID ?>ScopeID ?>FirstName) ?>LastName) ?>UserLevel ?> 22 |
23 | 24 | 25 |
26 |
27 |
-------------------------------------------------------------------------------- /auth/rpc_getauthinfo.php: -------------------------------------------------------------------------------- 1 | PRINCIPALID)) 11 | { 12 | http_response_code("400"); 13 | header("Content-Type: text/plain"); 14 | echo "Missing PRINCIPALID"; 15 | exit; 16 | } 17 | 18 | if(!isset($_RPC_REQUEST->TOKEN)) 19 | { 20 | http_response_code("400"); 21 | header("Content-Type: text/plain"); 22 | echo "Missing TOKEN"; 23 | exit; 24 | } 25 | 26 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPALID)) 27 | { 28 | http_response_code("400"); 29 | header("Content-Type: text/plain"); 30 | echo "Invalid PRINCIPALID"; 31 | exit; 32 | } 33 | 34 | require_once("lib/services.php"); 35 | $authInfoService = getService("RPC_AuthInfo"); 36 | 37 | try 38 | { 39 | $authInfoService>releaseToken($_RPC_REQUEST->PRINCIPALID, $_RPC_REQUEST->TOKEN, $lifetime); 40 | sendBooleanResponse(True); 41 | } 42 | catch(Exception $e) 43 | { 44 | sendBooleanResponse(False); 45 | } 46 | -------------------------------------------------------------------------------- /auth/rpc_setauthinfo.php: -------------------------------------------------------------------------------- 1 | PRINCIPAL)) 11 | { 12 | http_response_code("400"); 13 | header("Content-Type: text/plain"); 14 | echo "Missing PRINCIPAL"; 15 | exit; 16 | } 17 | 18 | if(!isset($_RPC_REQUEST->TOKEN)) 19 | { 20 | http_response_code("400"); 21 | header("Content-Type: text/plain"); 22 | echo "Missing TOKEN"; 23 | exit; 24 | } 25 | 26 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPAL)) 27 | { 28 | http_response_code("400"); 29 | header("Content-Type: text/plain"); 30 | echo "Invalid PRINCIPAL"; 31 | exit; 32 | } 33 | 34 | if(!isset($_RPC_REQUEST->LIFETIME)) 35 | { 36 | http_response_code("400"); 37 | header("Content-Type: text/plain"); 38 | echo "Missing LIFETIME"; 39 | exit; 40 | } 41 | 42 | $lifetime=intval($_RPC_REQUEST->LIFETIME); 43 | if($lifetime > 30) 44 | { 45 | $lifetime = 30; 46 | } 47 | 48 | require_once("lib/services.php"); 49 | $authInfoService = getService("RPC_AuthInfo"); 50 | 51 | try 52 | { 53 | $authInfoService>verifyToken($_RPC_REQUEST->PRINCIPAL, $_RPC_REQUEST->TOKEN, $lifetime); 54 | sendBooleanResponse(True); 55 | } 56 | catch(Exception $e) 57 | { 58 | sendBooleanResponse(False); 59 | } 60 | -------------------------------------------------------------------------------- /avatar/rpc_removeitems.php: -------------------------------------------------------------------------------- 1 | UserID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!isset($_RPC_REQUEST->Names)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | if(!is_array($_RPC_REQUEST->Names)) 23 | { 24 | http_response_code("400"); 25 | exit; 26 | } 27 | 28 | if(!UUID::IsUUID($_RPC_REQUEST->UserID)) 29 | { 30 | http_response_code("400"); 31 | exit; 32 | } 33 | 34 | require_once("lib/services.php"); 35 | 36 | $avatarService = getService("RPC_Avatar"); 37 | 38 | try 39 | { 40 | $avatarService->removeItems($_RPC_REQUEST->UserID, $_RPC_REQUEST->Names); 41 | sendBooleanResponse(True); 42 | } 43 | catch(Exception $e) 44 | { 45 | sendBooleanResponse(False); 46 | } 47 | -------------------------------------------------------------------------------- /avatar/rpc_resetavatar.php: -------------------------------------------------------------------------------- 1 | UserID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUOD::IsUUID($_RPC_REQUEST->UserID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | require_once("lib/services.php"); 23 | 24 | $avatarService = getService("RPC_Avatar"); 25 | 26 | try 27 | { 28 | $avatarService->resetAvatar($_RPC_REQUEST->UserID); 29 | sendBooleanResponse(True); 30 | } 31 | catch(Exception $e) 32 | { 33 | sendBooleanResponse(False); 34 | } 35 | -------------------------------------------------------------------------------- /avatar/rpc_setavatar.php: -------------------------------------------------------------------------------- 1 | UserID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->UserID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | $avatar_info = array(); 23 | foreach($_POST as $var=>$val) 24 | { 25 | if($var == "UserID") 26 | { 27 | } 28 | else if($var == "VERSIONMAX") 29 | { 30 | } 31 | else if($var == "VERSIONMIN") 32 | { 33 | } 34 | else if($var == "METHOD") 35 | { 36 | } 37 | else 38 | { 39 | $avatar_info[str_replace("_", " ", $var)] = $val; 40 | } 41 | } 42 | 43 | if(isset($avatar_info["Serial"]) && $avatar_info["Serial"] == "0") 44 | { 45 | $avatar_info["Serial"] = "1"; 46 | } 47 | 48 | require_once("lib/services.php"); 49 | $avatarService = getService("RPC_Avatar"); 50 | try 51 | { 52 | $avatarService->setAvatar($_RPC_REQUEST->UserID, $avatar_info); 53 | sendBooleanResponse(True); 54 | } 55 | catch(Exception $e) 56 | { 57 | sendBooleanResponse(False); 58 | } 59 | -------------------------------------------------------------------------------- /config.hg.php: -------------------------------------------------------------------------------- 1 | "permissions/InventoryService/HG1_0", 6 | "service"=>"Inventory" 7 | ); 8 | 9 | $cfg_UnguardedHGAssetService = array( 10 | "use"=>"permissions/AssetService/HG", 11 | "service"=>"Asset" 12 | ); 13 | 14 | /* following lines are session guards */ 15 | $cfg_HGInventoryService = array( 16 | "use"=>"services/hypergrid/InventoryGuardService", 17 | "service"=>"UnguardedHGInventory" 18 | ); 19 | 20 | $cfg_HGAssetService = array( 21 | "use"=>"services/hypergrid/AssetGuardService", 22 | "service"=>"UnguardedHGAsset" 23 | ); 24 | 25 | 26 | $cfg_HGGroupsService = array( 27 | "use"=>"linkto:Groups" 28 | ); 29 | 30 | $cfg_HGFriendsService = array( 31 | "use"=>"services/hypergrid/HGFriendsService" 32 | ); 33 | -------------------------------------------------------------------------------- /config.migrations.php: -------------------------------------------------------------------------------- 1 | "services/authentication/PasswordAuthenticationService" 16 | ); 17 | 18 | $cfg_AdminAuthenticationService = array( 19 | "use" => "services/authentication/PasswordAuthenticationService" 20 | ); 21 | 22 | $cfg_UserAuthenticationService = array( 23 | "use" => "services/authentication/PasswordAuthenticationService" 24 | ); 25 | 26 | $cfg_DestinationLookupService = array( 27 | "use" => "services/destinationlookup/HG" 28 | ); 29 | 30 | $cfg_LaunchAgentService = array( 31 | "use" => "connectors/launchagent/json" 32 | ); 33 | 34 | $cfg_HTTPConnectorService = array( 35 | "use" => "connectors/http/Curl" 36 | ); 37 | 38 | $cfg_FriendsSimConnectorService = array( 39 | "use" => "connectors/sim/Friends/LocalOnly" 40 | ); 41 | 42 | $cfg_IMService = array( 43 | "use" => "services/im/Grid" 44 | ); 45 | 46 | require_once("config.hg.php"); 47 | require_once("config.acl.php"); 48 | 49 | -------------------------------------------------------------------------------- /css/main.css: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * phpGridServer 3 | * 4 | * GNU LESSER GENERAL PUBLIC LICENSE 5 | * Version 2.1, February 1999 6 | * 7 | */ 8 | 9 | .error 10 | { 11 | color: red; 12 | } 13 | 14 | .success 15 | { 16 | color: green; 17 | } 18 | -------------------------------------------------------------------------------- /friends/rpc_deletefriend.php: -------------------------------------------------------------------------------- 1 | PRINCIPALID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPALID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | include_once("rpc_deletefriend_string.php"); 23 | -------------------------------------------------------------------------------- /friends/rpc_deletefriend_string.php: -------------------------------------------------------------------------------- 1 | PRINCIPALID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!isset($_RPC_REQUEST->FRIEND)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | try 23 | { 24 | $FriendsService->deleteFriend($_RPC_REQUEST->PRINCIPALID, $_RPC_REQUEST->FRIEND); 25 | sendBooleanResponse(True); 26 | } 27 | catch(Exception $e) 28 | { 29 | sendBooleanResponse(False); 30 | } 31 | -------------------------------------------------------------------------------- /friends/rpc_getfriends.php: -------------------------------------------------------------------------------- 1 | PRINCIPALID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPALID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | require_once("rpc_getfriends_string.php"); 23 | -------------------------------------------------------------------------------- /friends/rpc_getfriends_string.php: -------------------------------------------------------------------------------- 1 | PRINCIPALID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPALID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | /* enable output compression */ 23 | if(!isset($_GET["rpc_debug"]) && $enablegzipcompression) 24 | { 25 | ini_set("zlib.output_compression", 4096); 26 | } 27 | 28 | header("Content-Type: text/xml"); 29 | echo ""; 30 | $count = 0; 31 | 32 | try 33 | { 34 | $friends = $FriendsService->getFriends($_RPC_REQUEST->PRINCIPALID); 35 | 36 | while($row = $friends->getFriend()) 37 | { 38 | if(0 == $count) 39 | { 40 | echo ""; 41 | } 42 | echo $row->toXML("friend$count", " type=\"List\""); 43 | ++$count; 44 | } 45 | } 46 | catch(Exception $e) 47 | { 48 | } 49 | if($count == 0) 50 | { 51 | echo ""; 52 | } 53 | else 54 | { 55 | echo ""; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /friends/rpc_storefriend.php: -------------------------------------------------------------------------------- 1 | PrincipalID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!isset($_RPC_REQUEST->Friend)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | if(!isset($_RPC_REQUEST->MyFlags)) 23 | { 24 | http_response_code("400"); 25 | exit; 26 | } 27 | 28 | try 29 | { 30 | $friend = new Friend(); 31 | $friend->UserID = $_RPC_REQUEST->PrincipalID; 32 | $friend->FriendID = $_RPC_REQUEST->Friend; 33 | $friend->Flags = $_RPC_REQUEST->MyFlags; 34 | 35 | $FriendsService->storeFriend($friend); 36 | 37 | sendBooleanResponse(True); 38 | } 39 | catch(Exception $e) 40 | { 41 | sendBooleanResponse(False); 42 | } 43 | -------------------------------------------------------------------------------- /frontpage.sample.php: -------------------------------------------------------------------------------- 1 | getParam("gridname", "phpGridServer"); 14 | $numregions = $gridService->getNumberOfRegionsFlags(null, RegionFlags::RegionOnline); 15 | ?> 16 | 17 | 18 | <?php echo $gridname ?> 19 | 20 | 25 | 26 | 27 |


28 |
Regions online:

29 |
30 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /get_grid_info.php: -------------------------------------------------------------------------------- 1 | getGridInfoParams(); 16 | 17 | header("Content-Type: text/xml"); 18 | echo ""; 19 | echo ""; 20 | echo "OpenSim"; 21 | $have_loginuri = False; 22 | foreach($params as $name => $value) 23 | { 24 | if($name == "login") 25 | { 26 | $have_loginuri = True; 27 | } 28 | echo "<$name>".htmlentities($value).""; 29 | } 30 | if(!$have_loginuri) 31 | { 32 | echo "http://${_SERVER['SERVER_NAME']}:${_SERVER['SERVER_PORT']}/"; 33 | } 34 | echo ""; 35 | -------------------------------------------------------------------------------- /grid/rpc_deregister.php: -------------------------------------------------------------------------------- 1 | REGIONID)) 11 | { 12 | http_response_code("400"); 13 | header("Content-Type: text/plain"); 14 | echo "Missing REGIONID"; 15 | exit; 16 | } 17 | 18 | $scopeid = "00000000-0000-0000-0000-000000000000"; 19 | if(isset($_RPC_REQUEST->SCOPEID)) 20 | { 21 | $scopeid=$_RPC_REQUEST->SCOPEID; 22 | if(!UUID::IsUUID($scopeid)) 23 | { 24 | http_response_code("400"); 25 | header("Content-Type: text/plain"); 26 | echo "Invalid ScopeID"; 27 | exit; 28 | } 29 | } 30 | 31 | if(!UUID::IsUUID($_RPC_REQUEST->REGIONID)) 32 | { 33 | http_response_code("400"); 34 | header("Content-Type: text/plain"); 35 | echo "Invalid REGIONID"; 36 | exit; 37 | } 38 | 39 | $uuid=$_RPC_REQUEST->REGIONID; 40 | 41 | require_once("lib/services.php"); 42 | 43 | $gridService = getService("RPC_Grid"); 44 | 45 | try 46 | { 47 | $gridService->unregisterRegion($scopeid, $uuid); 48 | sendBooleanResponse(True); 49 | } 50 | catch(Exception $e) 51 | { 52 | sendBooleanResponse(False); 53 | } 54 | -------------------------------------------------------------------------------- /grid/rpc_get_default_hypergrid_regions.php: -------------------------------------------------------------------------------- 1 | SCOPEID)) 12 | { 13 | $scopeid=$_RPC_REQUEST->SCOPEID; 14 | if(!UUID::IsUUID($scopeid)) 15 | { 16 | http_response_code("400"); 17 | exit; 18 | } 19 | } 20 | 21 | require_once("lib/services.php"); 22 | 23 | $gridService = getService("RPC_Grid"); 24 | 25 | try 26 | { 27 | $regions = $gridService->getDefaultHypergridRegions($scopeid); 28 | } 29 | catch(Exception $e) 30 | { 31 | http_response_code("500"); 32 | exit; 33 | } 34 | 35 | /* enable output compression */ 36 | if(!isset($_GET["rpc_debug"]) && $enablegzipcompression) 37 | { 38 | ini_set("zlib.output_compression", 4096); 39 | } 40 | 41 | header("Content-Type: text/xml"); 42 | echo ""; 43 | 44 | $cnt = 0; 45 | while($region = $regions->getRegion()) 46 | { 47 | if($cnt == 0) 48 | { 49 | echo ""; 50 | } 51 | echo $region->toXML("region$cnt"); 52 | ++$cnt; 53 | } 54 | 55 | if($cnt == 0) 56 | { 57 | echo "null"; 58 | } 59 | else 60 | { 61 | echo ""; 62 | } 63 | -------------------------------------------------------------------------------- /grid/rpc_get_default_regions.php: -------------------------------------------------------------------------------- 1 | SCOPEID)) 12 | { 13 | $scopeid=$_RPC_REQUEST->SCOPEID; 14 | if(!UUID::IsUUID($scopeid)) 15 | { 16 | http_response_code("400"); 17 | exit; 18 | } 19 | } 20 | 21 | require_once("lib/services.php"); 22 | 23 | $gridService = getService("RPC_Grid"); 24 | 25 | try 26 | { 27 | $regions = $gridService->getDefaultRegions($scopeid); 28 | } 29 | catch(Exception $e) 30 | { 31 | http_response_code("500"); 32 | header("Content-Type: text/plain"); 33 | echo $e->getMessage(); 34 | exit; 35 | } 36 | 37 | /* enable output compression */ 38 | if(!isset($_GET["rpc_debug"]) && $enablegzipcompression) 39 | { 40 | ini_set("zlib.output_compression", 4096); 41 | } 42 | 43 | header("Content-Type: text/xml"); 44 | echo ""; 45 | 46 | $cnt = 0; 47 | while($region = $regions->getRegion()) 48 | { 49 | if($cnt == 0) 50 | { 51 | echo ""; 52 | } 53 | echo $region->toXML("region$cnt"); 54 | ++$cnt; 55 | } 56 | 57 | if($cnt == 0) 58 | { 59 | echo "null"; 60 | } 61 | else 62 | { 63 | echo ""; 64 | } 65 | -------------------------------------------------------------------------------- /grid/rpc_get_fallback_regions.php: -------------------------------------------------------------------------------- 1 | SCOPEID)) 12 | { 13 | $scopeid=$_RPC_REQUEST->SCOPEID; 14 | if(!UUID::IsUUID($scopeid)) 15 | { 16 | http_response_code("400"); 17 | exit; 18 | } 19 | } 20 | 21 | require_once("lib/services.php"); 22 | 23 | $gridService = getService("RPC_Grid"); 24 | 25 | try 26 | { 27 | $regions = $gridService->getFallbackRegions($scopeid); 28 | } 29 | catch(Exception $e) 30 | { 31 | http_response_code("500"); 32 | exit; 33 | } 34 | 35 | /* enable output compression */ 36 | if(!isset($_GET["rpc_debug"]) && $enablegzipcompression) 37 | { 38 | ini_set("zlib.output_compression", 4096); 39 | } 40 | 41 | header("Content-Type: text/xml"); 42 | echo ""; 43 | 44 | $cnt = 0; 45 | while($region = $regions->getRegion()) 46 | { 47 | if($cnt == 0) 48 | { 49 | echo ""; 50 | } 51 | echo $region->toXML("region$cnt"); 52 | ++$cnt; 53 | } 54 | 55 | if($cnt == 0) 56 | { 57 | echo "null"; 58 | } 59 | else 60 | { 61 | echo ""; 62 | } 63 | -------------------------------------------------------------------------------- /grid/rpc_get_hyperlinks.php: -------------------------------------------------------------------------------- 1 | SCOPEID)) 12 | { 13 | $scopeid=$_RPC_REQUEST->SCOPEID; 14 | if(!UUID::IsUUID($scopeid)) 15 | { 16 | http_response_code("400"); 17 | exit; 18 | } 19 | } 20 | 21 | require_once("lib/services.php"); 22 | 23 | $gridService = getService("RPC_Grid"); 24 | 25 | try 26 | { 27 | $regions = $gridService->getHyperlinks($scopeid); 28 | } 29 | catch(Exception $e) 30 | { 31 | http_response_code("500"); 32 | exit; 33 | } 34 | 35 | /* enable output compression */ 36 | if(!isset($_GET["rpc_debug"]) && $enablegzipcompression) 37 | { 38 | ini_set("zlib.output_compression", 4096); 39 | } 40 | 41 | header("Content-Type: text/xml"); 42 | echo ""; 43 | 44 | $cnt = 0; 45 | while($region = $regions->getRegion()) 46 | { 47 | if($cnt == 0) 48 | { 49 | echo ""; 50 | } 51 | echo $region->toXML("region$cnt"); 52 | ++$cnt; 53 | } 54 | 55 | if($cnt == 0) 56 | { 57 | echo "null"; 58 | } 59 | else 60 | { 61 | echo ""; 62 | } 63 | -------------------------------------------------------------------------------- /grid/rpc_get_region_by_name.php: -------------------------------------------------------------------------------- 1 | NAME)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | $scopeid = "00000000-0000-0000-0000-000000000000"; 17 | if(isset($_RPC_REQUEST->SCOPEID)) 18 | { 19 | $scopeid=$_RPC_REQUEST->SCOPEID; 20 | if(!UUID::IsUUID($scopeid)) 21 | { 22 | http_response_code("400"); 23 | exit; 24 | } 25 | } 26 | 27 | require_once("lib/services.php"); 28 | 29 | $gridService = getService("RPC_Grid"); 30 | 31 | header("Content-Type: text/xml"); 32 | echo ""; 33 | 34 | try 35 | { 36 | $region = $gridService->getRegionByName($scopeid, $_RPC_REQUEST->NAME); 37 | echo ""; 38 | echo $region->toXML("result", " type=\"List\""); 39 | echo ""; 40 | } 41 | catch(Exception $e) 42 | { 43 | echo "null"; 44 | } 45 | -------------------------------------------------------------------------------- /grid/rpc_get_region_by_position.php: -------------------------------------------------------------------------------- 1 | X) or !isset($_RPC_REQUEST->Y)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | $scopeid = "00000000-0000-0000-0000-000000000000"; 17 | if(isset($_RPC_REQUEST->SCOPEID)) 18 | { 19 | $scopeid=$_RPC_REQUEST->SCOPEID; 20 | if(!UUID::IsUUID($scopeid)) 21 | { 22 | http_response_code("400"); 23 | exit; 24 | } 25 | } 26 | 27 | $x = intval($_POST["X"]); 28 | $y = intval($_POST["Y"]); 29 | 30 | require_once("lib/services.php"); 31 | 32 | $gridService = getService("RPC_Grid"); 33 | 34 | header("Content-Type: text/xml"); 35 | echo ""; 36 | 37 | try 38 | { 39 | $region = $gridService->getRegionByPosition($scopeid, $x, $y); 40 | echo ""; 41 | echo $region->toXML("result"); 42 | echo ""; 43 | } 44 | catch(Exception $e) 45 | { 46 | echo "null"; 47 | } 48 | -------------------------------------------------------------------------------- /grid/rpc_get_region_by_uuid.php: -------------------------------------------------------------------------------- 1 | REGIONID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | $scopeid = "00000000-0000-0000-0000-000000000000"; 17 | if(isset($_RPC_REQUEST->SCOPEID)) 18 | { 19 | $scopeid=$_RPC_REQUEST->SCOPEID; 20 | if(!UUID::IsUUID($scopeid)) 21 | { 22 | http_response_code("400"); 23 | exit; 24 | } 25 | } 26 | 27 | if(!UUID::IsUUID($_RPC_REQUEST->REGIONID)) 28 | { 29 | http_response_code("400"); 30 | exit; 31 | } 32 | 33 | require_once("lib/services.php"); 34 | 35 | $gridService = getService("RPC_Grid"); 36 | 37 | header("Content-Type: text/xml"); 38 | echo ""; 39 | 40 | try 41 | { 42 | $region = $gridService->getRegionByUuid($scopeid, $_RPC_REQUEST->REGIONID); 43 | echo ""; 44 | echo $region->toXML("result", " type=\"List\""); 45 | echo ""; 46 | } 47 | catch(Exception $e) 48 | { 49 | echo "null"; 50 | } 51 | -------------------------------------------------------------------------------- /grid/rpc_get_region_flags.php: -------------------------------------------------------------------------------- 1 | REGIONID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | $scopeid = "00000000-0000-0000-0000-000000000000"; 17 | if(isset($_RPC_REQUEST->SCOPEID)) 18 | { 19 | $scopeid=$_RPC_REQUEST->SCOPEID; 20 | if(!UUID::IsUUID($scopeid)) 21 | { 22 | http_response_code("400"); 23 | exit; 24 | } 25 | } 26 | 27 | if(!UUID::IsUUID($_RPC_REQUEST->REGIONID)) 28 | { 29 | http_response_code("400"); 30 | exit; 31 | } 32 | 33 | require_once("lib/services.php"); 34 | $gridService = getService("RPC_Grid"); 35 | 36 | header("Content-Type: text/xml"); 37 | echo ""; 38 | 39 | try 40 | { 41 | $region = $gridService->getRegionByUuid($scopeid, $_RPC_REQUEST->REGIONID); 42 | echo ""; 43 | echo "".$region->Flags.""; 44 | echo ""; 45 | } 46 | catch(Exception $e) 47 | { 48 | echo ""; 49 | } 50 | -------------------------------------------------------------------------------- /grid/rpc_get_regions_by_name.php: -------------------------------------------------------------------------------- 1 | NAME)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | $scopeid = "00000000-0000-0000-0000-000000000000"; 17 | if(isset($_RPC_REQUEST->SCOPEID)) 18 | { 19 | $scopeid=$_RPC_REQUEST->SCOPEID; 20 | if(!UUID::IsUUID($scopeid)) 21 | { 22 | http_response_code("400"); 23 | exit; 24 | } 25 | } 26 | 27 | require_once("lib/services.php"); 28 | 29 | $gridService = getService("RPC_Grid"); 30 | 31 | try 32 | { 33 | $regions = $gridService->getRegionsByName($scopeid, $_RPC_REQUEST->NAME); 34 | } 35 | catch(Exception $e) 36 | { 37 | http_response_code("500"); 38 | exit; 39 | } 40 | 41 | /* enable output compression */ 42 | if(!isset($_GET["rpc_debug"]) && $enablegzipcompression) 43 | { 44 | ini_set("zlib.output_compression", 4096); 45 | } 46 | 47 | header("Content-Type: text/xml"); 48 | echo ""; 49 | 50 | $cnt = 0; 51 | while($region = $regions->getRegion()) 52 | { 53 | if($cnt == 0) 54 | { 55 | echo ""; 56 | } 57 | echo $region->toXML("region$cnt"); 58 | ++$cnt; 59 | } 60 | 61 | if($cnt == 0) 62 | { 63 | echo ""; 64 | } 65 | else 66 | { 67 | echo ""; 68 | } 69 | -------------------------------------------------------------------------------- /griduser/rpc_getgriduserinfo.php: -------------------------------------------------------------------------------- 1 | UserID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | require_once("lib/services.php"); 17 | $gridUserService = getService("RPC_GridUser"); 18 | 19 | header("Content-Type: text/xml"); 20 | echo ""; 21 | try 22 | { 23 | $gridUser = $gridUserService->getGridUserHG($_RPC_REQUEST->UserID); 24 | $out=""; 25 | $out.=$gridUser->toXML("result", " type=\"List\""); 26 | echo $out.""; 27 | } 28 | catch(Exception $e) 29 | { 30 | echo ""; 31 | } 32 | -------------------------------------------------------------------------------- /griduser/rpc_getgriduserinfos.php: -------------------------------------------------------------------------------- 1 | AgentIDs)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!is_array($_RPC_REQUEST->AgentIDs)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | require_once("lib/services.php"); 23 | $gridUserService = getService("RPC_GridUser"); 24 | 25 | $cnt = 0; 26 | 27 | header("Content-Type: text/xml"); 28 | echo ""; 29 | 30 | foreach($_RPC_REQUEST->AgentIDs as $agentid) 31 | { 32 | try 33 | { 34 | $gridUser = $gridUserService->getGridUserHG($agentid); 35 | $out = $gridUser->toXML("griduser$cnt"); 36 | if($cnt == 0) 37 | { 38 | echo ""; 39 | } 40 | echo $out; 41 | ++$cnt; 42 | } 43 | catch(Exception $e) 44 | { 45 | } 46 | } 47 | 48 | if($cnt != 0) 49 | { 50 | echo ""; 51 | } 52 | else 53 | { 54 | echo ""; 55 | } 56 | -------------------------------------------------------------------------------- /griduser/rpc_loggedin.php: -------------------------------------------------------------------------------- 1 | UserID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | require_once("lib/services.php"); 17 | $gridUserService = getService("RPC_GridUser"); 18 | $userAccountService = getService("RPC_UserAccount"); 19 | 20 | if(UUID::IsUUID($_RPC_REQUEST->UserID)) 21 | { 22 | try 23 | { 24 | $userAccountService->getAccountByID(null, $_RPC_REQUEST->UserID); 25 | } 26 | catch(Exception $e) 27 | { 28 | /* No account, no GridUser entry */ 29 | sendBooleanResponse(False); 30 | exit; 31 | } 32 | } 33 | else 34 | { 35 | try 36 | { 37 | $userAccountService->getAccountByID(null, substr($_RPC_REQUEST->UserID, 0, 36)); 38 | $_RPC_REQUEST->UserID = substr($_RPC_REQUEST->UserID, 0, 36); 39 | } 40 | catch(Exception $e) 41 | { 42 | /* No account, keep it HG */ 43 | } 44 | } 45 | 46 | try 47 | { 48 | $gridUserService->loggedIn($_RPC_REQUEST->UserID); 49 | sendBooleanResponse(True); 50 | } 51 | catch(Exception $e) 52 | { 53 | sendBooleanResponse(False); 54 | } 55 | -------------------------------------------------------------------------------- /groups/rpc_ADDAGENTTOGROUP.php: -------------------------------------------------------------------------------- 1 | getGroup($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->GroupID); 22 | $accessToken = ""; 23 | if(isset($_RPC_REQUEST->AccessToken)) 24 | { 25 | $accessToken = $_RPC_REQUEST->AccessToken; 26 | } 27 | else 28 | { 29 | $accessToken = UUID::Random(); 30 | } 31 | $grouprole = $groupsService->getGroupRole($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->GroupID, $_RPC_REQUEST->RoleID); 32 | $groupmember = addAgentToGroup($groupsService, $_RPC_REQUEST->RequestingAgentID, $group, $_RPC_REQUEST->RoleID, $_RPC_REQUEST->AgentID, $accessToken); 33 | header("Content-Type: text/xml"); 34 | echo ""; 35 | echo ""; 36 | echo groupMembershipToXML($group, $grouprole, $groupmember, "RESULT"); 37 | echo ""; 38 | } 39 | catch(Exception $e) 40 | { 41 | sendNullResult($e->getMessage()); 42 | } 43 | -------------------------------------------------------------------------------- /groups/rpc_AGENTROLE.ADD.php: -------------------------------------------------------------------------------- 1 | getGroupMember($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->GroupID, $_RPC_REQUEST->AgentID); 14 | 15 | /* build new entry */ 16 | $rolemem = new GroupRolemember(); 17 | $rolemem->GroupID = $_RPC_REQUEST->GroupID; 18 | $rolemem->RoleID = $_RPC_REQUEST->RoleID; 19 | $rolemem->PrincipalID = $_RPC_REQUEST->AgentID; 20 | 21 | $groupsService->addGroupRolemember($_RPC_REQUEST->RequestingAgentID, $rolemem); 22 | sendBooleanResponse(true); 23 | } 24 | catch(Exception $e) 25 | { 26 | sendBooleanResponse(false); 27 | } 28 | -------------------------------------------------------------------------------- /groups/rpc_AGENTROLE.DELETE.php: -------------------------------------------------------------------------------- 1 | RoleID == "".UUID::ZERO()) 11 | { 12 | http_response_code("400"); 13 | header("Content-Type: text/plain"); 14 | echo "Removing from Everyone role not allowed"; 15 | exit; 16 | } 17 | 18 | try 19 | { 20 | $groupsService->deleteGroupRolemember($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->GroupID, $_RPC_REQUEST->RoleID, $_RPC_REQUEST->AgentID); 21 | sendBooleanResponse(true); 22 | } 23 | catch(Exception $e) 24 | { 25 | sendBooleanResponse(false); 26 | } 27 | -------------------------------------------------------------------------------- /groups/rpc_GETGROUP.php: -------------------------------------------------------------------------------- 1 | GroupID) && !isset($_RPC_REQUEST->Name)) 20 | { 21 | http_response_code("400"); 22 | exit; 23 | } 24 | 25 | try 26 | { 27 | if(isset($_RPC_REQUEST->GroupID)) 28 | { 29 | if(!UUID::IsUUID($_RPC_REQUEST->GroupID)) 30 | { 31 | http_response_code("400"); 32 | exit; 33 | } 34 | 35 | $grec = $groupsService->getGroup($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->GroupID); 36 | } 37 | else 38 | { 39 | $grec = $groupsService->getGroupByName($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->Name); 40 | } 41 | header("Content-Type: text/xml"); 42 | echo ""; 43 | echo ""; 44 | echo $grec->toXML("RESULT"); 45 | echo ""; 46 | } 47 | catch(Exception $e) 48 | { 49 | sendNullResult($e->getMessage()); 50 | } 51 | -------------------------------------------------------------------------------- /groups/rpc_INVITE.DELETE.php: -------------------------------------------------------------------------------- 1 | deleteGroupInvite($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->InviteID); 13 | sendBooleanResponse(true); 14 | } 15 | catch(Exception $e) 16 | { 17 | sendBooleanResponse(false); 18 | } 19 | -------------------------------------------------------------------------------- /groups/rpc_INVITE.GET.php: -------------------------------------------------------------------------------- 1 | getGroupInvite($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->InviteID); 19 | if($invite->PrincipalID != $_RPC_REQUEST->RequestingAgentID) 20 | { 21 | throw new Exception(); 22 | } 23 | 24 | header("Content-Type: text/xml"); 25 | echo ""; 26 | echo ""; 27 | echo $invite->toXML("RESULT"); 28 | echo ""; 29 | } 30 | catch(Exception $e) 31 | { 32 | sendNullResult($e->getMessage()); 33 | } 34 | -------------------------------------------------------------------------------- /groups/rpc_PUTGROUP.php: -------------------------------------------------------------------------------- 1 | OP)) 22 | { 23 | http_response_code("400"); 24 | header("Content-Type: text/plain"); 25 | echo "Parameter OP missing"; 26 | exit; 27 | } 28 | else if(!preg_match("/^[A-Za-z_]*$/", $_RPC_REQUEST->Method)) 29 | { 30 | http_response_code("400"); 31 | header("Content-Type: text/plain"); 32 | echo "Parameter OP invalid"; 33 | exit; 34 | } 35 | else if(!file_exists("groups/rpc_".$_RPC_REQUEST->Method.".".$_RPC_REQUEST->OP.".php")) 36 | { 37 | http_response_code("400"); 38 | header("Content-Type: text/plain"); 39 | echo "Parameter OP invalid"; 40 | exit; 41 | } 42 | else 43 | { 44 | require_once("groups/rpc_".$_RPC_REQUEST->Method.".".$_RPC_REQUEST->OP.".php"); 45 | } 46 | -------------------------------------------------------------------------------- /groups/rpc_PUTROLE.ADD.php: -------------------------------------------------------------------------------- 1 | ID = $_RPC_REQUEST->RoleID; 14 | $role->GroupID = $_RPC_REQUEST->GroupID; 15 | $role->Name = $_RPC_REQUEST->Name; 16 | $role->Description = $_RPC_REQUEST->Description; 17 | $role->Title = $_RPC_REQUEST->Title; 18 | $role->Powers = uint64_init($_RPC_REQUEST->Powers); 19 | try 20 | { 21 | if(!isGroupOwner($_RPC_REQUEST->GroupID, $_RPC_REQUEST->RequestingAgentID)) 22 | { 23 | $groupsService->verifyAgentPowers($_RPC_REQUEST->GroupID, $_RPC_REQUEST->RequestingAgentID, GroupPowers::CreateRole); 24 | } 25 | $groupsService->addGroupRole($_RPC_REQUEST->RequestingAgentID, $role); 26 | sendBooleanResponse(True); 27 | } 28 | catch(Exception $e) 29 | { 30 | sendBooleanResponse(False); 31 | echo ""; 32 | } 33 | -------------------------------------------------------------------------------- /groups/rpc_PUTROLE.UPDATE.php: -------------------------------------------------------------------------------- 1 | GroupID, $_RPC_REQUEST->RequestingAgentID)) 15 | { 16 | $groupsService->verifyAgentPowers($_RPC_REQUEST->GroupID, $_RPC_REQUEST->RequestingAgentID, GroupPowers::RoleProperties); 17 | } 18 | 19 | $role = $groupsService->getGroupRole($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->GroupID, $_RPC_REQUEST->RoleID); 20 | 21 | $role->Name = $_RPC_REQUEST->Name; 22 | $role->Description = $_RPC_REQUEST->Description; 23 | $role->Title = $_RPC_REQUEST->Title; 24 | $role->Powers = uint64_init($_RPC_REQUEST->Powers); 25 | 26 | $groupsService->updateGroupRole($_RPC_REQUEST->RequestingAgentID, $role); 27 | sendBooleanResponse(True); 28 | } 29 | catch(Exception $e) 30 | { 31 | sendBooleanResponse(False); 32 | } 33 | -------------------------------------------------------------------------------- /groups/rpc_REMOVEAGENTFROMGROUP.php: -------------------------------------------------------------------------------- 1 | RequestingAgentID)) 17 | { 18 | http_response_code("400"); 19 | header("Content-Type: text/plain"); 20 | echo "Missing RequestingAgentID"; 21 | exit; 22 | } 23 | 24 | if(!isset($_RPC_REQUEST->AgentID)) 25 | { 26 | http_response_code("400"); 27 | header("Content-Type: text/plain"); 28 | echo "Missing AgentID"; 29 | exit; 30 | } 31 | 32 | if(!isset($_RPC_REQUEST->GroupID)) 33 | { 34 | http_response_code("400"); 35 | header("Content-Type: text/plain"); 36 | echo "Missing GroupID"; 37 | exit; 38 | } 39 | 40 | if(!UUID::IsUUID($_RPC_REQUEST->GroupID)) 41 | { 42 | http_response_code("400"); 43 | header("Content-Type: text/plain"); 44 | echo "Invalid GroupID"; 45 | exit; 46 | } 47 | 48 | try 49 | { 50 | $groupsService->deleteGroupMember($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->GroupID, $_RPC_REQUEST->AgentID); 51 | sendBooleanResponse("true"); 52 | } 53 | catch(Exception $e) 54 | { 55 | sendBooleanResponse("false"); 56 | } 57 | -------------------------------------------------------------------------------- /hg/foreignagent/index.php: -------------------------------------------------------------------------------- 1 | Success"; 31 | } 32 | else 33 | { 34 | header("Content-Type: text/xml"); 35 | echo "Failure"; 36 | } 37 | } 38 | 39 | if(!isset($_POST["METHOD"])) 40 | { 41 | http_response_code("400"); 42 | exit; 43 | } 44 | 45 | if(!preg_match("/^[A-Za-z_]*$/", $_POST["METHOD"])) 46 | { 47 | http_response_code("400"); 48 | exit; 49 | } 50 | else if(!file_exists("rpc_${_POST["METHOD"]}.php")) 51 | { 52 | http_response_code("400"); 53 | exit; 54 | } 55 | else 56 | { 57 | include_once("rpc_${_POST["METHOD"]}.php"); 58 | } 59 | -------------------------------------------------------------------------------- /hgfriends/rpc_deletefriendship.php: -------------------------------------------------------------------------------- 1 | SECRET)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!isset($_RPC_REQUEST->PrincipalID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | if(!isset($_RPC_REQUEST->Friend)) 23 | { 24 | http_response_code("400"); 25 | exit; 26 | } 27 | 28 | if(!UUID::IsUUID($_RPC_REQUEST->PrincipalID)) 29 | { 30 | http_response_code("400"); 31 | exit; 32 | } 33 | 34 | try 35 | { 36 | $HGFriendsService->deleteFriendship($_RPC_REQUEST->PrincipalID, $_RPC_REQUEST->Friend, $_RPC_REQUEST->SECRET); 37 | sendBooleanResponse(True); 38 | } 39 | catch(Exception $e) 40 | { 41 | sendBooleanResponse(False); 42 | } 43 | -------------------------------------------------------------------------------- /hgfriends/rpc_friendship_offered.php: -------------------------------------------------------------------------------- 1 | FromID)) 19 | { 20 | http_response_code("400"); 21 | exit; 22 | } 23 | 24 | if(!isset($_RPC_REQUEST->ToID)) 25 | { 26 | http_response_code("400"); 27 | exit; 28 | } 29 | 30 | if(!UUID::IsUUID($_RPC_REQUEST->FromID)) 31 | { 32 | http_response_code("400"); 33 | exit; 34 | } 35 | 36 | if(!UUID::IsUUID($_RPC_REQUEST->ToID)) 37 | { 38 | http_response_code("400"); 39 | exit; 40 | } 41 | 42 | if(!isset($_RPC_REQUEST->FromName)) 43 | { 44 | http_response_code("400"); 45 | exit; 46 | } 47 | 48 | try 49 | { 50 | $HGFriendsService->offeredFriendship($_RPC_REQUEST->FromID, $_RPC_REQUEST->FromName, $_RPC_REQUEST->ToID, $_RPC_REQUEST->Message); 51 | 52 | sendBooleanResponse(True); 53 | } 54 | catch(Exception $e) 55 | { 56 | sendBooleanResponse(False, "Friend not found"); 57 | } 58 | -------------------------------------------------------------------------------- /hgfriends/rpc_getfriendperms.php: -------------------------------------------------------------------------------- 1 | PRINCIPALID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!isset($_RPC_REQUEST->FRIENDID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPALID)) 23 | { 24 | http_response_code("400"); 25 | exit; 26 | } 27 | 28 | if(!UUID::IsUUID($_RPC_REQUEST->FRIENDID)) 29 | { 30 | http_response_code("400"); 31 | exit; 32 | } 33 | 34 | try 35 | { 36 | $friendPerms = $HGFriendsService->getFriendPerms($_RPC_REQUEST->PRINCIPALID, $_RPC_REQUEST->FRIENDID); 37 | 38 | header("Content-Type: text/xml"); 39 | 40 | echo ""; 41 | echo ""; 42 | echo "Success"; 43 | echo "$friendPerms"; 44 | echo ""; 45 | } 46 | catch(Exception $e) 47 | { 48 | sendBooleanResponse(False, "Friend not found"); 49 | } 50 | -------------------------------------------------------------------------------- /hgfriends/rpc_newfriendship.php: -------------------------------------------------------------------------------- 1 | PrincipalID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!isset($_RPC_REQUEST->Friend)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | if(!UUID::IsUUID($_RPC_REQUEST->PrincipalID)) 23 | { 24 | http_response_code("400"); 25 | exit; 26 | } 27 | 28 | if(!UUI::IsUUI($_RPC_REQUEST->Friend)) 29 | { 30 | http_response_code("400"); 31 | exit; 32 | } 33 | 34 | try 35 | { 36 | $friendPerms = $HGFriendsService->newFriendship($_RPC_REQUEST->PrincipalID, $_RPC_REQUEST->Friend, $_RPC_REQUEST->SESSIONID); 37 | 38 | sendBooleanResponse(True); 39 | } 40 | catch(Exception $e) 41 | { 42 | sendBooleanResponse(False); 43 | } 44 | -------------------------------------------------------------------------------- /hgfriends/rpc_validate_friendship_offered.php: -------------------------------------------------------------------------------- 1 | PrincipalID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | if(!isset($_RPC_REQUEST->Friend)) 23 | { 24 | http_response_code("400"); 25 | exit; 26 | } 27 | 28 | if(!UUID::IsUUID($_RPC_REQUEST->PrincipalID)) 29 | { 30 | http_response_code("400"); 31 | exit; 32 | } 33 | 34 | if(!UUID::IsUUID($_RPC_REQUEST->Friend)) 35 | { 36 | http_response_code("400"); 37 | exit; 38 | } 39 | 40 | try 41 | { 42 | $HGFriendsService->validateFriendshipOffered($_RPC_REQUEST->PrincipalID, $_RPC_REQUEST->Friend); 43 | 44 | sendBooleanResponse(True); 45 | } 46 | catch(Exception $e) 47 | { 48 | sendBooleanResponse(False, "Friend not validated"); 49 | } 50 | -------------------------------------------------------------------------------- /hggroups/rpc_ADDNOTICE.php: -------------------------------------------------------------------------------- 1 | GroupID) && !isset($_RPC_REQUEST->Name)) 20 | { 21 | http_response_code("400"); 22 | exit; 23 | } 24 | 25 | if(!isset($_RPC_REQUEST->AccessToken)) 26 | { 27 | http_response_code("400"); 28 | exit; 29 | } 30 | 31 | try 32 | { 33 | if(isset($_RPC_REQUEST->GroupID)) 34 | { 35 | if(!UUID::IsUUID($_RPC_REQUEST->GroupID)) 36 | { 37 | http_response_code("400"); 38 | exit; 39 | } 40 | $grec = $groupsService->getGroup($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->GroupID); 41 | } 42 | else 43 | { 44 | $grec = $groupsService->getGroupByName($_RPC_REQUEST->RequestingAgentID, $_RPC_REQUEST->Name); 45 | } 46 | verifyAccessToken($groupsService, $_RPC_REQUEST->RequestingAgentID, $grec->ID, $_RPC_REQUEST->AccessToken); 47 | header("Content-Type: text/xml"); 48 | echo ""; 49 | echo ""; 50 | echo $grec->toXML("RESULT"); 51 | echo ""; 52 | } 53 | catch(Exception $e) 54 | { 55 | sendNullResult($e->getMessage()); 56 | } 57 | -------------------------------------------------------------------------------- /hggroups/rpc_GETGROUPMEMBERS.php: -------------------------------------------------------------------------------- 1 | AccessToken)) 12 | { 13 | http_response_code("400"); 14 | header("Content-Type: text/plain"); 15 | echo "Parameter AccessToken missing"; 16 | exit; 17 | } 18 | 19 | if(!isset($_RPC_REQUEST->GroupID)) 20 | { 21 | http_response_code("400"); 22 | header("Content-Type: text/plain"); 23 | echo "Parameter GroupID missing"; 24 | exit; 25 | } 26 | 27 | if(!UUID::IsUUID($_RPC_REQUEST->GroupID)) 28 | { 29 | http_response_code("400"); 30 | header("Content-Type: text/plain"); 31 | echo "Parameter GroupID invalid"; 32 | exit; 33 | } 34 | 35 | try 36 | { 37 | verifyAccessToken($groupsService, $_RPC_REQUEST->RequestingAgentID,$_RPC_REQUEST->GroupID, $_RPC_REQUEST->AccessToken); 38 | } 39 | catch(Exception $e) 40 | { 41 | sendNullResult($e->getMessage()); 42 | exit; 43 | } 44 | 45 | require_once("groups/rpc_GETGROUPMEMBERS.php"); 46 | -------------------------------------------------------------------------------- /hggroups/rpc_GETGROUPROLES.php: -------------------------------------------------------------------------------- 1 | AccessToken)) 11 | { 12 | http_response_code("400"); 13 | header("Content-Type: text/plain"); 14 | echo "Parameter AccessToken missing"; 15 | exit; 16 | } 17 | 18 | if(!isset($_RPC_REQUEST->RequestingAgentID)) 19 | { 20 | http_response_code("400"); 21 | exit; 22 | } 23 | 24 | if(!isset($_RPC_REQUEST->GroupID)) 25 | { 26 | http_response_code("400"); 27 | exit; 28 | } 29 | 30 | if(!UUID::IsUUID($_RPC_REQUEST->GroupID)) 31 | { 32 | http_response_code("400"); 33 | exit; 34 | } 35 | 36 | try 37 | { 38 | verifyAccessToken($groupsService, $_RPC_REQUEST->RequestingAgentID,$_RPC_REQUEST->GroupID, $_RPC_REQUEST->AccessToken); 39 | } 40 | catch(Exception $e) 41 | { 42 | sendNullResult($e->getMessage()); 43 | exit; 44 | } 45 | 46 | require_once("groups/rpc_GETGROUPROLES.php"); 47 | -------------------------------------------------------------------------------- /hggroups/rpc_GETROLEMEMBERS.php: -------------------------------------------------------------------------------- 1 | AccessToken)) 12 | { 13 | http_response_code("400"); 14 | header("Content-Type: text/plain"); 15 | echo "Parameter AccessToken missing"; 16 | exit; 17 | } 18 | 19 | if(!isset($_RPC_REQUEST->GroupID)) 20 | { 21 | http_response_code("400"); 22 | header("Content-Type: text/plain"); 23 | echo "Parameter GroupID missing"; 24 | exit; 25 | } 26 | 27 | if(!UUID::IsUUID($_RPC_REQUEST->GroupID)) 28 | { 29 | http_response_code("400"); 30 | header("Content-Type: text/plain"); 31 | echo "Parameter GroupID invalid"; 32 | exit; 33 | } 34 | 35 | try 36 | { 37 | verifyAccessToken($groupsService, $_RPC_REQUEST->RequestingAgentID,$_RPC_REQUEST->GroupID, $_RPC_REQUEST->AccessToken); 38 | } 39 | catch(Exception $e) 40 | { 41 | sendNullResult($e->getMessage()); 42 | exit; 43 | } 44 | 45 | require_once("groups/rpc_GETROLEMEMBERS.php"); 46 | -------------------------------------------------------------------------------- /hggroups/rpc_REMOVEAGENTFROMGROUP.php: -------------------------------------------------------------------------------- 1 | AccessToken)) 12 | { 13 | http_response_code("400"); 14 | header("Content-Type: text/plain"); 15 | echo "Parameter AccessToken missing"; 16 | exit; 17 | } 18 | 19 | if(!isset($_RPC_REQUEST->GroupID)) 20 | { 21 | http_response_code("400"); 22 | header("Content-Type: text/plain"); 23 | echo "Parameter GroupID missing"; 24 | exit; 25 | } 26 | 27 | if(!UUID::IsUUID($_RPC_REQUEST->GroupID)) 28 | { 29 | http_response_code("400"); 30 | header("Content-Type: text/plain"); 31 | echo "Parameter GroupID invalid"; 32 | exit; 33 | } 34 | 35 | try 36 | { 37 | verifyAccessToken($groupsService, $_RPC_REQUEST->RequestingAgentID,$_RPC_REQUEST->GroupID, $_RPC_REQUEST->AccessToken); 38 | } 39 | catch(Exception $e) 40 | { 41 | sendNullResult($e->getMessage()); 42 | exit; 43 | } 44 | 45 | require_once("groups/rpc_REMOVEAGENTFROMGROUP.php"); 46 | -------------------------------------------------------------------------------- /hggroups/rpc_VERIFYNOTICE.php: -------------------------------------------------------------------------------- 1 | $reqParam)) 21 | { 22 | http_response_code("400"); 23 | header("Content-Type: text/plain"); 24 | echo "Missing $reqParam"; 25 | exit; 26 | } 27 | } 28 | 29 | if(!UUID::IsUUID($_RPC_REQUEST->GroupID)) 30 | { 31 | http_response_code("400"); 32 | header("Content-Type: text/plain"); 33 | echo "Invalid GroupID"; 34 | exit; 35 | } 36 | 37 | if(!UUID::IsUUID($_RPC_REQUEST->NoticeID)) 38 | { 39 | http_response_code("400"); 40 | header("Content-Type: text/plain"); 41 | echo "Invalid NoticeID"; 42 | exit; 43 | } 44 | 45 | try 46 | { 47 | $groupsService->verifyGroupNotice($_RPC_REQUEST->GroupID, $_RPC_REQUEST->NoticeID); 48 | sendBooleanResponse(true); 49 | } 50 | catch(Exception $e) 51 | { 52 | sendBooleanResponse(false); 53 | } 54 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_avatar_properties_request.php: -------------------------------------------------------------------------------- 1 | getUserProperties($_RPC_REQUEST->params->UserId); 17 | 18 | $res = new RPCSuccessResponse(); 19 | $res->UserId = $props->UserID; 20 | $res->PartnerId = $props->PartnerID; 21 | $res->PublishProfile = $props->PublishProfile; 22 | $res->PublishMature = $props->PublishMature; 23 | $res->WebUrl = $props->WebUrl; 24 | $res->WantToMask = $props->WantToMask; 25 | $res->WantToText = $props->WantToText; 26 | $res->SkillsMask = $props->SkillsMask; 27 | $res->SkillsText = $props->SkillsText; 28 | $res->Language = $props->Language; 29 | $res->ImageId = $props->ImageID; 30 | $res->AboutText = $props->AboutText; 31 | $res->FirstLifeImageId = $props->FirstLifeImageID; 32 | $res->FirstLifeText = $props->FirstLifeText; 33 | 34 | return $res; 35 | } 36 | catch(Exception $e) 37 | { 38 | return new RPCFaultResponse(-32604, $e->getMessage()); 39 | } 40 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_avatarclassifiedsrequest.php: -------------------------------------------------------------------------------- 1 | params->creatorId)) 13 | { 14 | return new RPCFaultResponse(-32602, "Missing creatorId"); 15 | } 16 | 17 | if(!UUID::IsUUID($_RPC_REQUEST->params->creatorId)) 18 | { 19 | return new RPCFaultResponse(-32602, "Invalid creatorId"); 20 | } 21 | 22 | require_once("lib/services.php"); 23 | 24 | $profileService = getService("Profile"); 25 | 26 | try 27 | { 28 | $classifieds = $profileService->getClassifieds($_RPC_REQUEST->params->creatorId); 29 | } 30 | catch(Exception $e) 31 | { 32 | return new RPCFaultResponse(-32604, $e->getMessage()); 33 | } 34 | 35 | $rpcResponse = new RPCSuccessResponse(); 36 | $rpcResponse->__unnamed_params__ = true; 37 | 38 | while($classified = $classifieds->getClassified()) 39 | { 40 | $rpcStruct = new RPCStruct(); 41 | $rpcStruct->classifieduuid = $classified->ID; 42 | $rpcStruct->name = $classified->Name; 43 | $rpcResponse->Params[] = $rpcStruct; 44 | } 45 | $classifieds->free(); 46 | 47 | return $rpcResponse; 48 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_avatarnotesrequest.php: -------------------------------------------------------------------------------- 1 | UserId = $_RPC_REQUEST->params->UserId; 18 | $res->TargetId = $_RPC_REQUEST->params->TargetId; 19 | $note = $profileService->getUserNote($_RPC_REQUEST->params->UserId, $_RPC_REQUEST->params->TargetId); 20 | $res->Notes = $note->Notes; 21 | } 22 | catch(Exception $e) 23 | { 24 | $res->Notes = ""; 25 | } 26 | 27 | return $res; 28 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_avatarpicksrequest.php: -------------------------------------------------------------------------------- 1 | params->creatorId)) 13 | { 14 | return new RPCFaultResponse(-32602, "Missing creatorId"); 15 | } 16 | 17 | if(!UUID::IsUUID($_RPC_REQUEST->params->creatorId)) 18 | { 19 | return new RPCFaultResponse(-32602, "Invalid creatorId"); 20 | } 21 | 22 | require_once("lib/services.php"); 23 | 24 | $profileService = getService("Profile"); 25 | 26 | try 27 | { 28 | $picks = $profileService->getPicks($_RPC_REQUEST->params->creatorId); 29 | } 30 | catch(Exception $e) 31 | { 32 | return new RPCFaultResponse(-32604, $e->getMessage()); 33 | } 34 | 35 | $rpcResponse = new RPCSuccessResponse(); 36 | $rpcResponse->__unnamed_params__ = true; 37 | 38 | $resultArray = array(); 39 | while($pick = $picks->getPick()) 40 | { 41 | $rpcStruct = new RPCStruct(); 42 | $rpcStruct->pickuuid = $pick->ID; 43 | $rpcStruct->name = $pick->Name; 44 | $rpcResponse->Params[] = $rpcStruct; 45 | } 46 | $picks->free(); 47 | 48 | return $rpcResponse; 49 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_classified_delete.php: -------------------------------------------------------------------------------- 1 | params->classifiedId)) 13 | { 14 | return new RPCFaultResponse(-32602, "Missing classifiedId"); 15 | } 16 | 17 | if(!UUID::IsUUID($_RPC_REQUEST->params->classifiedId)) 18 | { 19 | return new RPCFaultResponse(-32602, "Invalid classifiedId"); 20 | } 21 | 22 | require_once("lib/services.php"); 23 | 24 | $profileService = getService("Profile"); 25 | 26 | try 27 | { 28 | $profileService = $profileService->deleteClassified($_RPC_REQUEST->params->classifiedId); 29 | $res = new RPCSuccessResponse(); 30 | $res->__unnamed_params__ = True; 31 | $res->result = "success"; 32 | return $res; 33 | } 34 | catch(Exception $e) 35 | { 36 | $res = new RPCFaultResponse(-32604, $e->getMessage()); 37 | return $res; 38 | } 39 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_classifieds_info_query.php: -------------------------------------------------------------------------------- 1 | getClassified($_RPC_REQUEST->params->ClassifiedId); 19 | 20 | $res = new RPCSuccessResponse(); 21 | $res->CreatorId = $classified->ID; 22 | $res->ParcelId = $classified->ParcelID; 23 | $res->SnapshotId = $classified->SnapshotID; 24 | $res->CreationDate = $classified->CreationDate; 25 | $res->ParentEstate = $classified->ParentEstate; 26 | $res->Flags = $classified->Flags; 27 | $res->Category = $classified->Category; 28 | $res->Price = $classified->Price; 29 | $res->Name = $classified->Name; 30 | $res->Description = $classified->Description; 31 | $res->SimName = $classified->SimName; 32 | $res->GlobalPos = "".$classified->GlobalPos; 33 | $res->ParcelName = $classified->ParcelName; 34 | 35 | return $res; 36 | } 37 | catch(Exception $e) 38 | { 39 | return new RPCFaultResponse(-32604, $e->getMessage()); 40 | } 41 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_image_assets_request.php: -------------------------------------------------------------------------------- 1 | params->avatarId)) 13 | { 14 | return new RPCFaultResponse(-32602, "Missing avatarId"); 15 | } 16 | 17 | if(!UUID::IsUUID($_RPC_REQUEST->params->avatarId)) 18 | { 19 | return new RPCFaultResponse(-32602, "Invalid avatarId"); 20 | } 21 | 22 | require_once("lib/services.php"); 23 | 24 | $profileService = getService("Profile"); 25 | 26 | try 27 | { 28 | $assetids = $profileService->getUserImageAssets($_RPC_REQUEST->params->avatarId); 29 | $res = new RPCSuccessResponse(); 30 | $cnt = 0; 31 | $res->__unnamed_params__ = true; 32 | foreach($assetids as $assetid) 33 | { 34 | if($assetid != UUID::ZERO()) 35 | { 36 | $res->$cnt = $assetid; 37 | } 38 | ++$cnt; 39 | } 40 | return $res; 41 | } 42 | catch(Exception $e) 43 | { 44 | return new RPCFaultResponse(-32604, ""); 45 | } 46 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_pickinforequest.php: -------------------------------------------------------------------------------- 1 | getPick($_RPC_REQUEST->params->CreatorId, $_RPC_REQUEST->params->PickId); 17 | $res = new RPCSuccessResponse(); 18 | $res->PickId = $pick->ID; 19 | $res->CreatorId = $pick->CreatorID; 20 | $res->ParcelId = $pick->ParcelID; 21 | $res->SnapshotId = $pick->SnapshotID; 22 | $res->GlobalPos = "".$pick->GlobalPos; 23 | $res->TopPick = $pick->TopPick; 24 | $res->Enabled = $pick->Enabled; 25 | $res->Name = $pick->Name; 26 | $res->Desc = $pick->Description; 27 | $res->User = $pick->User; 28 | $res->OriginalName = $pick->OriginalName; 29 | $res->SimName = $pick->SimName; 30 | $res->SortOrder = $pick->SortOrder; 31 | return $res; 32 | } 33 | catch(Exception $e) 34 | { 35 | return new RPCFaultResponse(-32604, $e->getMessage()); 36 | } 37 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_picks_delete.php: -------------------------------------------------------------------------------- 1 | params->pickId)) 13 | { 14 | return new RPCFaultResponse(-32602, "Missing creatorId"); 15 | } 16 | 17 | if(!UUID::IsUUID($_RPC_REQUEST->params->pickId)) 18 | { 19 | return new RPCFaultResponse(-32602, "Invalid creatorId"); 20 | } 21 | 22 | require_once("lib/services.php"); 23 | 24 | $profileService = getService("Profile"); 25 | 26 | try 27 | { 28 | $profileService = $profileService->deletePick($_RPC_REQUEST->params->pickId); 29 | $res = new RPCSuccessResponse(); 30 | $res->__unnamed_params__ = True; 31 | $res->result = "success"; 32 | return $res; 33 | } 34 | catch(Exception $e) 35 | { 36 | $res = new RPCFaultResponse(-32604, $e->getMessage()); 37 | return $res; 38 | } 39 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_user_preferences_request.php: -------------------------------------------------------------------------------- 1 | params->UserId)) 14 | { 15 | return new RPCFaultResponse(-32602, "Missing UserId"); 16 | } 17 | 18 | $userID = substr($_RPC_REQUEST->params->UserId, 0, 36); /* make anything be a UUID */ 19 | if(!UUID::IsUUID($userID)) 20 | { 21 | return new RPCFaultResponse(-32602, "Invalid UserId"); 22 | } 23 | 24 | require_once("lib/services.php"); 25 | $profileService = getService("Profile"); 26 | 27 | try 28 | { 29 | $prefs = $profileService->getUserPreferences($userID); 30 | } 31 | catch(Exception $e) 32 | { 33 | $prefs = new UserPreferences(); 34 | $prefs->UserID = $userID; 35 | 36 | try 37 | { 38 | $profileService->setUserPreferences($prefs); 39 | } 40 | catch(Exception $e) 41 | { 42 | return new RPCFaultResponse(-32604, $e->getMessage()); 43 | } 44 | } 45 | 46 | $res = new RPCSuccessResponse(); 47 | $res->IMViaEmail = $prefs->ImViaEmail; 48 | $res->Visible = $prefs->Visible; 49 | $res->EMail = ""; 50 | return $res; 51 | -------------------------------------------------------------------------------- /json20rpc/jsonrpc_user_preferences_update.php: -------------------------------------------------------------------------------- 1 | params->UserId)) 15 | { 16 | return new RPCFaultResponse(-32602, "Missing UserId"); 17 | } 18 | 19 | $userID = substr($_RPC_REQUEST->params->UserId, 0, 36); /* make anything be a UUID */ 20 | if(!UUID::IsUUID($userID)) 21 | { 22 | return new RPCFaultResponse(-32602, "Invalid UserId"); 23 | } 24 | 25 | $prefs = new UserPreferences(); 26 | $prefs->UserID = $userID; 27 | 28 | if(isset($_RPC_REQUEST->params->IMViaEmail)) 29 | { 30 | $prefs->ImViaEmail = string2boolean($_RPC_REQUEST->params->IMViaEmail); 31 | } 32 | 33 | if(isset($_RPC_REQUEST->params->Visible)) 34 | { 35 | $prefs->Visible = string2boolean($_RPC_REQUEST->params->Visible); 36 | } 37 | 38 | require_once("lib/services.php"); 39 | $profileService = getService("Profile"); 40 | 41 | try 42 | { 43 | $profileService->setUserPreferences($prefs); 44 | } 45 | catch(Exception $e) 46 | { 47 | return new RPCFaultResponse(-32604, $e->getMessage()); 48 | } 49 | 50 | $res = new RPCSuccessResponse(); 51 | $res->IMViaEmail = $prefs->ImViaEmail; 52 | $res->Visible = $prefs->Visible; 53 | $res->EMail = ""; 54 | return $res; 55 | -------------------------------------------------------------------------------- /json_grid_info.php: -------------------------------------------------------------------------------- 1 | getGridInfoParams(); 16 | 17 | header("Content-Type: application/json-rpc"); 18 | echo "{"; 19 | echo "\"platform\":\"OpenSim\""; 20 | $have_loginuri = False; 21 | foreach($params as $name => $value) 22 | { 23 | if($name == "login") 24 | { 25 | $have_loginuri = True; 26 | } 27 | echo ",\"$name\":\"".addcslashes($value, "\\\n\r\\\"\\\'")."\""; 28 | } 29 | 30 | if(!$have_loginuri) 31 | { 32 | echo ",\"login\":\"".addcslashes("http://${_SERVER['SERVER_NAME']}:${_SERVER['SERVER_PORT']}/")."\""; 33 | } 34 | echo "}"; 35 | -------------------------------------------------------------------------------- /landtool.php: -------------------------------------------------------------------------------- 1 | ipacl = $ipacl; 18 | } 19 | 20 | public function verifyAccess($servicename, $func) 21 | { 22 | if(in_array(getRemoteIpAddr(), $this->ipacl)) 23 | { 24 | return; 25 | } 26 | // trigger_error("\"".getRemoteIpAddr()."\" is not in IP ACL"); 27 | throw new AccessDeniedException("Not validated by Private IP access control"); 28 | } 29 | } 30 | 31 | return new ConfigurableIPAccessControl($_SERVICE_PARAMS["ipacl"]); 32 | -------------------------------------------------------------------------------- /lib/accesscontrol/providers/ConfigurableIPMethodAccessControl.php: -------------------------------------------------------------------------------- 1 | allow = $allow; 18 | $this->ipacl = $ipacl; 19 | } 20 | 21 | public function verifyAccess($servicename, $func) 22 | { 23 | if(!isset($this->allow[$servicename])) 24 | { 25 | throw new AccessDeniedException("Not validated by unrestricted method access control"); 26 | } 27 | if(!in_array($func, $this->allow[$servicename])) 28 | { 29 | throw new AccessDeniedException("Not validated by unrestricted method access control"); 30 | } 31 | if(in_array(getRemoteIpAddr(), $this->ipacl)) 32 | { 33 | return; 34 | } 35 | trigger_error("\"".getRemoteIpAddr()."\" is not in IP ACL"); 36 | throw new AccessDeniedException("Not validated by Private IP access control"); 37 | } 38 | } 39 | 40 | return new ConfigurableIPMethodAccessControl($_SERVICE_PARAMS["allow"], $_SERVICE_PARAMS["ipacl"]); 41 | -------------------------------------------------------------------------------- /lib/accesscontrol/providers/PrivateIPAccessControl.php: -------------------------------------------------------------------------------- 1 | = 10 && $grp[1] <= 31) 28 | { 29 | return; 30 | } 31 | } 32 | if(substr(getRemoteIpAddr(), 0, 3) == "10.") 33 | { 34 | return; 35 | } 36 | if(substr(getRemoteIpAddr(), 0, 4) == "127.") 37 | { 38 | return; 39 | } 40 | throw new AccessDeniedException("Not validated by Private IP access control"); 41 | } 42 | } 43 | 44 | return new PrivateIPAccessControl(); 45 | -------------------------------------------------------------------------------- /lib/accesscontrol/providers/SimulatorAccessControl.php: -------------------------------------------------------------------------------- 1 | gridService = getService("Grid"); 19 | } 20 | 21 | public function verifyAccess($service, $func) 22 | { 23 | try 24 | { 25 | $region = $this->gridService->getRegionByIP(getRemoteIpAddr()); 26 | } 27 | catch(Exception $e) 28 | { 29 | throw new AccessDeniedException("Not validated by simulator access control"); 30 | } 31 | } 32 | } 33 | 34 | return new SimulatorAccessControl(); 35 | -------------------------------------------------------------------------------- /lib/accesscontrol/providers/UnrestrictedMethodAccessControl.php: -------------------------------------------------------------------------------- 1 | allow = $allow; 19 | } 20 | 21 | public function verifyAccess($servicename, $func) 22 | { 23 | if(!isset($this->allow[$servicename])) 24 | { 25 | throw new AccessDeniedException("Not validated by unrestricted method access control"); 26 | } 27 | if(!in_array($func, $this->allow[$servicename])) 28 | { 29 | throw new AccessDeniedException("Not validated by unrestricted method access control"); 30 | } 31 | } 32 | } 33 | 34 | return new UnrestrictedMethodAccessControl($_SERVICE_PARAMS["allow"]); 35 | -------------------------------------------------------------------------------- /lib/accessdistributor/AssetService.php: -------------------------------------------------------------------------------- 1 | 0) 20 | { 21 | $outstring .= $db->real_escape_string(substr($searchstring, 0, $pos)); 22 | } 23 | $outstring .= "%"; 24 | $searchstring = substr($searchstring, $pos + 1); 25 | } 26 | $outstring .= $db->real_escape_string($searchstring); 27 | 28 | return $outstring; 29 | } 30 | 31 | function mysql_LikeFilterConverter($db, $searchstring) 32 | { 33 | $pos = 0; 34 | $outstring = ""; 35 | while(($pos = strpos($searchstring, "%")) !== FALSE) 36 | { 37 | if($pos > 0) 38 | { 39 | $outstring .= $db->real_escape_string(substr($searchstring, 0, $pos)); 40 | } 41 | $outstring .= "%"; 42 | $searchstring = substr($searchstring, $pos + 1); 43 | } 44 | $outstring .= $db->real_escape_string($searchstring); 45 | 46 | return $outstring; 47 | } 48 | -------------------------------------------------------------------------------- /lib/helpers/gridlibrary.php: -------------------------------------------------------------------------------- 1 | getParam("gridlibraryenabled", "false"); 16 | if(strtolower($ret) == "true") 17 | { 18 | return true; 19 | } 20 | else 21 | { 22 | return false; 23 | } 24 | } 25 | 26 | function getGridLibraryOwner() 27 | { 28 | if(!isGridLibraryEnabled()) 29 | { 30 | return "00000000-0000-0000-0000-000000000000"; 31 | } 32 | $serverParamService = getService("ServerParam"); 33 | return new UUID($serverParamService->getParam("gridlibraryownerid", "11111111-1111-0000-0000-000100bba000")); 34 | } 35 | 36 | function getGridLibraryRoot() 37 | { 38 | if(!isGridLibraryEnabled()) 39 | { 40 | return "00000000-0000-0000-0000-000000000000"; 41 | } 42 | $serverParamService = getService("ServerParam"); 43 | return new UUID($serverParamService->getParam("gridlibraryfolderid", "00000112-000f-0000-0000-000100bba000")); 44 | } 45 | -------------------------------------------------------------------------------- /lib/interfaces/AccessControlServiceInterface.php: -------------------------------------------------------------------------------- 1 | verifyAccess($service, $func); 48 | if($v["check"] == "sufficient") 49 | { 50 | return null; 51 | } 52 | } 53 | catch(Exception $e) 54 | { 55 | if($v["check"] == "required") 56 | { 57 | throw $e; 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/interfaces/AssetServiceInterface.php: -------------------------------------------------------------------------------- 1 | HttpResponseCode = $HttpResponseCode; 19 | $this->Body = $Body; 20 | } 21 | } 22 | 23 | /* following only used on 200 */ 24 | class HttpConnectorResponse 25 | { 26 | public $ContentType = ""; 27 | public $Body = ""; 28 | 29 | public function __construct($ContentType, $Body) 30 | { 31 | $this->ContentType = $ContentType; 32 | $this->Body = $Body; 33 | } 34 | } 35 | 36 | interface HttpConnectorServiceInterface 37 | { 38 | public function doRequest($method, $uri, $body = null, $requestContentType = null, $gzipEncoding = false); 39 | 40 | public function doPostRequest($uri, $postValues, $getValues = null, $gzipEncoding = false); 41 | 42 | public function doGetRequest($uri, $getValues = null); 43 | } 44 | -------------------------------------------------------------------------------- /lib/interfaces/IMServiceInterface.php: -------------------------------------------------------------------------------- 1 | intval($row["locX"]), 25 | "locY" => intval($row["locY"]), 26 | "updateTime" => intval($row["lastUpdate"])); 27 | */ 28 | } 29 | -------------------------------------------------------------------------------- /lib/interfaces/MigrationDataServiceInterface.php: -------------------------------------------------------------------------------- 1 | service = getService($service); 18 | } 19 | public function get($assetID) 20 | { 21 | return $this->service->get($assetID); 22 | } 23 | 24 | public function getMetadata($assetID) 25 | { 26 | return $this->service->getMetadata($assetID); 27 | } 28 | 29 | public function getData($assetID) 30 | { 31 | return $this->service->getData($assetID); 32 | } 33 | 34 | public function store($asset, $overwriteAlways = False) 35 | { 36 | return $this->service->store($asset, False); 37 | } 38 | 39 | public function delete($assetID) 40 | { 41 | throw new AssetPermissionsInsufficientException(); 42 | } 43 | 44 | public function exists($assetID) 45 | { 46 | return $this->service->exists($assetID); 47 | } 48 | 49 | public function existsMultiple($assetIDsHash) 50 | { 51 | return $this->service->existsMultiple($assetIDsHash); 52 | } 53 | } 54 | 55 | return new HGAssetServiceInterface($_SERVICE_PARAMS["service"]); 56 | -------------------------------------------------------------------------------- /lib/services/authentication/NoAuthenticationService.php: -------------------------------------------------------------------------------- 1 | getAuthInfo($principalID); 23 | 24 | return $authInfoService->addToken($principalID, $lifetime); 25 | } 26 | } 27 | 28 | return new NoAuthenticationService(); 29 | -------------------------------------------------------------------------------- /lib/services/authentication/PasswordAuthenticationService.php: -------------------------------------------------------------------------------- 1 | getAuthInfo($principalID); 23 | 24 | $salted = md5($password.":".$authInfo->PasswordSalt); 25 | 26 | if($salted !== $authInfo->PasswordHash) 27 | { 28 | throw new AuthenticationFailedException(); 29 | } 30 | 31 | return $authInfoService->addToken($principalID, $lifetime); 32 | } 33 | } 34 | 35 | return new PasswordAuthenticationService(); 36 | -------------------------------------------------------------------------------- /lib/services/hypergrid/AssetGuardService.php: -------------------------------------------------------------------------------- 1 | service = getService($servicename); 20 | } 21 | 22 | public function get($assetID) 23 | { 24 | return $this->service->get($assetID); 25 | } 26 | 27 | public function getMetadata($assetID) 28 | { 29 | return $this->service->getMetadata($assetID); 30 | } 31 | 32 | public function getData($assetID) 33 | { 34 | return $this->service->getData($assetID); 35 | } 36 | 37 | public function store($asset, $overwriteAlways = False) 38 | { 39 | return $this->service->store($asset, False); 40 | } 41 | 42 | public function delete($assetID) 43 | { 44 | return $this->service->delete($assetID); 45 | } 46 | 47 | public function exists($assetID) 48 | { 49 | return $this->service->exists($assetID); 50 | } 51 | 52 | public function existsMultiple($assetIDsHash) 53 | { 54 | return $this->service->existsMultiple($assetIDsHash); 55 | } 56 | } 57 | 58 | return new HGAssetGuardService($_SERVICE_PARAMS["service"]); 59 | -------------------------------------------------------------------------------- /lib/types/AppearanceInfo.php: -------------------------------------------------------------------------------- 1 | appearance = $appearance; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/types/BinaryData.php: -------------------------------------------------------------------------------- 1 | Data = $data; 17 | } 18 | 19 | public function __toString() 20 | { 21 | return $this->Data; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/types/CircuitInfo.php: -------------------------------------------------------------------------------- 1 | CircuitCode = rand(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/types/ClientInfo.php: -------------------------------------------------------------------------------- 1 | "; 28 | $xmlout.="".xmlentities($this->UserID).""; 29 | $xmlout.="".xmlentities($this->FriendID).""; 30 | $xmlout.="".xmlentities($this->Flags).""; 31 | $xmlout.="".xmlentities($this->TheirFlags).""; 32 | return $xmlout.""; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/types/Quaternion.php: -------------------------------------------------------------------------------- 1 | Uri = $uri; 17 | } 18 | 19 | public function __toString() 20 | { 21 | return $this->Uri; 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /lib/types/Vector3.php: -------------------------------------------------------------------------------- 1 | [\-\+]{0,1}[0-9\.]*)[ \t]*,[ \t]*(?P[\-\+]{0,1}[0-9\.]*)[ \t]*,[ \t]*(?P[\-\+]{0,1}[0-9\.]*)[ \t]*>$/", $str, $match)) 24 | { 25 | throw new Vector3ParseException(); 26 | } 27 | $this->X = floatval($match["x"]); 28 | $this->Y =floatval($match["y"]); 29 | $this->Z = floatval($match["z"]); 30 | 31 | } 32 | else 33 | { 34 | $this->X = $x; 35 | $this->Y = $y; 36 | $this->Z = $z; 37 | } 38 | } 39 | 40 | public function __toString() 41 | { 42 | return "<".floatval($this->X).",".floatval($this->Y).",".floatval($this->Z).">"; 43 | } 44 | 45 | public static function IsVector3($vec) 46 | { 47 | return preg_match("/^<[ \t]*[\-\+]{0,1}[0-9\.]*[ \t]*,[ \t]*[\-\+]{0,1}[0-9\.]*[ \t]*,[ \t]*[\-\+]{0,1}[0-9\.]*[ \t]*>$/", $vec); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /llsd_rpc/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llsd_rpc/index.html -------------------------------------------------------------------------------- /llsd_rpc/llsd_binary.php: -------------------------------------------------------------------------------- 1 | Method = substr($_SERVER["REQUEST_URI"], strlen($_SERVER["SCRIPT_NAME"])); 16 | } 17 | catch(Exception $e) 18 | { 19 | http_response_code("500"); 20 | exit; 21 | } 22 | 23 | /* run the common part here */ 24 | require("llsd_rpc/llsd_rpc.php"); 25 | -------------------------------------------------------------------------------- /llsd_rpc/llsd_rpc.php: -------------------------------------------------------------------------------- 1 | Method, "..") !== False) 13 | { 14 | http_response_code("400"); 15 | exit; 16 | } 17 | else if(strpos($_RPC_REQUEST->Method, "/./") !== False) 18 | { 19 | http_response_code("400"); 20 | exit; 21 | } 22 | else if(!preg_match("/^[0-9a-zA-Z\._\/]*$/", $_RPC_REQUEST->Method)) 23 | { 24 | http_response_code("400"); 25 | exit; 26 | } 27 | else if(!file_exists("llsdrpc_".$method.".php")) 28 | { 29 | http_response_code("400"); 30 | exit; 31 | } 32 | else 33 | { 34 | echo $_RPC_REQUEST->RPCHandler->serializeRPC(require("llsdrpc_".$method.".php")); 35 | } 36 | -------------------------------------------------------------------------------- /llsd_rpc/llsd_xml.php: -------------------------------------------------------------------------------- 1 | Method = substr($_SERVER["REQUEST_URI"], strlen($_SERVER["SCRIPT_NAME"])); 16 | } 17 | catch(Exception $e) 18 | { 19 | http_response_code("500"); 20 | exit; 21 | } 22 | 23 | /* run the common part here */ 24 | require("llsd_rpc/llsd_rpc.php"); 25 | -------------------------------------------------------------------------------- /llview/inventoryicons/LICENSE-artwork.txt: -------------------------------------------------------------------------------- 1 | COPYRIGHT AND PERMISSION NOTICE 2 | 3 | Second Life(TM) Viewer Artwork. Copyright (C) 2008 Linden Research, Inc. 4 | 5 | Linden Research, Inc. ("Linden Lab") licenses the Second Life viewer 6 | artwork and other works in the files distributed with this Notice under 7 | the Creative Commons Attribution-Share Alike 3.0 License, available at 8 | http://creativecommons.org/licenses/by-sa/3.0/legalcode. For the license 9 | summary, see http://creativecommons.org/licenses/by-sa/3.0/. 10 | 11 | Notwithstanding the foregoing, all of Linden Lab's trademarks, including 12 | but not limited to the Second Life brand name and Second Life Eye-in-Hand 13 | logo, are subject to our trademark policy at 14 | http://secondlife.com/corporate/trademark/. 15 | 16 | If you distribute any copies or adaptations of the Second Life viewer 17 | artwork or any other works in these files, you must include this Notice 18 | and clearly identify any changes made to the original works. Include 19 | this Notice and information where copyright notices are usually included, 20 | for example, after your own copyright notice acknowledging your use of 21 | the Second Life viewer artwork, in a text file distributed with your 22 | program, in your application's About window, or on a credits page for 23 | your work. 24 | -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_animation.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_bodypart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_bodypart.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_callingcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_callingcard.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_clothing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_clothing.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_favorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_favorite.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_gesture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_gesture.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_inbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_inbox.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_landmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_landmark.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_lostandfound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_lostandfound.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_mesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_mesh.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_notecard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_notecard.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_object.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_outbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_outbox.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_outfit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_outfit.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_plain_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_plain_closed.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_plain_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_plain_open.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_script.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_snapshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_snapshot.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_sound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_sound.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_texture.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_folder_trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_folder_trash.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_invalid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_invalid.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_alpha.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_animation.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_attach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_attach.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_callingcard_offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_callingcard_offline.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_callingcard_online.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_callingcard_online.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_clothing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_clothing.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_eyes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_eyes.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_gesture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_gesture.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_gesture_muted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_gesture_muted.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_gloves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_gloves.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_hair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_hair.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_jacket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_jacket.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_landmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_landmark.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_landmark_visited.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_landmark_visited.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_mesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_mesh.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_notecard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_notecard.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_object.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_object_multi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_object_multi.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_pants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_pants.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_physics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_physics.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_script.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_script_dangerous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_script_dangerous.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_shape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_shape.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_shirt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_shirt.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_shoes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_shoes.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_skin.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_skirt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_skirt.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_snapshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_snapshot.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_socks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_socks.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_sound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_sound.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_tattoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_tattoo.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_texture.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_underpants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_underpants.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_undershirt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_undershirt.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_item_unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_item_unknown.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_link_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_link_folder.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_link_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_link_item.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_link_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_link_overlay.png -------------------------------------------------------------------------------- /llview/inventoryicons/inv_reset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/llview/inventoryicons/inv_reset.png -------------------------------------------------------------------------------- /offlineim/rpc_GET.php: -------------------------------------------------------------------------------- 1 | PrincipalID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->PrincipalID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | require_once("lib/services.php"); 23 | 24 | $offlineIMService = getService("RPC_OfflineIM"); 25 | 26 | $offlineIMs = $offlineIMService->getOfflineIMs($_RPC_REQUEST->PrincipalID); 27 | 28 | header("Content-Type: text/xml"); 29 | echo ""; 30 | echo ""; 31 | $cnt = 0; 32 | $deleteims = array(); 33 | while($offlineIM = $offlineIMs->getOfflineIM()) 34 | { 35 | if($cnt == 0) 36 | { 37 | echo ""; 38 | } 39 | echo $offlineIM->toXML("im-$cnt"); 40 | $deleteims[] = $offlineIM->ID; 41 | ++$cnt; 42 | } 43 | foreach($deleteims as $deleteim) 44 | { 45 | try 46 | { 47 | $offlineIMService->deleteOfflineIM($deleteim); 48 | } 49 | catch(Exception $e) 50 | { 51 | } 52 | } 53 | 54 | if(0 != $cnt) 55 | { 56 | echo ""; 57 | } 58 | else 59 | { 60 | echo "NULLNo offline messages"; 61 | } 62 | 63 | echo ""; 64 | -------------------------------------------------------------------------------- /presence/rpc_getagent.php: -------------------------------------------------------------------------------- 1 | SessionID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->SessionID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | require_once("lib/services.php"); 23 | 24 | $presenceService = getService("RPC_Presence"); 25 | 26 | try 27 | { 28 | $presence = $presenceService->getAgentBySession($_RPC_REQUEST->SessionID); 29 | 30 | header("Content-Type: text/xml"); 31 | echo ""; 32 | echo ""; 33 | echo $presence->toXML("result", " type=\"List\""); 34 | echo ""; 35 | } 36 | catch(PresenceNotFoundException $e) 37 | { 38 | header("Content-Type: text/xml"); 39 | echo ""; 40 | echo ""; 41 | } 42 | catch(Exception $e) 43 | { 44 | http_response_code("503"); 45 | } 46 | -------------------------------------------------------------------------------- /presence/rpc_getagents.php: -------------------------------------------------------------------------------- 1 | uuids)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!is_array($_RPC_REQUEST->uuids)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | require_once("lib/services.php"); 23 | $presenceService = getService("RPC_Presence"); 24 | 25 | header("Content-Type: text/xml"); 26 | echo ""; 27 | 28 | $cnt = 0; 29 | foreach($_RPC_REQUEST->uuids as $userid) 30 | { 31 | try 32 | { 33 | $presences = $presenceService->getAgentsByID($userid); 34 | while($presence = $presences->getAgent()) 35 | { 36 | if($cnt==0) 37 | { 38 | echo ""; 39 | } 40 | echo $presence->toXML("presence$cnt", " type=\"List\""); 41 | ++$cnt; 42 | } 43 | $presences->free(); 44 | } 45 | catch(Exception $e) 46 | { 47 | } 48 | } 49 | 50 | if($cnt != 0) 51 | { 52 | echo ""; 53 | } 54 | else 55 | { 56 | echo ""; 57 | } 58 | -------------------------------------------------------------------------------- /presence/rpc_login.php: -------------------------------------------------------------------------------- 1 | UserID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!isset($_RPC_REQUEST->SessionID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | if(!UUID::IsUUID($_RPC_REQUEST->SessionID)) 23 | { 24 | http_response_code("400"); 25 | exit; 26 | } 27 | 28 | $ssession="00000000-0000-0000-0000-000000000000"; 29 | if(isset($_RPC_REQUEST->SecureSessionID)) 30 | { 31 | $ssession=$_RPC_REQUEST->SecureSessionID; 32 | if(!UUID::IsUUID($ssession)) 33 | { 34 | http_response_code("400"); 35 | exit; 36 | } 37 | } 38 | 39 | require_once("lib/services.php"); 40 | require_once("lib/types/Presence.php"); 41 | $presenceService = getService("RPC_Presence"); 42 | 43 | try 44 | { 45 | $presence = new Presence(); 46 | $presence->$UserID = $_RPC_REQUEST->UserID; 47 | $presence->SessionID=$_RPC_REQUEST->SessionID; 48 | $presence->SecureSessionID = $ssession; 49 | $presence->LastSeen = $lastseen = strftime("%F %T", time()); 50 | 51 | $presenceService->loginPresence($presence); 52 | 53 | sendBooleanResponse(True); 54 | } 55 | catch(Exception $e) 56 | { 57 | sendBooleanResponse(False); 58 | } 59 | -------------------------------------------------------------------------------- /presence/rpc_logoutregion.php: -------------------------------------------------------------------------------- 1 | RegionID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->RegionID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | require_once("lib/services.php"); 23 | $presenceService = getService("RPC_Presence"); 24 | 25 | try 26 | { 27 | $presenceService->logoutRegion($_RPC_REQUEST->RegionID); 28 | sendBooleanResponse(True); 29 | } 30 | catch(Exception $e) 31 | { 32 | sendBooleanResponse(False); 33 | } 34 | -------------------------------------------------------------------------------- /rest_helo.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | has()) { ?> 6 | 'block', 'error' => $error))?> 7 | 8 | 9 |

10 |
11 |
12 |
19 |
20 | 21 | 22 |
23 |
24 | 25 | 26 |
27 |
28 | 29 |
30 |
31 |
32 | -------------------------------------------------------------------------------- /tools/authentication-for-concrete5.7/phpgridserver/db.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | uID 12 | 13 |
14 |
-------------------------------------------------------------------------------- /tools/authentication-for-concrete5.7/phpgridserver/forgot_password.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
8 |
9 |

10 | 11 |
12 |
13 | 14 |
15 |
16 |
17 | 18 |
19 | 20 |
21 |
22 | -------------------------------------------------------------------------------- /tools/authentication-for-concrete5.7/phpgridserver/invalid_token.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |

6 | 7 |
8 | 10 |
11 | 12 | 13 | 14 |
15 | -------------------------------------------------------------------------------- /tools/authentication-for-concrete5.7/phpgridserver/password_changed.php: -------------------------------------------------------------------------------- 1 | 4 |
5 | 6 |
7 |
8 | 9 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /tools/authentication-for-concrete5.7/phpgridserver/password_sent.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |

6 | 7 |
8 |
9 | 11 |
12 | 13 | 14 | 15 |
16 | -------------------------------------------------------------------------------- /tools/dbmigration.php: -------------------------------------------------------------------------------- 1 | migrateRevision(); 22 | } 23 | -------------------------------------------------------------------------------- /tools/frontpage-for-concrete5.7-integration/README.md: -------------------------------------------------------------------------------- 1 | 1. Put the following concrete5.7 folders into phpGridServer installation path: 2 | 3 | application 4 | concrete 5 | packages 6 | updates 7 | 8 | 2. Use the frontpage.php from this directory 9 | 10 | Remarks! Do NOT use concrete5.7 index.php as it will replace important functions. 11 | -------------------------------------------------------------------------------- /tools/frontpage-for-concrete5.7-integration/frontpage.php: -------------------------------------------------------------------------------- 1 | '.*', '\?' => '.'))."$#i", $string); 4 | } // end 5 | require_once("lib/services.php"); 6 | require('concrete/dispatcher.php'); 7 | -------------------------------------------------------------------------------- /tools/loadtexture.php: -------------------------------------------------------------------------------- 1 | exists($uuid); 28 | echo "skipped\n"; 29 | continue; 30 | } 31 | catch(Exception $e)*/ 32 | { 33 | $asset = new Asset(); 34 | $asset->ID = $uuid; 35 | $asset->Name = "From IAR"; 36 | $asset->Type = 0; 37 | $data = file_get_contents($argv[$argi]); 38 | if($data == "") 39 | { 40 | echo "failed to load asset"; 41 | exit; 42 | } 43 | $asset->Data = $data; 44 | $assetService->store($asset); 45 | echo "stored\n"; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tools/opensim-collectord.php: -------------------------------------------------------------------------------- 1 | getNextExpireTime(); 20 | if($nextexpiry->NextCheckTime > time()) 21 | { 22 | sleep(1); 23 | continue; 24 | } 25 | } 26 | catch(Exception $e) 27 | { 28 | trigger_error(get_class($e).":".$e->getMessage()); 29 | sleep(1); 30 | continue; 31 | } 32 | 33 | print("Collecting data from ".$nextexpiry->HostName.":".$nextexpiry->Port."\n"); 34 | 35 | try 36 | { 37 | $fetcher = new OpenSimDataSnapshotFetcher($nextexpiry->HostName, $nextexpiry->Port); 38 | } 39 | catch(Exception $e) 40 | { 41 | print(get_class($e).":".$e->getMessage()."\n"); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /user/inventoryview.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /user/jquery-stuff.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /user/pages/default.php: -------------------------------------------------------------------------------- 1 |

Account Details


2 | 3 | 4 | 5 | 6 | 7 |
First NameFirstName; ?>
Last NameLastName; ?>
UUIDID; ?>
EmailEmail; ?>
-------------------------------------------------------------------------------- /user/pages/inventory.php: -------------------------------------------------------------------------------- 1 | verifyInventory($_SESSION["principalid"]); 4 | ?> 5 | -------------------------------------------------------------------------------- /user/pages/profile/1stlife.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/user/pages/profile/1stlife.php -------------------------------------------------------------------------------- /user/pages/profile/classifieds.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/user/pages/profile/classifieds.php -------------------------------------------------------------------------------- /user/pages/profile/interests.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/user/pages/profile/interests.php -------------------------------------------------------------------------------- /user/pages/profile/notes.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/user/pages/profile/notes.php -------------------------------------------------------------------------------- /user/pages/profile/picks.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/user/pages/profile/picks.php -------------------------------------------------------------------------------- /user/pages/purgeappearance.php: -------------------------------------------------------------------------------- 1 |

Purge Appearance


2 | Purging appearance
"; 7 | $avatarService = getService("Avatar"); 8 | try 9 | { 10 | $avatarService->resetAvatar($userAccount->ID); 11 | echo "
Purged appearance successfully

"; 12 | } 13 | catch(Exception $e) 14 | { 15 | echo "
Appearance purge failed
".$e->getMessage()."

"; 16 | } 17 | } 18 | ?> 19 |
Do you really want to purge your appearance?

20 |
21 | 22 | 23 |
24 | -------------------------------------------------------------------------------- /xinventory/rpc_CREATEUSERINVENTORY.php: -------------------------------------------------------------------------------- 1 | PRINCIPAL)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPAL)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | $sessionID = null; 23 | if(isset($_RPC_REQUEST->SESSIONID)) 24 | { 25 | if(!UUID::IsUUID($_RPC_REQUEST->SESSIONID)) 26 | { 27 | http_response_code("400"); 28 | exit; 29 | } 30 | setRpcSessionID($_RPC_REQUEST->SESSIONID); 31 | } 32 | 33 | try 34 | { 35 | $inventoryService->verifyInventory($_RPC_REQUEST->PRINCIPAL); 36 | 37 | sendBooleanResponse(True); 38 | } 39 | catch(Exception $e) 40 | { 41 | sendBooleanResponse(False); 42 | } 43 | -------------------------------------------------------------------------------- /xinventory/rpc_DELETEITEMS.php: -------------------------------------------------------------------------------- 1 | ITEMS) or 11 | !isset($_RPC_REQUEST->PRINCIPAL)) 12 | { 13 | http_response_code("400"); 14 | exit; 15 | } 16 | 17 | foreach($_RPC_REQUEST->ITEMS as $id) 18 | { 19 | if(!UUID::IsUUID($id)) 20 | { 21 | http_response_code("400"); 22 | exit; 23 | } 24 | } 25 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPAL)) 26 | { 27 | http_response_code("400"); 28 | exit; 29 | } 30 | 31 | $sessionID = null; 32 | if(isset($_RPC_REQUEST->SESSIONID)) 33 | { 34 | if(!UUID::IsUUID($_RPC_REQUEST->SESSIONID)) 35 | { 36 | http_response_code("400"); 37 | exit; 38 | } 39 | setRpcSessionID($_RPC_REQUEST->SESSIONID); 40 | } 41 | 42 | foreach($_POST["ITEMS"] as $id) 43 | { 44 | /* handoff disallow handling to database server */ 45 | try 46 | { 47 | UUID::CheckWithException($id); 48 | $item = $inventoryService->getItem($_RPC_REQUEST->PRINCIPAL, $id); 49 | if($disallow_delete && ($item->Type != 24 && $item->Type != 25)) 50 | { 51 | throw new Exception(); 52 | } 53 | 54 | $inventoryService->deleteItem($_RPC_REQUEST->PRINCIPAL, $id); 55 | } 56 | catch(Exception $e) 57 | { 58 | } 59 | } 60 | sendBooleanResponse(True); 61 | -------------------------------------------------------------------------------- /xinventory/rpc_GETACTIVEGESTURES.php: -------------------------------------------------------------------------------- 1 | PRINCIPAL)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPAL)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | $sessionID = null; 23 | if(isset($_RPC_REQUEST->SESSIONID)) 24 | { 25 | if(!UUID::IsUUID($_RPC_REQUEST->SESSIONID)) 26 | { 27 | http_response_code("400"); 28 | exit; 29 | } 30 | setRpcSessionID($_RPC_REQUEST->SESSIONID); 31 | } 32 | 33 | /* enable output compression */ 34 | if(!isset($_GET["rpc_debug"]) && $enablegzipcompression) 35 | { 36 | ini_set("zlib.output_compression", 4096); 37 | } 38 | 39 | header("Content-Type: text/xml"); 40 | echo ""; 41 | try 42 | { 43 | $res = $inventoryService->getActiveGestures($_RPC_REQUEST->PRINCIPAL); 44 | } 45 | catch(Exception $e) 46 | { 47 | echo ""; 48 | } 49 | 50 | echo ""; 51 | echo ""; 52 | $cnt = 0; 53 | while($row = $res->getItem()) 54 | { 55 | echo $row->toXML("item_$cnt", " type=\"List\""); 56 | $cnt++; 57 | } 58 | echo ""; 59 | $res->free(); 60 | echo ""; 61 | -------------------------------------------------------------------------------- /xinventory/rpc_GETFOLDER.php: -------------------------------------------------------------------------------- 1 | ID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->ID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | $sessionID = null; 23 | if(isset($_RPC_REQUEST->SESSIONID)) 24 | { 25 | if(!UUID::IsUUID($_RPC_REQUEST->SESSIONID)) 26 | { 27 | http_response_code("400"); 28 | exit; 29 | } 30 | setRpcSessionID($_RPC_REQUEST->SESSIONID); 31 | } 32 | 33 | header("Content-Type: text/xml"); 34 | try 35 | { 36 | $principalID = $inventoryService->getPrincipalIDForFolder($_RPC_REQUEST->ID); 37 | $folder = $inventoryService->getFolder($principalID, $_RPC_REQUEST->ID); 38 | echo ""; 39 | echo ""; 40 | echo $folder->toXML("folder", " type=\"List\""); 41 | echo ""; 42 | } 43 | catch(Exception $e) 44 | { 45 | echo ""; 46 | } 47 | -------------------------------------------------------------------------------- /xinventory/rpc_GETFOLDERFORTYPE.php: -------------------------------------------------------------------------------- 1 | PRINCIPAL)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | $sessionID = null; 23 | if(isset($_RPC_REQUEST->SESSIONID)) 24 | { 25 | if(!UUID::IsUUID($_RPC_REQUEST->SESSIONID)) 26 | { 27 | http_response_code("400"); 28 | exit; 29 | } 30 | setRpcSessionID($_RPC_REQUEST->SESSIONID); 31 | } 32 | 33 | header("Content-Type: text/xml"); 34 | 35 | try 36 | { 37 | $folder = $inventoryService->getFolderForType($_RPC_REQUEST->PRINCIPAL, intval($_RPC_REQUEST->TYPE)); 38 | echo ""; 39 | echo ""; 40 | echo $folder->toXML("folder", " type=\"List\""); 41 | echo ""; 42 | } 43 | catch(Exception $e) 44 | { 45 | echo ""; 46 | } 47 | -------------------------------------------------------------------------------- /xinventory/rpc_GETITEM.php: -------------------------------------------------------------------------------- 1 | ID)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->ID)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | $sessionID = null; 23 | if(isset($_RPC_REQUEST->SESSIONID)) 24 | { 25 | if(!UUID::IsUUID($_RPC_REQUEST->SESSIONID)) 26 | { 27 | http_response_code("400"); 28 | exit; 29 | } 30 | setRpcSessionID($_RPC_REQUEST->SESSIONID); 31 | } 32 | 33 | header("Content-Type: text/xml"); 34 | echo ""; 35 | try 36 | { 37 | $principalID = $inventoryService->getPrincipalIDForItem($_RPC_REQUEST->ID); 38 | $item = $inventoryService->getItem($principalID, $_RPC_REQUEST->ID); 39 | getCreatorData($item); 40 | echo ""; 41 | echo $item->toXML("item", " type=\"List\""); 42 | echo ""; 43 | } 44 | catch(Exception $e) 45 | { 46 | trigger_error(get_class($e)." ".$e->getMessage()); 47 | echo ""; 48 | } 49 | -------------------------------------------------------------------------------- /xinventory/rpc_GETROOTFOLDER.php: -------------------------------------------------------------------------------- 1 | PRINCIPAL)) 11 | { 12 | http_response_code("400"); 13 | exit; 14 | } 15 | 16 | if(!UUID::IsUUID($_RPC_REQUEST->PRINCIPAL)) 17 | { 18 | http_response_code("400"); 19 | exit; 20 | } 21 | 22 | $sessionID = null; 23 | if(isset($_RPC_REQUEST->SESSIONID)) 24 | { 25 | if(!UUID::IsUUID($_RPC_REQUEST->SESSIONID)) 26 | { 27 | http_response_code("400"); 28 | exit; 29 | } 30 | setRpcSessionID($_RPC_REQUEST->SESSIONID); 31 | } 32 | 33 | header("Content-Type: text/xml"); 34 | try 35 | { 36 | /* check for inventory being created */ 37 | $inventoryService->verifyInventory($_RPC_REQUEST->PRINCIPAL); 38 | 39 | $rootfolder = $inventoryService->getRootFolder($_RPC_REQUEST->PRINCIPAL); 40 | 41 | echo ""; 42 | echo ""; 43 | echo $rootfolder->toXML("folder", " type=\"List\""); 44 | echo ""; 45 | } 46 | catch(Exception $e) 47 | { 48 | echo ""; 49 | } 50 | 51 | -------------------------------------------------------------------------------- /xinventory/rpc_UPDATEFOLDER.php: -------------------------------------------------------------------------------- 1 | ParentID) or 11 | !isset($_RPC_REQUEST->Type) or 12 | !isset($_RPC_REQUEST->Version) or 13 | !isset($_RPC_REQUEST->Name) or 14 | !isset($_RPC_REQUEST->Owner) or 15 | !isset($_RPC_REQUEST->ID)) 16 | { 17 | http_response_code("400"); 18 | exit; 19 | } 20 | 21 | if(!UUID::IsUUID($_RPC_REQUEST->Owner) or !UUID::IsUUID($_RPC_REQUEST->ID) or 22 | !UUID::IsUUID($_RPC_REQUEST->ParentID)) 23 | { 24 | http_response_code("400"); 25 | exit; 26 | } 27 | 28 | $sessionID = null; 29 | if(isset($_RPC_REQUEST->SESSIONID)) 30 | { 31 | if(!UUID::IsUUID($_RPC_REQUEST->SESSIONID)) 32 | { 33 | http_response_code("400"); 34 | exit; 35 | } 36 | setRpcSessionID($_RPC_REQUEST->SESSIONID); 37 | } 38 | 39 | try 40 | { 41 | $folder = $inventoryService->getFolder($_RPC_REQUEST->Owner, $_RPC_REQUEST->ID); 42 | $folder->Version = intval($_RPC_REQUEST->Version); 43 | $folder->Name = $_RPC_REQUEST->Name; 44 | $inventoryService->storeFolder($folder); 45 | sendBooleanResponse(True); 46 | } 47 | catch(Exception $e) 48 | { 49 | sendBooleanResponse(False); 50 | } 51 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_avatar_interests_update.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 14 | { 15 | return new RPCFaultResponse(4, "Missing struct parameter"); 16 | } 17 | 18 | $structParam = $_RPC_REQUEST->Params[0]; 19 | 20 | 21 | $profileService = getService("Profile"); 22 | 23 | $res = new RPCSuccessResponse(); 24 | $resdata = new RPCStruct(); 25 | $res->Params[] = $resdata; 26 | $resdata->success = False; 27 | $resdata->errorMessage = ""; 28 | try 29 | { 30 | $props = $profileService->getUserProperties($structParam->avatar_id); 31 | $props->WantToMask = $structParam->wantmask; 32 | $props->WantToText = $structParam->wanttext; 33 | $props->SkillsMask = $structParam->skillsmask; 34 | $props->SkillsText = $structParam->skillstext; 35 | $props->Language = $structParam->languages; 36 | 37 | $profileService->updateUserProperties($props); 38 | 39 | $resdata->success = true; 40 | } 41 | 42 | catch(Exception $e) 43 | { 44 | $resdata->errorMessage = $e->getMessage(); 45 | } 46 | 47 | return $res; 48 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_avatar_properties_update.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 14 | { 15 | return new RPCFaultResponse(4, "Missing struct parameter"); 16 | } 17 | 18 | $structParam = $_RPC_REQUEST->Params[0]; 19 | 20 | 21 | $profileService = getService("Profile"); 22 | 23 | $res = new RPCSuccessResponse(); 24 | $resdata = new RPCStruct(); 25 | $res->Params[] = $resdata; 26 | $resdata->success = False; 27 | $resdata->errorMessage = ""; 28 | try 29 | { 30 | $props = $profileService->getUserProperties($structParam->avatar_id); 31 | $props->WebUrl = $structParam->ProfileUrl; 32 | $props->ImageID = $structParam->Image; 33 | $props->AboutText = $structParam->AboutText; 34 | $props->FirstLifeImageID = $structParam->FirstLifeImage; 35 | $props->FirstLifeText = $structParam->FirstLifeAboutText; 36 | 37 | $profileService->updateUserProperties($props); 38 | 39 | $resdata->success = true; 40 | } 41 | 42 | catch(Exception $e) 43 | { 44 | $resdata->errorMessage = $e->getMessage(); 45 | } 46 | 47 | return $res; 48 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_avatarnotesrequest.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 13 | { 14 | return new RPCFaultResponse(4, "Missing struct parameter"); 15 | } 16 | 17 | $profileService = getService("Profile"); 18 | 19 | $structParam = $_RPC_REQUEST->Params[0]; 20 | 21 | $res = new RPCSuccessResponse(); 22 | $resdata = new RPCStruct(); 23 | $res->Params[] = $resdata; 24 | $resnotes = new RPCStruct(); 25 | $resdata->success = false; 26 | $resdata->data = array($resnotes); 27 | 28 | try 29 | { 30 | $resnotes->targetid = $structParam->uuid; 31 | $note = $profileService->getUserNote($structParam->avatar_id, $structParam->uuid); 32 | $resnotes->notes = $note->Notes; 33 | $resdata->success = true; 34 | } 35 | catch(Exception $e) 36 | { 37 | $resdata->success = true; 38 | } 39 | 40 | return $res; 41 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_classified_delete.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 17 | { 18 | return new RPCFaultResponse(4, "Missing struct parameter"); 19 | } 20 | 21 | $structParam = $_RPC_REQUEST->Params[0]; 22 | 23 | if(!isset($structParam->classifiedID)) 24 | { 25 | return new RPCFaultResponse(4, "Missing parameter classifiedID"); 26 | } 27 | 28 | if(!UUID::IsUUID($structParam->classifiedID)) 29 | { 30 | return new RPCFaultResponse(4, "Invalid parameter classifiedID"); 31 | } 32 | 33 | $res = new RPCSuccessResponse(); 34 | $rpcStruct = new RPCStruct(); 35 | $res->Params[] = $rpcStruct; 36 | $rpcStruct->success = False; 37 | $rpcStruct->errorMessage = ""; 38 | 39 | try 40 | { 41 | $profileService = $profileService->deleteClassified($structParam->classifiedID); 42 | $rpcStruct->success = True; 43 | } 44 | catch(Exception $e) 45 | { 46 | $rpcStruct->errorMessage = $e->getMessage(); 47 | } 48 | 49 | return $res; 50 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_dir_events_query.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 16 | { 17 | return new RPCFaultResponse(4, "Missing struct parameter"); 18 | } 19 | 20 | $structParam = $_RPC_REQUEST->Params[0]; 21 | 22 | if(!isset($structParam->text)) 23 | { 24 | return new RPCFaultResponse(4, "Missing parameter text"); 25 | } 26 | 27 | if(!isset($structParam->flags)) 28 | { 29 | return new RPCFaultResponse(4, "Missing parameter flags"); 30 | } 31 | 32 | if(!isset($structParam->query_start)) 33 | { 34 | return new RPCFaultResponse(4, "Missing parameter query_start"); 35 | } 36 | 37 | $rpcResponse = new RPCSuccessResponse(); 38 | $rpcData = new RPCStruct(); 39 | $rpcData->success = True; 40 | $rpcData->errorMessage = "Not supported"; 41 | $rpcResponse->Params[] = $rpcData; 42 | 43 | $data = array(); 44 | $rpcData->data = $data; 45 | 46 | /* enable output compression */ 47 | if(!isset($_GET["rpc_debug"])) 48 | { 49 | ini_set("zlib.output_compression", 4096); 50 | } 51 | 52 | return $rpcResponse; 53 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_event_info_query.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ft-/phpGridServer/2822f567f5b429493ac6dbeb518f398acd77d399/xmlrpc/xmlrpc_event_info_query.php -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_get_uuid.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 13 | { 14 | return new RPCFaultResponse(4, "Missing struct parameter"); 15 | } 16 | 17 | $structParam = $_RPC_REQUEST->Params[0]; 18 | 19 | if(!isset($structParam->first)) 20 | { 21 | return new RPCFaultResponse(4, "Missing parameter first"); 22 | } 23 | 24 | if(!isset($structParam->last)) 25 | { 26 | return new RPCFaultResponse(4, "Missing parameter last"); 27 | } 28 | 29 | /* we do not use the userID , we are directly generating our URLs */ 30 | 31 | $rpcStruct = new RPCStruct(); 32 | $userAccountService = getService("UserAccount"); 33 | try 34 | { 35 | $userAccount = $userAccountService->getAccountByName(null, $structParam->first, $structParam->last); 36 | $rpcStruct->UUID = $userAccount->ID; 37 | } 38 | catch(Exception $e) 39 | { 40 | } 41 | $response = new RPCSuccessResponse(); 42 | $response->InvokeID = $_RPC_REQUEST->InvokeID; 43 | $response->Params[] = $rpcStruct; 44 | 45 | return $response; 46 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_locate_user.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 20 | { 21 | return new RPCFaultResponse(4, "Missing struct parameter"); 22 | } 23 | 24 | $structParam = $_RPC_REQUEST->Params[0]; 25 | 26 | $rpcStruct = new RPCStruct(); 27 | 28 | if(isset($structParam->userID)) 29 | { 30 | try 31 | { 32 | $homeGrid = ServerDataURI::getHome(); 33 | $rpcStruct->URL = $homeGrid->GatekeeperURI; 34 | } 35 | catch(Exception $e) 36 | { 37 | $rpcStruct->result = "Unable to locate user"; 38 | } 39 | } 40 | else 41 | { 42 | $rpcStruct->result = "Unable to locate user"; 43 | } 44 | 45 | $response = new RPCSuccessResponse(); 46 | $response->InvokeID = $_RPC_REQUEST->InvokeID; 47 | $response->Params[] = $rpcStruct; 48 | return $response; 49 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_login_to_simulator.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 13 | { 14 | return new RPCFaultResponse(4, "Missing struct parameter"); 15 | } 16 | 17 | $structParam = $_RPC_REQUEST->Params[0]; 18 | 19 | if(!isset($structParam->pick_id)) 20 | { 21 | return new RPCFaultResponse(-32602, "Missing pick_id"); 22 | } 23 | 24 | if(!UUID::IsUUID($structParam->pick_id)) 25 | { 26 | return new RPCFaultResponse(-32602, "Invalid pick_id"); 27 | } 28 | 29 | require_once("lib/services.php"); 30 | 31 | $profileService = getService("Profile"); 32 | 33 | $res = new RPCSuccessResponse(); 34 | $resdata = new RPCStruct(); 35 | $res->Params[] = $resdata; 36 | $resdata->success = false; 37 | $resdata->errorMessage = ""; 38 | 39 | try 40 | { 41 | $profileService = $profileService->deletePick($structParam->pick_id); 42 | $resdata->success = true; 43 | } 44 | catch(Exception $e) 45 | { 46 | $resdata->errorMessage = $e->getMessage(); 47 | } 48 | 49 | return $res; 50 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_user_preferences_request.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 14 | { 15 | return new RPCFaultResponse(4, "Missing struct parameter"); 16 | } 17 | 18 | $structParam = $_RPC_REQUEST->Params[0]; 19 | 20 | $res = new RPCSuccessResponse(); 21 | $resdata = new RPCStruct(); 22 | $res->Params[] = $resdata; 23 | $resprefs = new RPCStruct(); 24 | $resdata->success = false; 25 | $resdata->data = array($resprefs); 26 | 27 | try 28 | { 29 | $userprefs = $profileService->getUserPreferences($structParam->avatar_id); 30 | $resprefs->imviaemail = $userprefs->ImViaEmail; 31 | $resprefs->visible = $userprefs->Visible; 32 | $resprefs->email = ""; /* no email transferred here */ 33 | $resdata->success = true; 34 | } 35 | catch(Exception $e) 36 | { 37 | trigger_error(get_class($e)." ".$e->getMessage()); 38 | } 39 | 40 | return $res; 41 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_user_preferences_update.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 14 | { 15 | return new RPCFaultResponse(4, "Missing struct parameter"); 16 | } 17 | 18 | $structParam = $_RPC_REQUEST->Params[0]; 19 | 20 | 21 | $profileService = getService("Profile"); 22 | 23 | $res = new RPCSuccessResponse(); 24 | $resdata = new RPCStruct(); 25 | $res->Params[] = $resdata; 26 | $resdata->success = False; 27 | $resdata->errorMessage = ""; 28 | try 29 | { 30 | $userprefs = new UserPreferences(); 31 | $userprefs->UserID = $structParam->avatar_id; 32 | $userprefs->ImViaEmail = $structParam->imViaEmail; 33 | $userprefs->visible = $structParam->visible; 34 | 35 | $profileService->setUserPreferences($userprefs); 36 | 37 | $resdata->success = true; 38 | } 39 | 40 | catch(Exception $e) 41 | { 42 | $resdata->errorMessage = $e->getMessage(); 43 | } 44 | 45 | return $res; 46 | -------------------------------------------------------------------------------- /xmlrpc/xmlrpc_verify_client.php: -------------------------------------------------------------------------------- 1 | Params)!=1) 13 | { 14 | return new RPCFaultResponse(4, "Missing struct parameter"); 15 | } 16 | 17 | $structParam = $_RPC_REQUEST->Params[0]; 18 | 19 | if(!isset($structParam->token)) 20 | { 21 | return new RPCFaultResponse(4, "Missing parameter token"); 22 | } 23 | 24 | if(!isset($structParam->sessionID)) 25 | { 26 | return new RPCFaultResponse(4, "Missing parameter sessionID"); 27 | } 28 | 29 | if(!UUID::IsUUID($structParam->sessionID)) 30 | { 31 | return new RPCFaultResponse(4, "Invalid sessionID"); 32 | } 33 | 34 | $hgTravelingDataService = getService("HGTravelingData"); 35 | 36 | $rpcStruct = new RPCStruct(); 37 | $rpcStruct->result = "false"; 38 | try 39 | { 40 | $hgTravelingData = $hgTravelingDataService->getHGTravelingData($structParam->sessionID); 41 | if($hgTravelingData->ClientIPAddress != $structParam->token) 42 | { 43 | throw new Exception(); 44 | } 45 | $rpcStruct->result = "true"; 46 | } 47 | catch(Exception $e) 48 | { 49 | 50 | } 51 | 52 | 53 | $response = new RPCSuccessResponse(); 54 | $response->InvokeID = $_RPC_REQUEST->InvokeID; 55 | $response->Params[] = $rpcStruct; 56 | return $response; 57 | --------------------------------------------------------------------------------