Changeset - 1557c45be402
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 14 years ago 2011-10-18 19:41:06
ohnobinki@ohnopublishing.net
Replace user-pointing uses of date() with gmdate(), starting to address bug #116.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
feedback-submit.php
Show inline comments
 
@@ -63,49 +63,49 @@ if (eregi('http:', $feedback)) {
 
}
 
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)
 
  {
 
    $feedback = stripcslashes($feedback);
 

	
 
    $message = date('l, F j, Y, g:i a') ."
 
    $message = gmdate('l, F j, Y, g:i a') ."
 
From: $nameis ($visitormail)
 
School: $school ($school_id)\n
 
Rating: $rating 
 
Feedback: $feedback 
 
\n
 
IP = $ip 
 
Browser = $httpagent 
 
Deployment = $fromdom
 
Referrer = $referrer
 
saved_schedules = $saved_schedules
 
";
 

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

	
 
    /* $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);
 
      }
 

	
 
    if($feedback_disk_log) {
 
      $file = fopen($feedback_disk_log_file,'a') or die("Can't open file.");
 
      fwrite($file, $message . "----------------------------------------\n");
 
      fclose($file);
inc/class.schedule.php
Show inline comments
 
@@ -752,49 +752,49 @@ class Schedule
 
		// End of row
 
		echo "          </tr>\n";
 
	      }
 

	
 
	    // End of table
 
	    echo "        </table>\n"
 
              . '         <span class="course-data">'.  htmlentities(json_encode($permutation_courses)) . "</span>\n"
 
	      . '      </div> <!-- id="section' . ($i + 1) . "\" -->\n";
 
	  }
 

	
 
          echo "    </div> <!-- class=\"scontent\" -->\n"
 
	     . "  </div> <!-- class=\"scroller\" -->\n"
 
	     . "</div> <!-- id=\"my-glider\" -->\n"
 
	     . $footcloser; // Closes off the content div
 
      } else {
 
      echo '<html><body><p>There are no possible schedules. Please <a href="input.php?s='.$this->id.'">try again</a>.</p></body></html>';
 
    }
 

	
 
    echo '<p id="possiblestats">' . PHP_EOL
 
      . '  There were a total of ' . $this->possiblePermutations . ' possible permutations. Only ' . $this->nPermutations . ' permutations had no class conflicts.' . PHP_EOL
 
      . '</p>' . PHP_EOL;
 
    if ($this->created)
 
      echo ''
 
	. '<p id="created-time">' . PHP_EOL
 
	. '  Created <span class="cute-time">' . date('c', $this->created) . '</span>.' . PHP_EOL
 
	. '  Created <span class="cute-time">' . gmdate('c', $this->created) . '</span>.' . PHP_EOL
 
	. '</p>' . PHP_EOL;
 

	
 
    $outputPage->foot();
 
  }
 

	
 
  //--------------------------------------------------
 
  // Changes the title of the page.
 
  //--------------------------------------------------
 
  function changeTitle($t)
 
  {
 
    $this->title = $t;
 
  }
 

	
 
  //--------------------------------------------------
 
  // Make the time "pretty"
 
  //--------------------------------------------------
 
  function prettyTime($t){
 
    if($t >= 1200)
 
      {
 
	if ($t > 1259)
 
	  $t = ($t - 1200);
 
	return substr($t, 0, strlen($t)-2) . ":" . substr($t, strlen($t)-2, strlen($t)) . " PM";
 
      } else {
 
      return substr($t, 0, strlen($t)-2) . ":" . substr($t, strlen($t)-2, strlen($t)) . " AM";
0 comments (0 inline, 0 general)