Changeset - acc21c212336
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 15 years ago 2010-10-26 01:03:56
ohnobinki@ohnopublishing.net
Make feedback form's email addresses configurable.
2 files changed with 15 insertions and 4 deletions:
0 comments (0 inline, 0 general)
feedback-submit.php
Show inline comments
 
<?php
 
        include_once 'inc/class.page.php';
 
        $feedbackpage = new page('Feedback');
 

	
 
	$toaddrs = array('ethanzonca@gmail.com, ngelderloos7@gmail.com, ohnobinki@ohnopublishing.net');
 
	$subject = '[SlatePermutate] - Feedback';
 
?>
 

	
 
<h3>Thanks!</h3>
 

	
 

	
 
<?php
 
Page::session_start();
 

	
 
$ip = $_POST['ip'];
 
$httpagent = $_POST['httpagent'];
 
$fromdom = $_POST['fromdom'];
 
@@ -39,25 +38,27 @@ if(empty($nameis) || empty($feedback) ||
 
From: $nameis ($visitormail)
 
School: $school ($school_id)\n
 
Rating: $rating 
 
Feedback: $feedback 
 
\n
 
IP = $ip 
 
Browser = $httpagent 
 
Deployment = $fromdom
 
";
 

	
 
$from = "From: $visitormail\r\n";
 

	
 
foreach($toaddrs as $toaddr){
 
  mail($toaddr, $subject, $message, $from);
 
}
 
/* $feedback_emails has its default set in inc/class.page.inc, can be set in config.inc */
 
foreach($feedback_emails as $toaddr)
 
  {
 
    mail($toaddr, $subject, $message, $from);
 
  }
 

	
 

	
 
?>
 

	
 
<p>Thanks for helping make SlatePermutate better. Your feedback is greatly appreciated.</p>
 
<p>We will attempt to respond via email if your feedback lends itself to a response.</p>
 

	
 

	
 
<?php
 
  $feedbackpage->foot();
inc/config.inc.example
Show inline comments
 
@@ -38,12 +38,22 @@
 
/* $short_url_base = 'http://example.com/sp/'; */
 

	
 

	
 
/**
 
 * \brief
 
 *   List of Google Analytics trackers to enable. Default: empty list.
 
 *
 
 * Set this to an array of Google Analytics tracker IDs if you want to
 
 * analyze access to your slate_permutate installation.
 
 */
 
/* $ga_trackers = array(); */
 
/* $ga_trackers = array('UA-XXXXXXXX-X'); */
 

	
 
/**
 
 * \brief
 
 *   List of email addresses to send feedback form submissions to.
 
 *
 
 * Set this to a PHP array of email addresses to which feedback
 
 * submissions should be mailed.
 
 */ 
 
/* $feedback_emails = array('ethanzonca@gmail.com, ngelderloos7@gmail.com, ohnobinki@ohnopublishing.net'); */
 
/* $feedback_emails = array('user@example.org'); */
0 comments (0 inline, 0 general)