--- /dev/null
+<?php
+/**
+ * list.php
+ *
+ */
+
+/**
+ * GlmMembersFront_itinerary_list
+ *
+ * @uses GlmDataItinerary
+ * @package GlmMemberItinerary
+ * @version 0.0.1
+ * @copyright Copyright (c) 2010 All rights reserved.
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license PHP Version 3.0 {@link http://www.php.net/license/3_0.txt}
+ */
+class GlmMembersFront_itinerary_button // extends GlmMembersFront_events_baseAction
+{
+ /**
+ * Constructor
+ *
+ * This constructor performs the work for this model. This model returns
+ * an array containing the following.
+ *
+ * 'status'
+ *
+ * True if successful and false if there was a fatal failure.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ * @wpdb object WordPress database object
+ *
+ * @return array Array containing status, suggested view, and any data
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ // Run constructor for members data class
+ // parent::__construct(false, false);
+
+ }
+
+ /**
+ * modelAction
+ *
+ * @param bool $actionData Action Data passed to the modelAction
+ *
+ * @access public
+ * @return void
+ */
+ public function modelAction( $actionData = false )
+ {
+ $status = true;
+ $option = false;
+ $view = 'button.html';
+ $member = false;
+
+
+ if ( isset( $_REQUEST['option'] ) ) {
+ $option = filter_var( $_REQUEST['option'], FILTER_SANITIZE_STRING );
+ }
+
+ switch ( $option ) {
+
+ default:
+ if ( isset( $actionData['request']['member'] ) && $member = filter_var( $actionData['request']['member'], FILTER_VALIDATE_INT ) ) {
+ $button = glm_member_itinerary_trip_planner_link( '', $member );
+ } else {
+ $button = false;
+ }
+ break;
+ }
+
+ $templateData = array(
+ 'button' => $button,
+ );
+
+ return array(
+ 'status' => $status,
+ 'menuItemRedirect' => false,
+ 'modelRedirect' => false,
+ 'view' => 'front/itinerary/' . $view,
+ 'data' => $templateData,
+ );
+ }
+
+}