diff --git a/auto.php b/auto.php
--- a/auto.php
+++ b/auto.php
@@ -37,26 +37,32 @@ require_once('class.class.php');
 
 Page::session_start();
 
-if (isset($_REQUEST['txt']))
+if (isset($_REQUEST['txt'])) {
   header('Content-Type: text/plain; encoding=utf-8');
-else
+}
+else {
   header('Content-Type: application/json; encoding=utf-8');
+}
 
-if (!isset($_REQUEST['term']))
+if (!isset($_REQUEST['term'])) {
   clean_empty_exit();
+}
 
 $getsections = FALSE;
-if (isset($_REQUEST['getsections']))
+if (isset($_REQUEST['getsections'])) {
   $getsections = TRUE;
+}
 
 $term = $_REQUEST['term'];
 $term_parts = Classes::parse($term);
-if (!count($term_parts))
+if (!count($term_parts)) {
   clean_empty_exit();
+}
 
 $school = school_load_guess();
-if (!$school['crawled'])
+if (!$school['crawled']) {
   clean_empty_exit();
+}
 
 $cache_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'auto' . DIRECTORY_SEPARATOR . $school['id'] . DIRECTORY_SEPARATOR;
 
@@ -71,13 +77,16 @@ if (!$school['crawled'])
 if (!$getsections && count($term_parts) == 1 && $term_strlen == strlen($dept))
   {
     $dept_file = $cache_dir . '-depts';
-    if (!file_exists($dept_file))
+    if (!file_exists($dept_file)) {
       clean_empty_exit();
+    }
     $departments = unserialize(file_get_contents($dept_file));
     $json_depts = array();
-    foreach ($departments as $key => $department)
-      if (!strncmp($department, $dept, $dept_strlen))
+    foreach ($departments as $key => $department) {
+      if (!strncmp($department, $dept, $dept_strlen)) {
 	$json_depts[] = $department;
+      }
+    }
 
     echo json_encode($json_depts);
     exit(0);
@@ -91,7 +100,7 @@ if ($getsections)
 	readfile($section_file);
 	exit(0);
       }
-    /* section not found! */
+    /* Section not found! */
     header('HTTP/1.1 404: Not found');
     header('Content-Type: text/plain; encoding=utf-8');
     echo 'Could not find course ' . implode('-', $term_parts) . "\n";
@@ -99,7 +108,7 @@ if ($getsections)
   }
 
 /*
- * if a department is fully entered, life gets slightly more
+ * If a department is fully entered, life gets slightly more
  * complicated. I suppose I only want to autocomplete the first digit
  * of the course/class number. I.e., CS-2 for CS-262 for when the
  * student has entered CS- or 'CS'. But for now we can just dump the entire department at the user ;-).
@@ -126,7 +135,7 @@ if (file_exists($classes_file))
   }
 
 /**
- * Nothing caught..
+ * Nothing caught
  */
 clean_empty_exit();
 
diff --git a/class.class.php b/class.class.php
--- a/class.class.php
+++ b/class.class.php
@@ -28,7 +28,7 @@ include_once 'class.section.php';
 
 class Classes
 {
-  private $name;		// String
+  private $name;	// String
   private $sections;	// Array of sections
   private $nsections;	// int
     
@@ -49,7 +49,7 @@ class Classes
   public function section_add(Section $section)
   {
     $this->sections[$this->nsections] = $section;
-    $this->nsections ++;
+    $this->nsections++;
   }
 
   //--------------------------------------------------
@@ -65,14 +65,6 @@ class Classes
   //--------------------------------------------------
   function getSection($i)
   {
-    // Checks to make sure the desired section is part of the set.
-    if(isset($this->sections[$i]))
-      {
-	//echo "Object sections[$i] was set
";
-      } else {
-      echo "Object sections[$i] was NOT set 
";
-    }
-
     $result = $this->sections[$i];
     return $result;
   }
@@ -91,10 +83,11 @@ class Classes
    */
   public function section_get($letter)
   {
-    foreach ($this->sections as $section)
-      if ($section->getLetter() == $letter)
+    foreach ($this->sections as $section) {
+      if ($section->getLetter() == $letter) {
 	return $section;
-
+      }
+    }
     return NULL;
   }
 
@@ -126,8 +119,9 @@ class Classes
   public static function parse($course_spec)
   {
     $section_parts = Section::parse($course_spec);
-    if (isset($section_parts['section']))
+    if (isset($section_parts['section'])) {
       unset($section_parts['section']);
+    }
 
     return $section_parts;
   }
diff --git a/class.schedule.php b/class.schedule.php
--- a/class.schedule.php
+++ b/class.schedule.php
@@ -96,7 +96,7 @@ class Schedule
       {
 	$temp = $this->classStorage[$counter]->getName();
 			
-	if((strcmp($temp,$course_name)) == 0)
+	if(strcmp($temp,$course_name) == 0)
 	  {
 	    $found = true;
 	  } else {
@@ -214,7 +214,7 @@ class Schedule
     $filled = false;
     $time = array(700,730,800,830,900,930,1000,1030,1100,1130,1200,1230,1300,1330,1400,1430,1500,1530,1600,1630,1700,1730,1800,1830,1900,1930,2000,2030,2100,2130, 2200);
 
-    define('SP_PERMUTATIONS_PER_PAGE', 256);
+    define('SP_PERMUTATIONS_PER_PAGE', 256); /** @TODO: Define this in config.inc */
 
     $npages = ceil($this->nPermutations / SP_PERMUTATIONS_PER_PAGE);
     $page = 0;
@@ -243,7 +243,7 @@ class Schedule
 
 
 
-    if(isset($_REQUEST['print'])){
+    if(isset($_REQUEST['print'])) {
  
      echo '';
 
       echo '
Having problems? Let us know.
Keyboard Shortcut: Left and right arrow keys switch between schedules
'; + echo ' jQuery(document).ready( function() {'; + echo ' jQuery("#tabs").tabs();'; + echo ' jQuery("#sharedialog").dialog({ modal: true, width: 550, resizable: false, draggable: false, autoOpen: false });'; + echo ' jQuery("#share").click( function() { + jQuery("#sharedialog").dialog("open"); + });'; + echo ' jQuery(\'#printItems\').click( function() { + window.location = "'.$_SERVER['SCRIPT_NAME'].'?s='.$this->id_get().'&print=" + (jQuery(\'#tabs\').tabs(\'option\',\'selected\') + 1); + }); + jQuery(\'#cancelItems\').click( function() { + jQuery(\'#selectItemsInput\').hide(); + });'; + echo ' }); + '; + + echo ''; + echo ''; + echo 'Having problems? Let us know.
'; + echo 'Keyboard Shortcut: Left and right arrow keys switch between schedules
'; } echo "\n"; if($this->nPermutations > 0) { - echo "Thanks for helping make SlatePermutate better. Your feedback is greatly appreciated.
-We will attempt to respond via email if your feedback lends itself to a response.
+ echo 'Thanks for helping make SlatePermutate better. Your feedback is greatly appreciated.'; + echo '
We will attempt to respond via email if your feedback lends itself to a response.
'; - -foot(); + $feedbackpage->foot(); diff --git a/feedback.php b/feedback.php --- a/feedback.php +++ b/feedback.php @@ -18,23 +18,23 @@ * along with SlatePermutate. If not, see