Changeset - fd97f1f11524
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 14 years ago 2011-10-18 19:48:39
ohnobinki@ohnopublishing.net
Fix PHP warnings in feedback-submit.php.
2 files changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
feedback-submit.php
Show inline comments
 
@@ -36,49 +36,49 @@ if ($use_captcha)
 

	
 
<h3>Thanks!</h3>
 

	
 
<?php
 

	
 
$ip = $_POST['ip'];
 
$httpagent = $_POST['httpagent'];
 
$fromdom = $_POST['fromdom'];
 
$nameis = $_POST['nameis'];
 
$visitormail = $_POST['visitormail'];
 
$school = $_POST['school'];
 
$school_id = isset($_SESSION['school']) ? $_SESSION['school'] : '';
 
$feedback = $_POST['feedback'];
 
$rating = $_POST['rating'];
 
$referrer = $_POST['referrer'];
 

	
 
$saved_schedules = array();
 
if (!empty($_SESSION['saved']))
 
  foreach ($_SESSION['saved'] as $key => $val)
 
    $saved_schedules[] = $key;
 
$saved_schedules = implode(', ', $saved_schedules);
 

	
 
$reject = FALSE;
 

	
 
if (eregi('http:', $feedback)) { 
 
if (preg_match('/https?:/i', $feedback)) { 
 
  echo '<p>Please do not include URLs in your submission! Please click "back" and try again.</p>';
 
  $reject = TRUE;
 
}
 
if (empty($visitormail) || !preg_match('/^[^@]+@[^@]+\.[^@]+$/', $visitormail)) {
 
  echo '<p>Please click "back" and enter valid e-mail address.</p>';
 
  $reject = TRUE;
 
}
 
if(empty($nameis) || empty($feedback) || empty($visitormail)) {
 
  echo '<p>Please click "back" and fill in all fields.</p>';
 
  $reject = TRUE;
 
}
 

	
 
/** Check the captcha */
 
if ($use_captcha)
 
  {
 
    if (!$securimage->check($_REQUEST['captcha_code']))
 
      {
 
	echo '<p>Your captcha response was incorrect or expired. Please try again.</p>';
 
	$reject = TRUE;
 
      }
 
  }
 

	
 
if (!$reject)
 
  {
inc/class.page.php
Show inline comments
 
@@ -27,48 +27,49 @@ define('SP_PACKAGE_STRING', SP_PACKAGE_N
 

	
 
/*
 
 * Set up include() path for user-supplied libs (in case if his system
 
 * doesn't have libs, such as phpcaptcha
 
 * (securimage/securimage.php)). Users would store such libs in /libs.
 
 *
 
 * Coding note: dirname(dirname('a/b/c')) returns 'a'. This is a
 
 * similar effect to dirname('a/b/c') . DIRECTORY_SEPARATOR . '..'.
 
 */
 
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'libs');
 

	
 
/**
 
 * Not sure if there's a better place for this... it'd be a pita to
 
 * make a new include file like doconfig.inc but maybe that'll make
 
 * sense soon.
 
 */
 
/* defaults */
 
$clean_urls = FALSE;
 
$ga_trackers = array();
 
$feedback_emails = array('ez@ethanzonca.com, ngelderloos7@gmail.com, ohnobinki@ohnopublishing.net');
 
$use_captcha = FALSE;
 
$admin_enable_purge = FALSE;
 
$qtips_always = FALSE;
 
$input_warning_banner = FALSE;
 
$feedback_disk_log = FALSE;
 

	
 
$config_inc = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc';
 
if (file_exists($config_inc)) {
 
  require_once($config_inc);
 
}
 

	
 

	
 
/**
 
 * \brief
 
 *   Produces XHTML output for the user and helps with other browser
 
 *   interaction.
 
 *
 
 * Supports styled XHTML pages, modular script inclusion, and other
 
 * various features.
 
 */
 
class page
 
{
 

	
 
  /* Site-wide configuration options */
 
  private $base_title = 'SlatePermutate - Find the schedule that works for you!';
 
  private $doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"';
 
  private $htmlargs = 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"';
 

	
 
  private $pageGenTime = 0;
0 comments (0 inline, 0 general)