BMLT_Satellite.class.php

Go to the documentation of this file.
00001 <?php
00002 /***********************************************************************/
00003 /**     \file   BMLT_satellite.class.php
00004 
00005     \version 1.5.3
00006 
00007     \brief  This is a class that implements a BMLT Satellite/Client server.
00008     
00009     This is a "SINGLETON" pattern class, which means that it allows only
00010     one instance of the class to be in existence, and all references to the
00011     class go to that instance.
00012     
00013     It handles communications with the root server, and outputs the appropriate
00014     XHTML through a couple of simple functions.
00015 */
00016 /**************************************************************************/
00017 /**
00018     \class  BMLT_Satellite
00019     
00020     \brief  This is the implementation of a standalone BMLT satellite server.
00021     
00022     It is meant to be instantiated in a simple PHP file, with a few calls to
00023     the BMLT_Satellite::Execute() function to deliver the XHTML to be displayed.
00024 */
00025 class BMLT_Satellite
00026     {
00027     /***********************************************************************/
00028     /// This is static stuff that comprises the way the class is accessed.
00029     /***********************************************************************/
00030 
00031     /// Data Members
00032     static private  $bmlt_instance = null;  ///< This will be the only instance of this class.
00033 
00034     /// Functions
00035     /***********************************************************************/
00036     /**
00037         \brief This is how clients will instantiate the BMLT. Either a new
00038         instance is created, or we get the current one.
00039     */
00040     static function MakeBMLT (  $is_csv = false,        ///< If true, then this object will be used for CSV data.
00041                                 $in_http_vars = null    ///< These contain alternatives to the $_GET and/or $_POST parameters. Default is null.
00042                             )
00043         {
00044         if ( !$in_http_vars )
00045             {
00046             $in_http_vars = array_merge_recursive ( $_GET, $_POST );
00047             }
00048         
00049         // If an instance does not already exist, we instantiate a new one.
00050         if ( !(self::$bmlt_instance instanceof BMLT_Satellite) )
00051             {
00052             // Include our configuration directives and variables.
00053             include_once ( dirname ( __FILE__ )."/config.inc" );
00054             
00055             if ( is_array ( $preset_service_bodies ) && count ( $preset_service_bodies ) )
00056                 {
00057                 // We do it this way, just to make sure we're adding to the correct place. The idea is to integrate smoothly into however the user is specifying.
00058                 if ( is_array ( $in_http_vars ) && count ( $in_http_vars ) )
00059                     {
00060                     // We allow the user to override the preference
00061                     if ( !isset ( $in_http_vars['preset_service_bodies'] ) )
00062                         {
00063                         $in_http_vars['preset_service_bodies'] = $preset_service_bodies;
00064                         }
00065                     }
00066                 else
00067                     {
00068                     if ( !isset ( $_GET['preset_service_bodies'] ) && !isset ( $_POST['preset_service_bodies'] ) )
00069                         {
00070                         $in_http_vars = array_merge_recursive ( $_GET, $_POST );
00071                         $in_http_vars['preset_service_bodies'] = $preset_service_bodies;
00072                         }
00073                     }
00074                 }
00075             
00076             if ( !isset ( $in_http_vars['search_spec_map_center'] ) )
00077                 {
00078                 $in_http_vars['search_spec_map_center'] = "$map_center_latitude,$map_center_longitude,$map_zoom";
00079                 }
00080 
00081             // When we create a new instance, we load it with our configuration.
00082             self::$bmlt_instance = new BMLT_Satellite ( $root_server_root, $gkey_my, $support_old_browsers, $bmlt_initial_view, $is_csv, $in_http_vars, $lang_enum );
00083             }
00084         
00085         return self::$bmlt_instance;
00086         }
00087     
00088     /***********************************************************************/
00089     /**
00090         \brief see if we are dealing with a mobile browser that uses a small screen and limited bandwidth.
00091         
00092         \returns a Boolean. True if the browser is one that should get the special version of our site.
00093     */
00094     static function is_mobile ( $in_http_vars = null    ///< The HTTP GET and POST variables. If not supplied, we try GET first, then POST.
00095                                 )
00096         {
00097         $ret = isset ( $in_http_vars['simulate_iphone'] ) || preg_match ( '/ipod/i', $_SERVER['HTTP_USER_AGENT'] ) || preg_match ( '/iphone/i', $_SERVER['HTTP_USER_AGENT'] );
00098         
00099         if ( !$ret )
00100             {
00101             $ret = isset ( $in_http_vars['simulate_android'] ) || preg_match ( '/android/i', $_SERVER['HTTP_USER_AGENT'] );
00102             }
00103     
00104         if ( !$ret )
00105             {
00106             $ret = isset ( $in_http_vars['simulate_blackberry'] ) || preg_match ( '/blackberry/i', $_SERVER['HTTP_USER_AGENT'] );
00107             }
00108     
00109         if ( !$ret )
00110             {
00111             $ret = isset ( $in_http_vars['simulate_opera_mini'] ) || preg_match ( "/opera\s+mini/i", $_SERVER['HTTP_USER_AGENT'] );
00112             }
00113         
00114         return $ret;
00115         }
00116     
00117     /**
00118         \brief This is a function that returns the results of an HTTP call to a URI.
00119         It is a lot more secure than file_get_contents, but does the same thing.
00120         
00121         \returns a string, containing the response. Null if the call fails to get any data.
00122     */
00123     static function call_curl ( $in_uri,                ///< A string. The URI to call.
00124                                 $in_post = false,       ///< If false, the transaction is a GET, not a POST. Default is true.
00125                                 &$http_status = null    ///< Optional reference to a string. Returns the HTTP call status.
00126                                 )
00127         {
00128         $ret = null;
00129         
00130         // If the curl extension isn't loaded, we try one backdoor thing. Maybe we can use file_get_contents.
00131         if ( !extension_loaded ( 'curl' ) )
00132             {
00133             if ( ini_get ( 'allow_url_fopen' ) )
00134                 {
00135                 $ret = file_get_contents ( $in_uri );
00136                 }
00137             }
00138         else
00139             {
00140             // Create a new cURL resource.
00141             $resource = curl_init();
00142             
00143             // If we will be POSTing this transaction, we split up the URI.
00144             if ( $in_post )
00145                 {
00146                 $spli = explode ( "?", $in_uri, 2 );
00147                 
00148                 if ( is_array ( $spli ) && count ( $spli ) )
00149                     {
00150                     $in_uri = $spli[0];
00151                     $in_params = $spli[1];
00152                     // Convert query string into an array using parse_str(). parse_str() will decode values along the way.
00153                     parse_str($in_params, $temp);
00154                     
00155                     // Now rebuild the query string using http_build_query(). It will re-encode values along the way.
00156                     // It will also take original query string params that have no value and appends a "=" to them
00157                     // thus giving them and empty value.
00158                     $in_params = http_build_query($temp);
00159                 
00160                     curl_setopt ( $resource, CURLOPT_POST, true );
00161                     curl_setopt ( $resource, CURLOPT_POSTFIELDS, $in_params );
00162                     }
00163                 }
00164             
00165             // Set url to call.
00166             curl_setopt ( $resource, CURLOPT_URL, $in_uri );
00167             
00168             // Make curl_exec() function (see below) return requested content as a string (unless call fails).
00169             curl_setopt ( $resource, CURLOPT_RETURNTRANSFER, true );
00170             
00171             // By default, cURL prepends response headers to string returned from call to curl_exec().
00172             // You can control this with the below setting.
00173             // Setting it to false will remove headers from beginning of string.
00174             // If you WANT the headers, see the Yahoo documentation on how to parse with them from the string.
00175             curl_setopt ( $resource, CURLOPT_HEADER, false );
00176             
00177             // Allow  cURL to follow any 'location:' headers (redirection) sent by server (if needed set to true, else false- defaults to false anyway).
00178             // Disabled, because some servers disable this for security reasons.
00179 //          curl_setopt ( $resource, CURLOPT_FOLLOWLOCATION, true );
00180             
00181             // Set maximum times to allow redirection (use only if needed as per above setting. 3 is sort of arbitrary here).
00182             curl_setopt ( $resource, CURLOPT_MAXREDIRS, 3 );
00183             
00184             // Set connection timeout in seconds (very good idea).
00185             curl_setopt ( $resource, CURLOPT_CONNECTTIMEOUT, 10 );
00186             
00187             // Direct cURL to send request header to server allowing compressed content to be returned and decompressed automatically (use only if needed).
00188             curl_setopt ( $resource, CURLOPT_ENCODING, 'gzip,deflate' );
00189             
00190             // Execute cURL call and return results in $content variable.
00191             $content = curl_exec ( $resource );
00192             
00193             // Check if curl_exec() call failed (returns false on failure) and handle failure.
00194             if ( $content === false )
00195                 {
00196                 // Cram as much info into the error message as possible.
00197                 die ( '<pre>curl failure calling $in_uri, '.curl_error ( $resource )."\n".curl_errno ( $resource ).'</pre>' );
00198                 }
00199             else
00200                 {
00201                 // Do what you want with returned content (e.g. HTML, XML, etc) here or AFTER curl_close() call below as it is stored in the $content variable.
00202             
00203                 // You MIGHT want to get the HTTP status code returned by server (e.g. 200, 400, 500).
00204                 // If that is the case then this is how to do it.
00205                 $http_status = curl_getinfo ($resource, CURLINFO_HTTP_CODE );
00206                 }
00207             
00208             // Close cURL and free resource.
00209             curl_close ( $resource );
00210             
00211             // Maybe echo $contents of $content variable here.
00212             if ( $content !== false )
00213                 {
00214                 $ret = $content;
00215                 }
00216             }
00217         
00218         return $ret;
00219         }
00220 
00221     /***********************************************************************/
00222     /// All this stuff is dynamic stuff that applies directly to the instance.
00223     /***********************************************************************/
00224     
00225     /// Data members
00226     var $root_server_root = '';         ///< The root server URI.
00227     var $root_server_uri = '';          ///< The root server URI, with the API entrypoint added.
00228     var $gkey = '';                     ///< The Google Maps API Key.
00229     var $support_old_browsers = true;   ///< true, if we will support older, non-JavaScript browsers.
00230     var $bmlt_initial_view = '';        ///< Specifies the initial Basic Search view ('text', 'map' or '', which is the root server decides).
00231     var $http_vars = '';                ///< This is the combined GET and POST HTTP parameters.
00232     var $params = '';                   ///< This is a parameter list that is appended to URIs.
00233     var $ajax_call = false;             ///< true, if the object needs to execute an ajax call immediately.
00234     var $lang_enum = null;              ///< Set this to a desired language (If null, the server decides -null is default).
00235     var $csv_call = false;              ///< If this is true, then this instance will be used for CSV. Default is false.
00236     
00237     /// Functions
00238     /***********************************************************************/
00239     /**
00240         \brief  We make the constructor private, so this class isn't instantiated on its own.
00241     */
00242     private function __construct (  $in_root_server_root,       ///< This is the root server main_server URI. Ignored if $in_csv_call is true.
00243                                     $in_gkey,                   ///< This is the Google Maps API Key to be used. Ignored if $in_csv_call is true.
00244                                     $in_support_old_browsers,   ///< If this is true, then the 'supports_ajax' check will be made. Ignored if $in_csv_call is true.
00245                                     $in_bmlt_initial_view,      ///< This can be 'text' or 'map'. It determines the initial view of the Basic Search. Ignored if $in_csv_call is true.
00246                                     $in_csv_call = false,       ///< If this is true, then this instance will be used for CSV. Default is false.
00247                                     $in_http_vars = null,       ///< These contain alternatives to the $_GET and/or $_POST parameters. Default is null.
00248                                     $in_lang_enum = null        ///< Set this to a desired language (If null, the server decides -null is default).
00249                                 )
00250         {
00251         $this->http_vars = array ( $_GET, $_POST );
00252         if ( !isset ( $this->http_vars['advanced_search_mode'] ) || !$this->http_vars['advanced_search_mode'] )
00253             {
00254             unset ( $this->http_vars['result_type_advanced'] );
00255             }
00256         
00257         if ( is_array ( $in_http_vars ) && count ( $in_http_vars ) )
00258             {
00259             if ( !isset ( $in_http_vars['advanced_search_mode'] ) || !$in_http_vars['advanced_search_mode'] )
00260                 {
00261                 unset ( $in_http_vars['result_type_advanced'] );
00262                 }
00263 
00264             foreach ( $in_http_vars as $key => $value )
00265                 {
00266                 if ( isset ( $key ) && !isset ( $this->http_vars[$key] ) )
00267                     {
00268                     if ( !isset ( $value ) )
00269                         {
00270                         $value = null;
00271                         }
00272                     
00273                     $this->http_vars[$key] = $value;
00274                     }
00275                 }
00276             }
00277         
00278         // Set up our internal data members.
00279         $this->csv_call = $in_csv_call;
00280         $this->root_server_root = $in_root_server_root;
00281         $this->root_server_uri = $this->root_server_root.'client_interface/'.(($this->csv_call == true) ? 'csv' : 'xhtml').'/index.php';
00282         $this->gkey = $in_gkey;
00283         $this->support_old_browsers = $in_support_old_browsers;
00284         $this->bmlt_initial_view = $in_bmlt_initial_view;
00285         $this->ajax_call = false;
00286         $this->lang_enum = $in_lang_enum;
00287         
00288         if ( self::is_mobile ( $this->http_vars ) )
00289             {
00290             header ( 'Location: '.$this->root_server_root );
00291             }
00292         
00293         // If there is no particular call for a function, we default to the search form.
00294         if (    !(isset ( $this->http_vars['redirect_ajax'] ) && $this->http_vars['redirect_ajax'])
00295             &&  !$this->csv_call
00296             &&  !isset ( $this->http_vars['search_form'] )
00297             &&  !isset ( $this->http_vars['result_type_advanced'] )
00298             &&  !isset ( $this->http_vars['single_meeting_id'] )
00299             &&  !isset ( $this->http_vars['do_search'] )
00300             &&  !isset ( $this->http_vars['search_form'] )
00301             )
00302             {
00303             // Default to the search form
00304             $this->http_vars['search_form'] = true;
00305             }
00306         
00307         // These are basic settings for a satellite call.
00308         $this->http_vars['script_name'] = $_SERVER['SCRIPT_NAME'];
00309         $this->http_vars['satellite'] = $_SERVER['SCRIPT_NAME'];
00310         $this->http_vars['satellite_standalone'] = 1;
00311         
00312         // If we don't support old browsers, we assume that we can handle AJAX.
00313         if ( !$this->support_old_browsers )
00314             {
00315             $this->http_vars['supports_ajax'] = 'yes';
00316             $this->http_vars['no_ajax_check'] = 'yes';
00317             }
00318         else
00319             {
00320             // Otherwise, we make sure that the server does an AJAX check.
00321             unset ( $this->http_vars['no_ajax_check'] );
00322             }
00323         
00324         $this->http_vars['start_view'] = $this->bmlt_initial_view;
00325 
00326         $this->http_vars['gmap_key'] = $this->gkey;
00327         
00328         if ( isset ( $this->lang_enum ) && $this->lang_enum )
00329             {
00330             $this->http_vars['lang_enum'] = $this->lang_enum;
00331             }
00332         
00333         // We build a parameter list string to append to our cURL calls.
00334         $this->params = '';
00335         
00336         foreach ( $this->http_vars as $key => $value )
00337             {
00338             if ( $key != 'switcher' )   // We don't propagate switcher.
00339                 {
00340                 // If the value is an array, we handle it differently.
00341                 if ( is_array ( $value ) )
00342                     {
00343                     foreach ( $value as $val )
00344                         {
00345                         $this->params .= '&'.urlencode ( $key );
00346                         // If a nested array, well, we just join it with commas.
00347                         if ( is_array ( $val ) )
00348                             {
00349                             $val = join ( ",", $val );
00350                             }
00351                         // The key needs the brackets to indicate an array value.
00352                         $this->params .= "%5B%5D=". urlencode ( $val );
00353                         }
00354                     
00355                     // Stop the process here.
00356                     $key = null;
00357                     }
00358                 
00359                 // If we have a key, we add that here.
00360                 if ( isset ( $key ) )
00361                     {
00362                     $this->params .= '&'.urlencode ( $key );
00363                     
00364                     // We only add value if its called for.
00365                     if ( $value )
00366                         {
00367                         $this->params .= "=". urlencode ( $value );
00368                         }
00369                     }
00370                 }
00371             }
00372         
00373         // Okay, at this point, we're loaded for bear. We have our HTTP variables sorted out,
00374         // and a set of parameters ready to slap onto any outgoing URIs.
00375         
00376         // If we need to do an AJAX call, that has to be done right away. We actually just kill the whole shebang, right here.
00377         if ( isset ( $this->http_vars['redirect_ajax'] ) && $this->http_vars['redirect_ajax'] )
00378             {
00379             $this->ajax_call = true;
00380             die ( $this->Execute() );
00381             }
00382         elseif ( !$this->csv_call && isset ( $this->http_vars['result_type_advanced'] ) && $this->http_vars['result_type_advanced'] && (($this->http_vars['result_type_advanced'] == 'booklet') || ($this->http_vars['result_type_advanced'] == 'listprint')))
00383             {
00384             die ( $this->Execute() );
00385             }
00386         }
00387     
00388     /***********************************************************************/
00389     /**
00390         \brief Performs the function necessary to provide the relevant content.
00391         
00392         This is the meat of this little class. It needs to be called in order to
00393         fetch the relevant data from the root server, and output it to the browser.
00394         
00395         \returns a string, containing the XHTML to be displayed.
00396     */
00397     function Execute ( $in_phase = null,        /**< A string, containing a particular execution phase.
00398                                                     - 'head'
00399                                                         This is a request to return the XHTML header stuff
00400                                                         If the $this->csv_call data member is set, then this is ignored.
00401                                                 
00402                                                     - 'csv'
00403                                                         This means that a speacial comma-separated-values call will be made.
00404                                                         In this case, the $this->http_vars parameter will contain the necessary search criteria.
00405                                                         If the $this->csv_call data member is set, then this is not necessary.
00406                                                 */
00407                         $in_http_vars = null    ///< These contain alternatives to the $_GET and/or $_POST parameters. Default is null.
00408                     )
00409         {
00410         $content = '';
00411 
00412         if ( $this->csv_call && ('csv' != $in_phase) && ('csv_formats' != $in_phase) )
00413             {
00414             $in_phase = 'csv';
00415             }
00416         
00417         // If we have special instructions for the object, they are given here.
00418         if ( is_array ( $in_http_vars ) && count ( $in_http_vars ) )
00419             {
00420             if ( !isset ( $in_http_vars['advanced_search_mode'] ) || !$in_http_vars['advanced_search_mode'] )
00421                 {
00422                 unset ( $in_http_vars['result_type_advanced'] );
00423                 }
00424             
00425             if ( isset ( $this->lang_enum ) && $this->lang_enum )
00426                 {
00427                 $this->http_vars['lang_enum'] = $this->lang_enum;
00428                 }
00429 
00430             $this->http_vars = $in_http_vars;
00431             // We build a parameter list string to append to our cURL calls.
00432             $this->params = '';
00433             
00434             foreach ( $this->http_vars as $key => $value )
00435                 {
00436                 if ( $key != 'switcher' )   // We don't propagate switcher..
00437                     {
00438                     // If the value is an array, we handle it differently.
00439                     if ( is_array ( $value ) )
00440                         {
00441                         foreach ( $value as $val )
00442                             {
00443                             $this->params .= '&'.urlencode ( $key );
00444                             // If a nested array, well, we just join it with commas.
00445                             if ( is_array ( $val ) )
00446                                 {
00447                                 $val = join ( ",", $val );
00448                                 }
00449                             // The key needs the brackets to indicate an array value.
00450                             $this->params .= "%5B%5D=". urlencode ( $val );
00451                             }
00452                         
00453                         // Stop the process here.
00454                         $key = null;
00455                         }
00456                     
00457                     // If we have a key, we add that here.
00458                     if ( isset ( $key ) )
00459                         {
00460                         $this->params .= '&'.urlencode ( $key );
00461                         
00462                         // We only add value if its called for.
00463                         if ( $value )
00464                             {
00465                             $this->params .= "=". urlencode ( $value );
00466                             }
00467                         }
00468                     }
00469                 }
00470             }
00471         
00472         // If we are in an AJAX callback, we get the AJAX data right now. It will return JSON data, not XHTML.
00473         if ( $this->ajax_call )
00474             {
00475             $uri = "$this->root_server_uri?switcher=RedirectAJAX$this->params";
00476             $content = self::call_curl ( $uri );
00477             }
00478         else
00479             {
00480             switch ( $in_phase )
00481                 {
00482                 case 'csv':     // This is used for the special CSV call. If you don't know what it is, don't worry.
00483                     // We simply call the CSV return directly, with the given parameters.
00484                     $uri = "$this->root_server_uri?switcher=GetSearchResults$this->params";
00485                     $content .= self::call_curl ( $uri );
00486                 break;
00487                 
00488                 case 'csv_formats':     // This is used for the special CSV call. If you don't know what it is, don't worry.
00489                     // We simply call the CSV return directly, with the given parameters.
00490                     $uri = "$this->root_server_uri?switcher=GetFormats$this->params";
00491                     $content .= self::call_curl ( $uri );
00492                 break;
00493                 
00494                 case 'simple_formats':      // This is used for the special "simple" call for getting the formats. If you don't know what it is, don't worry.
00495                     // We simply call the CSV return directly, with the given parameters.
00496                     $uri = str_replace("/xhtml","/simple",$this->root_server_uri)."?switcher=GetFormats$this->params";
00497                     $content .= self::call_curl ( $uri );
00498                 break;
00499                 
00500                 case 'simple_meetings':     // This is used for the special "simple" call. If you don't know what it is, don't worry.
00501                     // We simply call the CSV return directly, with the given parameters.
00502                     $uri = str_replace("/xhtml","/simple",$this->root_server_uri)."?switcher=GetSearchResults$this->params";
00503                     $content .= self::call_curl ( $uri );
00504                 break;
00505                 
00506                 case 'doctype': // This generates the appropriate DOCTYPE and <html> element for the implementation.
00507                     $content = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
00508                     // In the future, we'll be adding more doctypes here.
00509                 break;
00510                 
00511                 case 'head':    // Sent out to the <head> element.
00512                     // If we don't support old browsers, we style the noscript.
00513                     if ( !$this->support_old_browsers )
00514                         {
00515                         $content = '<style type="text/css">.bmlt_no_js {text-align:center;font-weight:bold;font-size: large;color:red;}</style>';
00516                         }
00517                     
00518                     $uri = "$this->root_server_uri?switcher=GetHeaderXHTML$this->params";
00519                     $content .= self::call_curl ( $uri );
00520                 break;
00521                 
00522                 default:    // Sent out to the <body> element.
00523                     if ( isset ( $this->http_vars['result_type_advanced'] ) && ($this->http_vars['result_type_advanced'] == 'booklet') )
00524                         {
00525                         if ( $use_local_pdf_generator )
00526                             {
00527                             $uri = ".";
00528                             }
00529                         else
00530                             {
00531                             $uri = $this->root_server_root."local_server";
00532                             }
00533                     
00534                         $uri .= "/pdf_generator/?list_type=booklet$this->params";
00535                         
00536                         header ( "Location: $uri" );
00537                         die();
00538                         }
00539                     elseif ( isset ( $this->http_vars['result_type_advanced'] ) && ($this->http_vars['result_type_advanced'] == 'listprint') )
00540                         {
00541                         if ( $use_local_pdf_generator )
00542                             {
00543                             $uri = ".";
00544                             }
00545                         else
00546                             {
00547                             $uri = $this->root_server_root."local_server";
00548                             }
00549                     
00550                         $uri .= "/pdf_generator/?list_type=listprint$this->params";
00551                         
00552                         header ( "Location: $uri" );
00553                         die();
00554                         }
00555                     else
00556                         {
00557                         // If we don't support old browsers, we send out a noscript.
00558                         if ( !$this->support_old_browsers )
00559                             {
00560                             $content = '<noscript class="no_js"><div>This Meeting Search will not work because your browser does not support JavaScript. However, you can use the <a href="'.htmlspecialchars ( $this->root_server_root ).'">main server</a>.</div></noscript>';
00561                             }
00562                         if ( isset ( $this->http_vars['single_meeting_id'] ) && $this->http_vars['single_meeting_id'] )
00563                             {
00564                             // If only one meeting is being displayed, we do so here.
00565                             $uri = "$this->root_server_uri?switcher=GetOneMeeting$this->params";
00566                             $content .= self::call_curl ( $uri );
00567                             }
00568                         elseif ( isset ( $this->http_vars['do_search'] ) )
00569                             {
00570                             // If a search was done, we display that here.
00571                             $uri = "$this->root_server_uri?switcher=GetSearchResults$this->params";
00572                             $content .= self::call_curl ( $uri );
00573                             }
00574                         if ( isset ( $this->http_vars['search_form'] ) )
00575                             {
00576                             // Just put up the search specification form.
00577                             $uri = "$this->root_server_uri?switcher=GetSimpleSearchForm$this->params";
00578                             $content .= self::call_curl ( $uri );
00579                             }
00580                         }
00581                 break;
00582                 }
00583             }
00584         
00585         return $content;
00586         }
00587     };
00588 ?>
 All Data Structures Files Functions Variables Enumerations