windhamdavid 6 years ago
parent
commit
69e00cb282
5 changed files with 395 additions and 0 deletions
  1. 66 0
      comments.php
  2. 236 0
      contact-us-data.php
  3. 31 0
      content-none.php
  4. 25 0
      content-page.php
  5. 37 0
      content.php

+ 66 - 0
comments.php

@@ -0,0 +1,66 @@
+<?php
+/**
+ * The template for displaying Comments
+ *
+ * The area of the page that contains comments and the comment form.
+ *
+ * @package WordPress
+ * @subpackage Twenty_Fourteen
+ * @since Twenty Fourteen 1.0
+ */
+
+/*
+ * If the current post is protected by a password and the visitor has not yet
+ * entered the password we will return early without loading the comments.
+ */
+if ( post_password_required() ) {
+	return;
+}
+?>
+
+<div id="comments" class="comments-area">
+
+	<?php if ( have_comments() ) : ?>
+
+	<h2 class="comments-title">
+		<?php
+			printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyfourteen' ),
+				number_format_i18n( get_comments_number() ), get_the_title() );
+		?>
+	</h2>
+
+	<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
+	<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
+		<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
+		<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
+		<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
+	</nav><!-- #comment-nav-above -->
+	<?php endif; // Check for comment navigation. ?>
+
+	<ol class="comment-list">
+		<?php
+			wp_list_comments( array(
+				'style'      => 'ol',
+				'short_ping' => true,
+				'avatar_size'=> 34,
+			) );
+		?>
+	</ol><!-- .comment-list -->
+
+	<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
+	<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
+		<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
+		<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
+		<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
+	</nav><!-- #comment-nav-below -->
+	<?php endif; // Check for comment navigation. ?>
+
+	<?php if ( ! comments_open() ) : ?>
+	<p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
+	<?php endif; ?>
+
+	<?php endif; // have_comments() ?>
+
+	<?php comment_form(); ?>
+
+</div><!-- #comments -->

+ 236 - 0
contact-us-data.php

@@ -0,0 +1,236 @@
+<?php
+//Send Confirmation Email
+
+$confirmtext="<p>Thank you for contacting Uni-Serve Air Conditioning. We have received your communication and will get back to you as soon as possible.</p>
+<p><strong>Uni-Serve Air Conditioning</strong><br>
+2723 Cedarville Drive<br />
+Kingwood, Texas 77345<br />
+Kingwood: (281) 360-9898<br />
+Pasadena/Charlotte: (281) 998-9168<br />
+</p>";
+$confirmemail='noreply@uniserveair.com';
+$confirmname='Uni-Serve Air Conditioning';
+$confirmsubject='Uni-Serve Air Conditioning Contact Form Confirmation';
+
+// L10Fm - v1.3 (11/10/06) (patched for XSS)
+// requirements for session data -
+//	1. LevelTen Hit Counter PHP v3.15 rel 3
+//	2. L10HC_API.php v3.15 v1.0 rel 1
+//
+
+//////////////////////////////////////////////////////////////////////////////////////
+//
+// configuration variables
+//
+//////////////////////////////////////////////////////////////////////////////////////
+
+// List all domains, including posible subdomains (e.g. www.) that are allowed to submit
+// requests to this script and the domains of any posible recipient email address.
+
+$validReferrers = array('www.climategreenwood.com','climategreenwood.com','gmail.com','www.gmail.com');
+
+// Use the this array (or create new arrays with a different association) to replace
+// setting fields in the form. Don't delete the 'default' array.
+
+$formAction['default'] = array(
+	'recipient' => 'jodi@climategreenwood.com',
+	'recipient_cc' => '',
+	'recipient_bcc' => '',
+	'subject' => 'Contact Form | Climate Control Systems of Greenwood Inc',
+	'redirect' => 'http://climategreenwood.com/thank-you/',
+	'email' => '',
+	'realname' => '',
+	'required' => 'Name,Email,Comments',
+	'format' => 'html',
+	'sesrep_max_items' => '10',
+);
+
+// If set to 0, the form can set the email recipient. For security reasons you should
+// always set this variable to 1.
+
+define('DISABLE_FORM_RECIPIENTS', 1);
+
+//////////////////////////////////////////////////////////////////////////////////////
+//
+// Start of code
+// Don't edit below this line
+//
+//////////////////////////////////////////////////////////////////////////////////////
+
+$pageHdr = "<html><head><style>td {font: x-small, verdana, arial, helvetica, sans-serif;} h1 {font-size: medium;} .err {color: #EE0000; font-weight: bold;}</style></head><body bgcolor=#FFFFFF><table width='500' align=center><tr><td>";
+$pageFtr = "</td></tr>\n</body></html>";
+
+$L10_LIBLoaded = 0;
+if(file_exists("L10_LIB.php")) {
+	include_once("L10_LIB.php");
+	$L10_LIBLoaded = 1;
+}
+
+$http_ref = $_SERVER['HTTP_REFERER'];
+$array = parse_url($http_ref);
+$a = $array['host'];
+
+if(!in_array($a,$validReferrers)) {
+	print "$pageHdr<p class=err>Invalid Referrer '$a'</p><p>Referrer does not have permission to access this LevelTen Formmail script.<p>For help on this issue, see <a href='http://www.leveltendesign.com/L10Apps/Fm/help_troubleshooting.php#invalidReferrer?hct=L10Fm-ErrMsg' target=_blank>LevelTen Formmail troubleshooting</a>$pageFtr";
+	exit;
+}
+
+if(! $_POST['form_action'] or ! $formAction[$_POST['form_action']]['recipient']) {
+	$fAIndex = 'default';
+} else {
+	$fAIndex = $_POST['form_action'];
+}
+
+$recipient  = (! DISABLE_FORM_RECIPIENTS && ($_POST['recipient'] != '')) ? $_POST['recipient'] : $formAction[$fAIndex]['recipient'];
+$subject  = ($_POST['subject'] != '') ? $_POST['subject'] : $formAction[$fAIndex]['subject'];
+$redirect = ($_POST['redirect'] != '') ? $_POST['redirect'] : $formAction[$fAIndex]['redirect'];
+$email = ($_POST['email'] != '') ? $_POST['email'] : $formAction[$fAIndex]['email'];
+$realname = ($_POST['realname']) ? $_POST['realname'] : $formAction[$fAIndex]['realname'];
+$recipient_cc  = (! DISABLE_FORM_RECIPIENTS && ($_POST['recipient_cc'] != '')) ? $_POST['recipient_cc'] : $formAction[$fAIndex]['recipient_cc'];
+$recipient_bcc  = (! DISABLE_FORM_RECIPIENTS && ($_POST['recipient_bcc'] != '')) ? $_POST['recipient_bcc'] : $formAction[$fAIndex]['recipient_bcc'];
+$format = ($_POST['format'] != '') ? $_POST['format'] : $formAction[$fAIndex]['format'];
+$required  = ($_POST['required'] != '') ? $_POST['required'] : $formAction[$fAIndex]['required'];
+$sesrep_max_items  = ($_POST['sesrep_max_items'] != '') ? $_POST['sesrep_max_items'] : $formAction[$fAIndex]['sesrep_max_items'];
+$recipient_secured  = ($_POST['recipient_secured'] != '') ? $_POST['recipient_secured'] : $formAction[$fAIndex]['recipient_secured'];
+
+$a = explode("@",$recipient);
+$a = array_pop($a);
+if(!in_array($a,$validReferrers)) {
+	print "$pageHdr<p class=err>Invalid Recipient '$recipient'</p><p> Email address does not have permission to relay through this LevelTen Formmail script.<p>For help on this issue, see <a href='http://www.leveltendesign.com/L10Apps/Fm/help_troubleshooting.php#invalidReferrer?hct=L10Fm-ErrMsg' target=_blank>LevelTen Formmail troubleshooting</a>$pageFtr";
+	exit;
+}
+
+$rccArray = explode(",",$recipient_cc);
+$recipient_cc = '';
+if($rccArray[0] != '') {
+	foreach($rccArray as $rcc) {
+		$a = explode("@",$rcc);
+		$a = array_pop($a);
+		if(in_array($a,$validReferrers)) {
+			$recipient_cc .= "$rcc,";
+		}
+	}
+}
+$recipient_cc = substr($recipient_cc,0,-1);
+
+$rbccArray = explode(",",$recipient_bcc);
+$recipient_bcc = '';
+if($rbccArray[0] != '') {
+	foreach($rbccArray as $rbcc) {
+		$a = explode("@",$rbcc);
+		$a = array_pop($a);
+		if(in_array($a,$validReferrers)) {
+			$recipient_bcc .= "$rbcc,";
+		}
+	}
+}
+$recipient_bcc = substr($recipient_bcc,0,-1);
+
+$a = explode(",",$required);
+if($a[0] != '') {
+	foreach($a as $req) {
+		if($_POST[$req] == '') {
+			print "$pageHdr<p class=err>Required Field '$req' is missing!</p><p> You must input a value for this field before submitting<p align=center><a href='javascript: history.back(-1)'>back to form</a>$pageFtr";
+			exit;
+		}
+	}
+}
+
+
+$htmlFormat = (strtolower(substr($format,0,1)) == 'h');
+
+$msg = '';
+if($htmlFormat) {
+	$msg = "<html><head><style>td {font: x-small, verdana, arial, helvetica, sans-serif;} .fldname {font-weight:bold;font-size:x-small;} .flddata {font-size:x-small;} .tblhdr { font-size:x-small;font-weight:bold;color:#FFFFFF;background-color=#000088}</style></head><body>\n";
+	$msg .= "<table border=0 cellspacing=0 cellpadding=0 width=640>\n";
+	$msg .= "<tr><td colspan=3 class='tblhdr'>Form Data</td></tr>\n";
+} else {
+	$msg = "Form data\n\n";
+}
+
+$bl0 = '';
+$bl1 = '';
+$ld = ' ';
+$el = "\n\n";
+
+$creditStrAdd = '';
+
+if($htmlFormat) {
+	$bl0 = '<tr bgcolor=#E8E8FF><td class="fldname" valign=top>';
+	$bl1 = '<tr bgcolor=#FFFFFF><td class="fldname" valign=top>';
+	$ld = '</td><td> &nbsp; </td><td width=80% class="flddata">';
+	$el = "</td></tr>\n";
+}
+$i = 0;
+foreach($_POST as $k => $v) {
+	if($htmlFormat) {
+		$v = str_replace("\n","<br>\n",$v);
+	}
+	if($i) {
+		$msg .= "$bl0$k:$ld$v$el";
+	} else {
+		$msg .= "$bl1$k:$ld$v$el";
+	}
+	$i = !$i;
+}
+
+if(file_exists("L10HC_API.php")) {
+	include("L10HC_API.php");
+	$vID = getVID();
+	if($htmlFormat) {
+		$msg .= "<tr><td colspan=3><br>&nbsp;<br></td></tr>\n<tr><td colspan=3 border=1>";
+		$creditStrAdd = ' &amp; LevelTen Hit Counter';
+	} else {
+		$msg .= "\n\n";
+		$creditStrAdd = ' & LevelTen Hit Counter';
+	}
+	$msg .= getSessions($vID,$max_sessions,$recipient_secured,$htmlFormat+1);
+	if($htmlFormat) {
+		$msg .= "</td></tr>\n";
+	} else {
+
+	}
+}
+
+if($htmlFormat) {
+	$msg .= "<tr><td colspan=3>&nbsp;</td></tr><tr><td colspan=3 align=center>Generated by<br>LevelTen Formmail$creditStrAdd<td></tr></table></body></html>\n";
+} else {
+	$msg .= "\n\nGenerated by LevelTen Formmail$creditStrAdd\n";
+}
+
+
+
+if (! preg_match("/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i", $recipient, $result)) {echo "Invalid recipient"; exit;}
+if (strlen($recipient) > 80 or strlen($recipient_cc) > 200 or strlen($recipient_bcc) > 200) {echo "Possible hack attempt"; exit;}
+if(stristr($subject, "Bcc:") or stristr($subject, "cc:") or stristr($subject, "to:")) {echo "Invalid content in subject"; exit;}
+if(stristr($msg, "Bcc:") or stristr($msg, "cc:") or stristr($msg, "to:")) {echo "Invalid content in message"; exit;}
+if(stristr($realname, "Bcc:") or stristr($realname, "cc:") or stristr($realname, "to:") or stristr($realname, "Content-type")) {echo "Invalid content"; exit;}
+if(stristr($email, "Bcc:") or stristr($email, "cc:") or stristr($email, "to:")) {echo "Invalid content"; exit;}
+
+
+$extraHeaders = "";
+if($email) { $extraHeaders .= "From: \"". $realname ."\" <". trim($email) .">\r\n"; }
+if($email) { $extraHeaders .= "Return-Path: ". trim($email) ."\r\n"; }
+if($email) { $extraHeaders .= "Reply-To: ". trim($email) ."\r\n"; }
+if($htmlFormat == 'h') { $extraHeaders .= "Content-type: text/html\r\n"; }
+if($recipient_cc != '') { $extraHeaders .= "Cc: ". trim($recipient_cc) ."\r\n"; }
+if($recipient_bcc != '') { $extraHeaders .= "Bcc: ". trim($recipient_bcc) ."\r\n"; }
+
+$confirmfrom = "";
+$confirmfrom .= "From: \"". $confirmname ."\" <". trim($confirmemail) .">\r\n";
+$confirmfrom .= "Return-Path: ". trim($confirmemail) ."\r\n";
+$confirmfrom .= "Reply-To: ". trim($confirmemail) ."\r\n";
+$confirmfrom .= "Content-type: text/html\r\n";
+
+$success = 1;
+$success = mail($recipient,$subject,$msg,$extraHeaders);
+//$success = mail($_POST['email'],$confirmsubject,$confirmtext,$confirmfrom);
+if(!$success && $L10_LIBLoaded) {
+	log_event("Unsuccesful Email Attempt: $recipient");
+}
+
+//print "mail($recipient,$subject,$msg,$extraHeaders)";
+//print "$msg";
+
+header("Location: $redirect");
+?>

+ 31 - 0
content-none.php

@@ -0,0 +1,31 @@
+<?php
+/**
+ * The template for displaying a "No posts found" message
+ *
+ * @package WordPress
+ * @subpackage Twenty_Fourteen
+ * @since Twenty Fourteen 1.0
+ */
+?>
+
+<header class="page-header">
+	<h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
+</header>
+
+<div class="page-content">
+	<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
+
+	<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?></p>
+
+	<?php elseif ( is_search() ) : ?>
+
+	<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
+	<?php get_search_form(); ?>
+
+	<?php else : ?>
+
+	<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
+	<?php get_search_form(); ?>
+
+	<?php endif; ?>
+</div><!-- .page-content -->

+ 25 - 0
content-page.php

@@ -0,0 +1,25 @@
+<?php
+/**
+ * The template used for displaying page content
+ *
+ * @package WordPress
+ * @subpackage Twenty_Fourteen
+ * @since Twenty Fourteen 1.0
+ */
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+	<div class="entry-content">
+		<?php
+			if ( get_field('page_content') ) {
+				while ( has_sub_field('page_content') ) {
+					echo 	'<div class="content_area">' .
+								( get_sub_field('anchor_name') ? '<a class="anchor" name="' . get_sub_field('anchor_name') . '"></a>' : '' ) .
+								apply_filters( 'the_content', get_sub_field('content_area') ) . 
+							'</div>';
+				}
+			}
+			edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
+		?>
+	</div><!-- .entry-content -->
+</article><!-- #post-## -->

+ 37 - 0
content.php

@@ -0,0 +1,37 @@
+<?php
+/**
+ * The default template for displaying content
+ *
+ * Used for both single and index/archive/search.
+ *
+ * @package WordPress
+ * @subpackage Twenty_Fourteen
+ * @since Twenty Fourteen 1.0
+ */
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+	<header class="entry-header">
+		<?php
+			if ( is_single() ) :
+				the_title( '<h1 class="entry-title">', '</h1>' );
+			else :
+				the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
+			endif;
+		?>
+
+		<div class="entry-meta">
+			<?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
+		</div><!-- .entry-meta -->
+	</header><!-- .entry-header -->
+
+	<?php if ( is_search() ) : ?>
+	<div class="entry-summary">
+		<?php the_excerpt(); ?>
+	</div><!-- .entry-summary -->
+	<?php else : ?>
+	<div class="entry-content">
+		<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) ); ?>
+	</div><!-- .entry-content -->
+	<?php endif; ?>
+</article><!-- #post-## -->