Functions
server_access.php File Reference

This file is used as the "switchboard" for satellite servers. It keys on the supplied query parameters, and returns XHTML-compliant XML that can be embedded directly into a Web page, or transformed via XSLT. More...

Functions

 parse_redirect (&$server)
 Queries the local server, and returns processed XHTML, JSON, CSV or XML.
 GetServerInfo (&$in_server)
 This returns a string that contains an XML page with info about the server.
 GetServerLanguages (&$in_server)
 This returns a string that contains a comma-delimited list of all the languages supported by the server. Each language is represented by the code, first, then the string name. Example: '"en","English","es","Espa–ol"'.
 GetServiceBodies (&$in_server)
 This returns an array, containing the supported Service bodies from the server. Nested bodies are represented by nested objects.
 sb_array_XML ($in_array)
 Converts a Service Bodies array to an XML string.
 GetServiceBodyArray (&$in_service_body_ar)
 This returns an array, containing one Service body, along with any nested Service bodies.
 GetHeaderXHTML (&$in_server, $in_http_vars)
 This returns a string that is the embedded XHTML to be placed in the page >head< element. However, we can return just the style files or the script files, in space-delimited lists. These are meant to be broken up and used.
 GetSimpleSearchForm (&$in_server, $in_http_vars)
 This returns the basic search form.
 GetOneMeeting (&$in_server, $in_http_vars)
 This returns a single meeting.
 GetSearchResults ($in_http_vars)
 This returns the search results, in whatever form was requested.
 HandleDefault ($in_http_vars)
 Handles no command supplied (error)
 HandleNoServer ()
 Handles no server available (error).
 RedirectAJAX ($in_http_vars)
 This redirects AJAX calls, so that we don't have cross- domain AJAX (not allowed by browsers, as a security risk).

Detailed Description

This file is used as the "switchboard" for satellite servers. It keys on the supplied query parameters, and returns XHTML-compliant XML that can be embedded directly into a Web page, or transformed via XSLT.

This file is part of the Basic Meeting List Toolbox (BMLT).

Find out more at: http://magshare.org/bmlt

BMLT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

BMLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this code. If not, see <http://www.gnu.org/licenses/>.


Function Documentation

GetHeaderXHTML ( &$  in_server,
in_http_vars 
)

This returns a string that is the embedded XHTML to be placed in the page >head< element. However, we can return just the style files or the script files, in space-delimited lists. These are meant to be broken up and used.

Returns:
XHTML-compliant XML.
Parameters:
in_serverA reference to an instance of c_comdef_server
in_http_varsThe HTTP GET and POST parameters.
GetOneMeeting ( &$  in_server,
in_http_vars 
)

This returns a single meeting.

Returns:
XHTML-compliant XML.
Parameters:
in_serverA reference to an instance of c_comdef_server
in_http_varsThe HTTP GET and POST parameters.
GetSearchResults ( in_http_vars)

This returns the search results, in whatever form was requested.

Returns:
XHTML-compliant XML.
Parameters:
in_http_varsThe HTTP GET and POST parameters.
GetServerInfo ( &$  in_server)

This returns a string that contains an XML page with info about the server.

Returns:
an XML string that contains the pertinent info (at the moment, only the version).
Parameters:
in_serverA reference to an instance of c_comdef_server

Referenced by parse_redirect().

GetServerLanguages ( &$  in_server)

This returns a string that contains a comma-delimited list of all the languages supported by the server. Each language is represented by the code, first, then the string name. Example: '"en","English","es","Espa–ol"'.

Returns:
a comma-separated values string. Each value is wrapped in double-quotes.
Parameters:
in_serverA reference to an instance of c_comdef_server

Referenced by parse_redirect().

GetServiceBodies ( &$  in_server)

This returns an array, containing the supported Service bodies from the server. Nested bodies are represented by nested objects.

Returns:
an array, ready for XMLIzing or JSONizing.
Parameters:
in_serverA reference to an instance of c_comdef_server

Referenced by parse_redirect().

GetServiceBodyArray ( &$  in_service_body_ar)

This returns an array, containing one Service body, along with any nested Service bodies.

Returns:
an array, ready for XMLizing or JSONizing.
Parameters:
in_service_body_arThis is a reference to an array, as returned by c_comdef_server::GetServiceBodyArrayHierarchical().

Referenced by c_comdef_server::GetAllServiceIDs(), and GetServiceBodies().

GetSimpleSearchForm ( &$  in_server,
in_http_vars 
)

This returns the basic search form.

Returns:
XHTML-compliant XML.
Parameters:
in_serverA reference to an instance of c_comdef_server
in_http_varsThe HTTP GET and POST parameters.
HandleDefault ( in_http_vars)

Handles no command supplied (error)

Returns:
English error string (not XML).
Parameters:
in_http_varsThe HTTP GET and POST parameters.
HandleNoServer ( )

Handles no server available (error).

Returns:
null;
parse_redirect ( &$  server)

Queries the local server, and returns processed XHTML, JSON, CSV or XML.

This requires that the "switcher=" parameter be set in the GET or POST parameters:

  • 'GetServerInfo'
  • 'GetServerInfoXML' Returns XML, with info about the server.
  • 'GetServerLanguages'
  • 'GetServerLanguagesCSV' Returns a CSV of the languages supported by this server.
  • 'GetServiceBodiesJSON' Returns a JSON object, with the supported Service bodies.
  • 'GetServiceBodiesXML' Returns XML data (very simple and raw), with the supported Service bodies.
  • 'GetHeaderXHTML' Returns the head stuff for the displayed page.
  • 'GetSimpleSearchForm' Returns the search form.
  • 'GetOneMeeting' Return a meeting, based on an ID.
  • 'GetMeetingsByID' Return an array of meetings, based on an array of IDs
  • 'GetSearchResults' This returns the search results.
  • 'RedirectAJAX' This is used to redirect AJAX calls, as cross-domain calls are barred.
Returns:
XHTML-compliant XML.
Parameters:
serverA reference to an instance of c_comdef_server
RedirectAJAX ( in_http_vars)

This redirects AJAX calls, so that we don't have cross- domain AJAX (not allowed by browsers, as a security risk).

Returns:
a JSON-compliant string.
Parameters:
in_http_varsThe HTTP GET and POST parameters.
sb_array_XML ( in_array)

Converts a Service Bodies array to an XML string.

Referenced by parse_redirect().

 All Classes Files Functions Variables Enumerations