diff --git a/inc/class.page.php b/inc/class.page.php --- a/inc/class.page.php +++ b/inc/class.page.php @@ -152,6 +152,7 @@ class page /* everything that needs sessions started to work: */ $this->school = school_load_guess(); + $this->semester = school_semester_guess($this->school); if($immediate && $ntitle != "NOHEAD") @@ -229,7 +230,11 @@ class page '

SlatePermutate

'. PHP_EOL . '

'. PHP_EOL . ' '.$this->pagetitle.''. PHP_EOL . - ' Profile: '.$this->school['name'].' (change)'. PHP_EOL . + ' ' . PHP_EOL + . ' Profile: '.$this->school['name'].' (change)' . PHP_EOL; + if ($this->semester !== NULL) + echo ' Semester: ' . $this->semester['name'] . '(change)' . PHP_EOL; + echo ' '. PHP_EOL . '

'. PHP_EOL . ' '. PHP_EOL . ' '. PHP_EOL . @@ -319,6 +324,52 @@ class page /** * \brief + * Display a list of semesters the user might be interested in. + * \param $linkto + * The link to which a &semester= or ?semester= query string + * should be appended. + */ + public function showSemesters($linkto = 'input.php') + { + if (strpos($linkto, '?')) + $linkto .= '&'; + else + $linkto .= '?'; + /* + * We can pre-htmlentities() $linkto because we're only appending + * a safe string. + */ + $linkto = htmlentities($linkto . 'semester='); + + $time = time(); + + echo "

\n"; + echo "

\n"; + echo "

\n"; + } + + /** + * \brief * Display school-specific instructions for using slate_permutate. */ public function showSchoolInstructions()