// Setup the url.
$url = $calendarUrl . 'schedule.php';
+
+ // Check for $_REQUEST array and put into url
+ if ( isset( $_REQUEST['dock'] ) ) {
+ $urlParams[] = 'dock=' . $_REQUEST['dock'];
+ }
+ if ( isset( $_REQUEST['departDate'] ) ) {
+ $urlParams[] = 'departDate=' . $_REQUEST['departDate'];
+ }
+ if ( !empty( $urlParams ) ) {
+ $url .= '?' . implode( '&', $urlParams );
+ }
$curl = curl_init( $url );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_USERPWD, 'dev55:Glm15Keep!' );
$this->wpdb = $wpdb;
$this->config = $config;
- //parent::__construct(false, false);
-
- if ( $this->config['settings']['use_venue_locations'] ) {
- $this->getMemberList();
- }
-
}
/**
* modelAction
$view = 'bibcoSearch';
$settings = array();
$content = '';
- $mainSchedId = false;
// Get the options for bibco
$bibcoOptions = unserialize( get_option( GLM_MEMBERS_APIS_BIBCO_OPTION_NAME ) );
$calendarUrl = ( isset( $bibcoOptions['calendarUrl'] ) ) ? $bibcoOptions['calendarUrl'] : '';
+ // enqueue styles and scripts for the schedule form.
+ wp_enqueue_style('jquery-ui');
+ wp_enqueue_style('plugin_name-admin-ui-css',
+ 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/cupertino/jquery-ui.css',
+ false,
+ '1.0',
+ false
+ );
+ wp_register_script(
+ 'glm_api_dummy_script',
+ GLM_MEMBERS_APIS_PLUGIN_BASE_URL . '/js/dummy.js',
+ array('jquery-ui-datepicker'),
+ '1.0',
+ true
+ );
+
+ wp_enqueue_script('glm_api_dummy_script');
+
// Setup the url.
$url = $calendarUrl . 'scheduleSearch.php';
+
$curl = curl_init( $url );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_USERPWD, 'dev55:Glm15Keep!' );
$content = curl_exec( $curl );
curl_close( $curl );
+ // Once you get the content replace ACTION_URL
+ $content = str_replace( 'ACTION_URL', get_permalink(), $content );
+
$templateData = array(
'content' => $content,
);
'menu' => 'apis',
'action' => 'bibcoSearch',
'table' => false,
- 'attribute' => array(
- 'template' => false
+ 'attributes' => array(
+ //'template' => false
)
),
);
</td>
</tr>
<tr>
- <th>[glm-members-api-golf-directory]</th>
+ <th>[glm-members-api-bibco-search]</th>
<td> </td>
<td width="50%">
- Pulls in the Directory for Harbor Point Golf Club
+ Pulls in the Search for Bibco
</td>
</tr>
<tr>
- <th>[glm-members-api-bibco-search]</th>
+ <th>[glm-members-api-golf-directory]</th>
<td> </td>
<td width="50%">
- Pulls in the Search for Bibco
+ Pulls in the Directory for Harbor Point Golf Club
</td>
</tr>
';
'apis' => array(
'schedule' => GLM_MEMBERS_APIS_PLUGIN_SLUG,
'bibcoCalendar' => GLM_MEMBERS_APIS_PLUGIN_SLUG,
+ 'bibcoSearch' => GLM_MEMBERS_APIS_PLUGIN_SLUG,
'golfclubDirectory' => GLM_MEMBERS_APIS_PLUGIN_SLUG,
),
)