Skip to content

Commit

Permalink
Update files from original developer.
Browse files Browse the repository at this point in the history
  • Loading branch information
traxeon committed Nov 18, 2021
1 parent 6c0b7dc commit b2942a9
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 6 deletions.
2 changes: 1 addition & 1 deletion activities.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<div class="header_image">

<div class="topimage">
<img src="http://paxriverquiltguild.com/images/quilts/members.jpg" alt="">
<img src="images/quilts/members.jpg" alt="">
<div class="caption">
<p><span>We currently have over ninety active guild members of all experience levels</span> <a href="contact-us.html" style="color: white; font-weight: bold;" class="link-more">Get Directions</a></p>
</div>
Expand Down
10 changes: 5 additions & 5 deletions contact-us.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<script src="js/jquery.infieldlabel.min.js"></script>
<script type="text/javascript" language="javascript" src="js/custom.js"></script>
</head>
<body style="background-color: rgb(218, 218, 218); background-image: url(http://paxriverquiltguild.com/&quot;images/pattern_1.png&quot;);">
<body style="background-color: rgb(218, 218, 218); background-image: url(&quot;images/pattern_1.png&quot;);">
<div class="body_wrap">

<div class="header_container">
Expand Down Expand Up @@ -77,7 +77,7 @@
<div class="topimage">
<img src="images/quilts/membership.jpg" alt="">
<div class="caption">
<p><span>Meeting are held the second Monday of the month, 6:30pm at Good Samaritan Lutheran Church.</span> <a href="contact-us.html#" style="color: white; font-weight: bold; outline: none;" class="link-more" hidefocus="true">Phone: 310-497-9759</a></p>
<p><span>Meeting are held the second Monday of the month, 6:30pm at Good Samaritan Lutheran Church.</span> <a href="#" style="color: white; font-weight: bold; outline: none;" class="link-more" hidefocus="true">Phone: 310-497-9759</a></p>
</div>
</div>

Expand All @@ -104,7 +104,7 @@ <h1>Send us your Message:</h1>
<div class="add-comment" id="addcomments">

<div class="comment-form">
<form action="contact-us.html#" method="post" id="contactForm" class="ajax_form">
<form action="#" method="post" id="contactForm" class="ajax_form">

<div class="row alignleft infieldlabel">
<label for="name">Enter your first and last name*</label>
Expand Down Expand Up @@ -140,7 +140,7 @@ <h1>Send us your Message:</h1>

<div class="row rowSubmit">
<input type="submit" id="send" value="SEND YOUR MESSAGE" class="btn-submit">
<a onclick="document.getElementById('commentForm').reset();return false" href="contact-us.html#" class="link-reset" hidefocus="true" style="outline: none;">clear the form</a>
<a onclick="document.getElementById('commentForm').reset();return false" href="#" class="link-reset" hidefocus="true" style="outline: none;">clear the form</a>
</div>
</form>
</div>
Expand Down Expand Up @@ -204,4 +204,4 @@ <h3 class="widget-title">New Members Welcome!</h3>

</div>

<a href="contact-us.html#" id="toTop" style="display: none;"><span id="toTopHover"></span>To Top</a></body></html>
<a href="#" id="toTop" style="display: none;"><span id="toTopHover"></span>To Top</a></body></html>
107 changes: 107 additions & 0 deletions sendmail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?php


// Change this with your blog name and email address
$the_blogname = 'PRQG Email';
$the_myemail = '[email protected]';


if(isset($_POST['email'])){
error_reporting(0);
$errorC = false;

$the_email = $_POST['email'];
$the_name = $_POST['yourname'];
$the_message = $_POST['message'];

$the_phone = $_POST['phone'];
$the_fax = $_POST['fax'];
$the_company = $_POST['company'];
$the_website = $_POST['website'];

# want to add aditional fields? just add them to the form in template_contact.php,
# you dont have to edit this file

//added fields that are not set explicit like the once above are combined and added before the actual message
$already_used = array('email','yourname','message','phone','fax','company','website','myblogname','tempcode','temp_url','ajax');
$attach = '';

foreach ($_POST as $key => $field)
{
if(!in_array($key,$already_used))
{
$attach.= $key.": ".$field."<br /> \n";
}
}
$attach.= "<br /> \n";

if(!checkmymail($the_email))
{
$errorC = true;
$the_emailclass = "error";
}else{
$the_emailclass = "valid";
}

if($the_message == "")
{
$errorC = true;
$the_messageclass = "error";
}else{
$the_messageclass = "valid";
}

if($errorC == false)
{
$to = $the_myemail;
$subject = "New Message from " . $the_blogname;
$header = 'MIME-Version: 1.0' . "\r\n";
$header .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$header .= 'From:'. $the_email . " \r\n";

$message1 = nl2br($the_message);

if(!empty($the_name)) $the_name = "Name: $the_name <br/>";
if(!empty($the_company)) $the_company = "Company: $the_company <br/>";
if(!empty($the_phone)) $the_phone = "Phone: $the_phone <br/>";
if(!empty($the_fax)) $the_fax = "Fax: $the_fax <br/>";
if(!empty($the_website)) $the_website = "Website: $the_website <br/>";

$message = "
You have a new message from the PRQG Website! <br/>
$the_name
$the_company
$the_phone
$the_website
$attach <br />
Message: $message1 <br />";



if(@mail($to,$subject,$message,$header)) $send = true; else $send = false;

if(isset($_POST['ajax'])){

if ($send)
echo '<h3>Your message has been sent!</h3><div class="confirm">
<p class="textconfirm">Thank you for contacting us.<br/>We will get back to you as soon as possible.</p>
</div>';
else
echo '<h3>Oops!</h3><div class="confirm">
<p class="texterror">Due to an unknown error, your form was not submitted, please resubmit it or try later.</p>
</div>';

}
}

}


function checkmymail($mailadresse){
$email_flag=preg_match("!^\w[\w|\.|\-]+@\w[\w|\.|\-]+\.[a-zA-Z]{2,4}$!",$mailadresse);
return $email_flag;
}

?>

0 comments on commit b2942a9

Please sign in to comment.