March 23, 2016

2.5 Day Offshore Trip

[insert_php] ////////////////////////////////////////// ////////////////////////////////////////// // // TRIP VARIABLES define(‘DBE_SERVER’, “localhost”); define(‘DBE_USER’, “a9e25262f99a”); define(‘DBE_PASSWORD’, “3bc44c6234d25d54”); define(‘DBE_TABLE’, “mdra_charter_trips”); $post_id = 209; $charter_year = 2019; $charter_type = “offshore”; $deposit_due_date = “July 1, 2019”; $header_id =1639; $header_url = “2016/07/offshore_header.jpg”; $header_alt = “offshore_header”; $max_charter_capacity = 25; $warning_count = 12; $alert_count = 6; $total=0; $total_deposit=0; $member_fee=50; $trip_fee=670; $trip_deposit=200; $total += $trip_fee; $total_deposit += $trip_deposit; // // ////////////////////////////////////////// ////////////////////////////////////////// $defaultState = “CA”; //Define the US State Array to be used to generate the STATE select box $usStates = array( “” => “State *”, “AL” => “Alabama”, “AK” => “Alaska”, “AZ” => “Arizona”, “AR” => “Arkansas”, “CA” => “California”, “CO” => “Colorado”, “CT” => “Connecticut”, “DE” => “Delaware”, “FL” => “Florida”, “GA” => “Georgia”, “HI” => “Hawaii”, “ID” => “Idaho”, “IL” => “Illinois”, “IN” => “Indiana”, “IA” => “Iowa”, “KS” => “Kansas”, “KY” => “Kentucky”, “LA” => “Louisiana”, “ME” => “Maine”, “MD” => “Maryland”, “MA” => “Massachusetts”, “MI” => “Michigan”, “MN” => “Minnesota”, “MS” => “Mississippi”, “MO” => “Missouri”, “MT” => “Montana”, “NE” => “Nebraska”, “NV” => “Nevada”, “NH” => “New Hampshire”, “NJ” => “New Jersey”, “NM” => “New Mexico”, “NY” => “New York”, “NC” => “North Carolina”, “ND” => “North Dakota”, “OH” => “Ohio”, “OK” => “Oklahoma”, “OR” => “Oregon”, “PA” => “Pennsylvania”, “RI” => “Rhode Island”, “SC” => “South Carolina”, “SD” => “South Dakota”, “TN” => “Tennessee”, “TX” => “Texas”, “UT” => “Utah”, “VT” => “Vermont”, “VA” => “Virginia”, “WA” => “Washington”, “WV” => “West Virginia”, “WI” => “Wisconsin”, “WY” => “Wyoming” ); $defaultSize = “”; //Define the T-Shirt Sizes $shirtSizes = array( “” => “T-Shirt Size *”, “Small” => “Small”, “Medium” => “Medium”, “Large” => “Large”, “X-Large” => “X-Large”, “2X-Large” => “2X-Large”, “3X-Large” => “3X-Large”, ); $defaultOne = “”; //Define the Bunk //$availList = array(“” => “Choose A Bunk *”, $bunkList = array( “B-12″ =>”B-12”, “B-15” => “B-15”, “B-20” => “B-20”, “B-23” => “B-23”, “M-2” => “M-2”, “M-4” => “M-4”, “M-6” => “M-6”, “M-8” => “M-8”, “M-11” => “M-11”, “M-14” => “M-14”, “M-17” => “M-17”, “M-19” => “M-19”, “M-22” => “M-22”, “M-25” => “M-25”, “M-27” => “M-27”, “M-29” => “M-29”, “T-1” => “T-1”, “T-3” => “T-3”, “T-5” => “T-5”, “T-7” => “T-7”, “T-10” => “T-10”, “T-13” => “T-13”, “T-16” => “T-16”, “T-18” => “T-18”, “T-21” => “T-21”, “T-24” => “T-24”, “T-26” => “T-26”, “T-28” => “T-28”, ); // Populate default values $regLinkList = array(); $regClassList = array(); $regNameList = array(); //$regTipList = array(); $availList = array(“” => “Choose A Bunk *”); foreach($bunkList as $key => $val) { $regLinkList[$key] = ‘“; $regClassList[$key] = “”; $regNameList[$key] = “”; //$regTipList[$key] = “”; $availList[$key] = $val; } // Deposit Acknowledgements $deposit_acknow = ‘   ‘; $deposit_req_js = “reqDepAcknow();”; $deposit_skip_js = “skipDepAcknow();”; // Initial Values $fname_retrieve = “”; $lname_retrieve = “”; $uid_retrieve = “”; $deposit_paid = 0; $total_paid = 0; $member_paid = 0; $submit_hash = “”; $fname = “”; $lname = “”; $shirt_size = “”; $mentry = “”; $deposit = “”; $bunk = “”; $street_address = “”; $city = “”; $state = “”; $zip = “”; $phone = “”; $email = “”; $confirm_email = “”; $mentry_check = “”; $mentry_print = “NO”; $deposit_check = “”; $deposit_print = “NO”; if ( isset($_POST[“submit-hash”] ) && ($_POST[“submit-hash”] != “”) ) { $submit_hash = $_POST[“submit-hash”]; $fname = $_POST[“first-name”]; $lname = $_POST[“last-name”]; $bname = $_POST[“boat-name”]; $shirt_size = $_POST[“shirt-size”]; $mentry = $_POST[“member-entry”]; $deposit = $_POST[“deposit-entry”]; $bunk = $_POST[“bunk”]; $street_address = $_POST[“user-address”]; $city = $_POST[“user-city”]; $state = $_POST[“user-state”]; $zip = $_POST[“user-zip”]; $phone = $_POST[“user-phone”]; $email = $_POST[“user-email”]; $confirm_email = $_POST[“confirm-email”]; if ($mentry) { $mentry_check = ” checked “; $mentry_db = 1; $mentry_print = “YES”; $total += $member_fee; $total_deposit += $member_fee; } if ($deposit) { $deposit_check = ” checked “; $deposit_print = “YES”; } else { $deposit_acknow = “”; $deposit_req_js = “”; $deposit_skip_js = “”; } } if ( isset($_GET[“submit-hash”] ) && ($_GET[“submit-hash”] != “”) ) { $submit_hash = $_GET[“submit-hash”]; } if ( isset($_GET[“registration-retrieve”] ) && ($_GET[“registration-retrieve”] != “”) ) { $uid_retrieve = $_GET[“registration-retrieve”]; } if ( isset($_POST[“registration-retrieve”] ) && ($_POST[“registration-retrieve”] != “”) ) { $fname_retrieve = $_POST[“first-name-retrieve”]; $lname_retrieve = $_POST[“last-name-retrieve”]; $uid_retrieve = strtolower($_POST[“registration-retrieve”]); } ///////////////////////////////// // Initialize $spots_left = $max_charter_capacity; $spots_color = “#33AD5C”; // ///////////////////////////////// // Create connection $conn = mysqli_connect(DBE_SERVER, DBE_USER, DBE_PASSWORD, DBE_TABLE); $db_flag = 1; // Check connection if (!$conn) { echo “MYSQL Connection Failed!”; die(“Connection failed: ” . mysqli_connect_error()); $db_flag = 0; } $sql = ‘SELECT * FROM `’ . $charter_year . ‘_charters` WHERE `trip_type`=”‘. $charter_type .'” AND `payment_done`>=1 ‘; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { // output data of each row while($row = mysqli_fetch_assoc($result)) { $spots_left = $spots_left – 1; $key = $row[‘bunk’]; if ($row[‘payment_done’] == 1) { $regClassList[$key] = “bunk-deposit”; } else if ($row[‘payment_done’] == 2) { $regClassList[$key] = “bunk-paid”; } $regNameList[$key] = ucfirst(strtolower($row[‘first_name’])) . ” ” . ucfirst(strtolower($row[‘last_name’][0])) . “.”; $regLinkList[$key] = ‘‘ . $key . ‘ ‘ . $regNameList[$key] . ““; unset($availList[$key]); } } //print_r ($regNameList); if ( $spots_left < $alert_count ) { $spots_color = "#E64848"; } else if ( $spots_left < $warning_count ) { $spots_color = "#FF9933"; } //////////////////////////////////////////// //////////////////////////////////////////// [/insert_php] [insert_php] echo $header_alt; [/insert_php]

Sign-up for the trip

Only [insert_php] echo $spots_left; [/insert_php] spots left!


Already reserved a bunk?



* Registration ID can be found in your reservation email.

Step 1: Select Bunk


Eclipse Bunk Layout


Starboard
Bow
(Front)
[insert_php]echo $regLinkList[“T-28”];[/insert_php] [insert_php]echo $regLinkList[“T-26”];[/insert_php] [insert_php]echo $regLinkList[“T-24”];[/insert_php] Stern
(Engine)
[insert_php]echo $regLinkList[“M-29”];[/insert_php] [insert_php]echo $regLinkList[“M-27”];[/insert_php] [insert_php]echo $regLinkList[“M-25”];[/insert_php]
      Stairs
[insert_php]echo $regLinkList[“B-23”];[/insert_php] [insert_php]echo $regLinkList[“B-20”];[/insert_php]
[insert_php]echo $regLinkList[“M-22”];[/insert_php] [insert_php]echo $regLinkList[“M-19”];[/insert_php] [insert_php]echo $regLinkList[“M-17”];[/insert_php]
[insert_php]echo $regLinkList[“T-21”];[/insert_php] [insert_php]echo $regLinkList[“T-18”];[/insert_php] [insert_php]echo $regLinkList[“T-16”];[/insert_php]

[insert_php]echo $regLinkList[“T-13”];[/insert_php] [insert_php]echo $regLinkList[“T-10”];[/insert_php] [insert_php]echo $regLinkList[“T-7”];[/insert_php]
[insert_php]echo $regLinkList[“M-14”];[/insert_php] [insert_php]echo $regLinkList[“M-11”];[/insert_php] [insert_php]echo $regLinkList[“M-8”];[/insert_php]
[insert_php]echo $regLinkList[“B-15”];[/insert_php] [insert_php]echo $regLinkList[“B-12”];[/insert_php]
      Stairs
[insert_php]echo $regLinkList[“M-6”];[/insert_php] [insert_php]echo $regLinkList[“M-4”];[/insert_php] [insert_php]echo $regLinkList[“M-2”];[/insert_php]
[insert_php]echo $regLinkList[“T-5”];[/insert_php] [insert_php]echo $regLinkList[“T-3”];[/insert_php] [insert_php]echo $regLinkList[“T-1”];[/insert_php]
Port
  • :Electrical Plug
  • T:Top Bunk
  • M:Middle Bunk
  • B:Bottom Bunk
  • :Bunk Available
  • :Bunk Reserved
  • :Bunk Taken

Step 2: Fill Form

[insert_php] if ($spots_left == 0) { echo ‘
Sorry, there are no more spots available for the trip.

‘; } if ($spots_left == 0) { echo ““; } [/insert_php]

Bunks are assigned on a first-come, first-choice basis so sign-up quickly. Check ‘Deposit Only’ if paying the $200 deposit to reserve your bunk. Full payment is required by [insert_php] echo $deposit_due_date; [/insert_php].


Questions and requests can be sent via email to the