From fb88250d09f6c462b18ae65ed7b12e1832a11a02 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 8 Feb 2010 19:53:17 +0000 Subject: [PATCH] static pages --- static/170.phtml | 0 static/202.phtml | 40 +++++ static/21.phtml | 2 + static/22.phtml | 2 + static/23.phtml | 2 + static/24.phtml | 2 + static/25.phtml | 2 + static/26.phtml | 2 + static/304.phtml | 13 ++ static/31.phtml | 14 ++ static/32.phtml | 400 +++++++++++++++++++++++++++++++++++++++++++++++ static/4.phtml | 0 static/76.phtml | 15 ++ static/79.phtml | 2 + 14 files changed, 496 insertions(+) create mode 100644 static/170.phtml create mode 100755 static/202.phtml create mode 100755 static/21.phtml create mode 100755 static/22.phtml create mode 100755 static/23.phtml create mode 100755 static/24.phtml create mode 100755 static/25.phtml create mode 100755 static/26.phtml create mode 100644 static/304.phtml create mode 100755 static/31.phtml create mode 100755 static/32.phtml create mode 100755 static/4.phtml create mode 100644 static/76.phtml create mode 100644 static/79.phtml diff --git a/static/170.phtml b/static/170.phtml new file mode 100644 index 0000000..e69de29 diff --git a/static/202.phtml b/static/202.phtml new file mode 100755 index 0000000..9a7908e --- /dev/null +++ b/static/202.phtml @@ -0,0 +1,40 @@ + + + + diff --git a/static/21.phtml b/static/21.phtml new file mode 100755 index 0000000..1636aa8 --- /dev/null +++ b/static/21.phtml @@ -0,0 +1,2 @@ +

Floor Plan:

+3 bedroom & loft, 2 bathroom (sleeps 8-10) \ No newline at end of file diff --git a/static/22.phtml b/static/22.phtml new file mode 100755 index 0000000..d5b8714 --- /dev/null +++ b/static/22.phtml @@ -0,0 +1,2 @@ +

Floor Plan:

+2 bedroom & loft, 2 bathroom (sleeps 6-8) \ No newline at end of file diff --git a/static/23.phtml b/static/23.phtml new file mode 100755 index 0000000..dac5c9f --- /dev/null +++ b/static/23.phtml @@ -0,0 +1,2 @@ +

Floor Plan:

+2 bedroom, 2 bathroom + (sleeps 4-6) \ No newline at end of file diff --git a/static/24.phtml b/static/24.phtml new file mode 100755 index 0000000..8a17a6f --- /dev/null +++ b/static/24.phtml @@ -0,0 +1,2 @@ +

Floor Plan:

+2 bedroom, 2 bathroom (sleeps 4-6) \ No newline at end of file diff --git a/static/25.phtml b/static/25.phtml new file mode 100755 index 0000000..fb37001 --- /dev/null +++ b/static/25.phtml @@ -0,0 +1,2 @@ +

Floor Plan:

+2 bedroom, 1 bathroom (sleeps 4-6) \ No newline at end of file diff --git a/static/26.phtml b/static/26.phtml new file mode 100755 index 0000000..9eb87b1 --- /dev/null +++ b/static/26.phtml @@ -0,0 +1,2 @@ +

Floor Plan:

+1 bedroom, 1 bathroom (sleeps 2-4) \ No newline at end of file diff --git a/static/304.phtml b/static/304.phtml new file mode 100644 index 0000000..afc6cbd --- /dev/null +++ b/static/304.phtml @@ -0,0 +1,13 @@ +notice('help I\'m stuck in hell'); +$cf = new Toolkit_Contacts_ContactUs( + Toolkit_Database::getInstance(), + 'contact_form', + 'post', + BASE_URL . 'index.php?catid=304' +); +$cf->configureForm(); +$cf->useCaptcha(true); +echo $cf->toHtml(); +?> diff --git a/static/31.phtml b/static/31.phtml new file mode 100755 index 0000000..786cea9 --- /dev/null +++ b/static/31.phtml @@ -0,0 +1,14 @@ + diff --git a/static/32.phtml b/static/32.phtml new file mode 100755 index 0000000..11a881f --- /dev/null +++ b/static/32.phtml @@ -0,0 +1,400 @@ +DB->db_auto_get_data($int_qs) ) +{ + foreach( $data as $row ) + { + $interest2[$row['id']] = $row['header']; + } +} +unset($unit_size); +unset($referred_by); +unset($fields); +$THANKYOU_TEXT = "


+

Thank you for the reservation request!

+"; +$GLOBALS["THANKYOU_TEXT"] = $THANKYOU_TEXT; +$fields['fname'] = "First Name"; +$fields['lname'] = "Last Name"; +$fields['email'] = "Email Address"; +$fields['address'] = "Address "; +$fields['city'] = "City "; +$fields['state'] = "State "; +$fields['zip'] = "Zip "; +$fields['arrive_date'] = "Arrival Date"; +$fields['depart_date'] = "Departure Date"; +$fields['unit_size'] = "Unit Size "; +$fields['referred_by'] = "Referred By"; +$fields['other'] = "Other "; +$fields['question'] = "Questions"; +$unit_size2[6] = "5 bedroom & loft, 3.5 bathroom (sleeps 12)"; +$unit_size2[0] = "3 bedroom & loft, 2 bathroom (sleeps 8-10)"; +$unit_size2[1] = "2 bedroom & loft, 2 bathroom (sleeps 6-8)"; +$unit_size2[2] = "2 bedroom, 2 bathroom + (sleeps 4-6)"; +$unit_size2[3] = "2 bedroom, 2 bathroom (sleeps 4-6)"; +$unit_size2[4] = "2 bedroom, 1 bathroom (sleeps 4-6)"; +$unit_size2[5] = "1 bedroom, 1 bathroom (sleeps 2-4)"; +$referred_by2[0] = "AAA"; +$referred_by2[1] = "Big Fore"; +$referred_by2[2] = "Chamber/Visitors Bureau"; +$referred_by2[3] = "Detroit Free Press"; +$referred_by2[4] = "Friends/Relatives"; +$referred_by2[5] = "Great Rentals Web Site"; +$referred_by2[6] = "Internet"; +$referred_by2[7] = "Nubs Nob"; +$referred_by2[8] = "Other"; +$referred_by2[9] = "Past Guest"; +/* +$interest2[0] = "Golf Trip"; +$interest2[1] = "Big 4 Golf Package"; +$interest2[2] = "Ski Trip"; +$interest2[3] = "Family vacation"; +$interest2[4] = "Family Reunion"; +$interest2[5] = "Romantic Getaway"; +$interest2[6] = "Honeymoon/Anniversary"; +$interest2[7] = "Soccer Weekend"; +$interest2[8] = "Wedding Group"; +$interest2[9] = "Biking"; +$interest2[10] = "Fishing"; +$interest2[11] = "Tennis"; +$interest2[12] = "Business"; +$interest2[13] = "Fall Color Tour"; +$interest2[14] = "Morel Mushrooms"; +$interest2[15] = "Spring/Fall Relaxing vacation"; +$interest2[16] = "Empty Nester Getaway"; +$interest2[17] = "Real Estate"; +$interest2[18] = "Senior Packages"; +$interest2[19] = "Scrapbooking"; +*/ +$GLOBALS['fields'] = $fields; +$GLOBALS['unit_size2'] = $unit_size2; +$GLOBALS['referred_by2'] = $referred_by2; +$GLOBALS['interest2'] = $interest2; +function build_select($array,$name,$multiple = 0) +{ + if(is_array($array)) + { + $select = ''; + } + return($select); +} +function build_checkbox($int_array) +{ + $total = count($int_array); + if($total == 0) + return(false); + $split = $total / 2; + $padding = $split * 2; + $int_array = array_pad($int_array,$padding," "); + $interest .= ""; + $count = 1; + foreach($int_array as $key=>$value) + { + $interest .= ""; + if($count%2==0 && $count != $padding) + { + $interest .= ""; + } + elseif($count == $padding) + { + $interest .= ""; + } + $count++; + } + $interest .= "
"; + $interest .= "$value
"; + $interest .= "
"; + return($interest); +} +function process_form( $_POST ) +{ + extract($_POST); + foreach($_POST as $key=>$value) + { + if($key == "email" && ( !GLM_TEMPLATE::valid_email($value) || $value == "" )) + { + $errors["email"] = "
your email is not valid or empty!
"; + } + if($key == "fname" && $value == "" ) + { + $errors["fname"] = "
your name is empty!
"; + } + if($key == "referred_by" && $value == "") + { + $errors["referred_by"] = "
Required Field!
"; + } + if($key == "other" && $value != "") + { + unset($errors["referred_by"]); + } + } + if(is_array($errors) && count($errors) > 0) + { + return($errors); + } + else + { + $DB =& new GLM_DB(); + $DB->db_connect(); + // database part + if(is_array($interest)) + { + foreach($interest as $ik=>$iv) + { + $int4[] = $GLOBALS['interest2'][$iv]; + } + $interest = ':'.implode(":",$int4).':'; + } + unset($_POST["interest"]); + // catid must be unset so it doesn't try to stick it in the db + unset($_POST['catid']); + $_POST["interest"] = $interest; + foreach($_POST as $key=>$value){ + if($key == "SUBMIT") + continue; + if($key == "arrive_date" && $value == "") + continue; + if($key == "depart_date" && $value == "") + continue; + if($key == "referred_by" && $value == "") + { + $tmp[] = $key; + $tmp_val[] = "NULL"; + continue; + } + if($key == "unit_size" && $value == "") + { + $tmp[] = $key; + $tmp_val[] = "NULL"; + continue; + } + $tmp[] = $key; + $tmp_val[] = "'$value'"; + } + $tmp = implode($tmp,","); + $tmp_val = implode($tmp_val,","); + $date = date("m/d/Y"); + $query = "INSERT INTO contact (create_date,$tmp) VALUES ('$date',$tmp_val)"; + $DB->db_exec($query); + $DB->db_close(); + //echo $query; + // mail part + foreach($_POST as $key=>$value) + { + if($key == "SUBMIT") + { + continue; + } + if($key == "interest") + { + $interest = $GLOBALS['interest2'][$value]; + $body .= $GLOBALS['fields'][$key]."\t$interest\n"; + } + if($key == "referred_by") + { + $referred = $GLOBALS['referred_by2'][$value]; + $body .= $GLOBALS['fields'][$key]."\t$referred\n"; + } + elseif($key == "unit_size") + { + $unit = $GLOBALS['unit_size2'][$value]; + $body .= $GLOBALS['fields'][$key]."\t$unit\n"; + } + elseif($key == "mail_ok") + { + if($value == 't') + $body .= "Yes I would like email\n"; + } + elseif($value != "") + { + $body .= $GLOBALS['fields'][$key]."\t$value\n"; + } + } + $subject = "You have received a reservation request!"; + $headers = "Reply-To: ".REPLY_TO."\n"; + mail(OWNER_EMAIL,$subject,$body,$headers); + echo $GLOBALS["THANKYOU_TEXT"]; + return(true); + } + +} +function show_form( $errors = NULL ) +{ + $unit = build_select($GLOBALS['unit_size2'],"unit_size"); + $referred = build_select($GLOBALS['referred_by2'],"referred_by"); + $intr = build_checkbox($GLOBALS['interest2']); + + echo ' + +

*=Required Form Fields

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
* First + Name: + + + '.$errors["fname"].' +
Last + Name: + + '.$errors["lname"].' +
* Email + Address: + + '.$errors["email"].' +
Address: + + + '.$errors["address"].' +
City: + + + '.$errors["city"].' +
State: + + + '.$errors["state"].' +
Zip: + + + '.$errors["zip"].' +
Phone: + + + '.$errors["city"].' +
Date + Requested From: + + '.$errors["arrive_date"].' + (dd/mm/yy)
Date + Requested To: + + '.$errors["depart_date"].' + (dd/mm/yy)
Unit + Size: '.$unit.' + '.$errors["unit_size"].' +
+ * How did you hear about
Trout Creek?
'.$referred.' + '.$errors["referred_by"].' +
+ If other, please specify: + + '.$errors["other"].' +
+ Let us know what you are interested in: '.$intr.' + '.$errors["interest"].' +
+ Additional Questions: + + '.$errors["questions"].' +
+ Please notify me of specials and offers. + + Yes + No +

+
+ +
+ Note: This is a reservation request only. It does not guarantee + a reservation.
+
+ '; +} + +if(!$_POST){ + show_form(); +} +else{ + if(is_array($errors = process_form($_POST))){ + show_form($errors); + } +} + + +?> diff --git a/static/4.phtml b/static/4.phtml new file mode 100755 index 0000000..e69de29 diff --git a/static/76.phtml b/static/76.phtml new file mode 100644 index 0000000..05a7a12 --- /dev/null +++ b/static/76.phtml @@ -0,0 +1,15 @@ +
+\n\n\n"; +$inc_page = INC_PAGE; + +if(!$inc_page || $inc_page == "index.php") +{ + include(BASE."weather/details.php"); +} +else +{ + include(BASE."weather/$inc_page"); +} +?> +
diff --git a/static/79.phtml b/static/79.phtml new file mode 100644 index 0000000..e055851 --- /dev/null +++ b/static/79.phtml @@ -0,0 +1,2 @@ + -- 2.17.1