diff --git a/class.schedule.php b/class.schedule.php --- a/class.schedule.php +++ b/class.schedule.php @@ -30,7 +30,15 @@ class Schedule $this->nclasses = 0; $this->scheduleName = $n; } - + + //-------------------------------------------------- + // Mutators and Accessors + //-------------------------------------------------- + public function getName() + { + return $this->scheduleName; + } + //-------------------------------------------------- // Adds a new class to the schedule. //-------------------------------------------------- diff --git a/images/close.png b/images/close.png new file mode 100644 index 0000000000000000000000000000000000000000..c8efe1fd84e98acbe59a37b6d0e15feabfbb610b GIT binary patch literal 700 zc$@*e0z>_YP)- zpXUrobemxqN#GMOX~BEJ1b_j*TsQ_!fFF|l$lY$BVHmar-+;I8AeaJcyy-gyeuDcO z62Ko9K1;gj07#+?ZD3<{Rgx53T&U9D-~OHl&w_Ix2{3Q<$eFveBuRRDcu;j{ zNVVBnDF`ITkuy3P$*C1aIS;Usg?c3UiG+gV + @@ -9,6 +17,14 @@ margin:auto; font-family: sans-serif; } + #savedBox { + width: 15em; + padding: 1em; + border: 1px solid #000; + float:right; + background: #DDD; + font-size: .8em; + } #header { text-align: left; background: rgb(220,220,220); /* IE fallback */ @@ -218,6 +234,10 @@ jQuery('#scheduleForm').resetForm(); }); + jQuery('#scheduleName').hover(function() { + jQuery(this).val(''); + }); + }); @@ -235,17 +255,17 @@
-

- Saved Schedules: -

- $schedule) - echo "Saved Schedule $key
"; -else - echo "No saved schedules!
"; + 0){ + echo '

Saved Schedules:

'; + foreach($_SESSION['saved'] as $key => $schedule){ + $sch = unserialize($schedule); + echo "#" . ($key + 1) . " - " . $sch->getName() . "
"; + } + echo '
'; +} ?>

@@ -253,10 +273,9 @@ else
- - + @@ -300,7 +319,6 @@ else
  • Check the saved schedule function. After input my default schedule, the output was the same as that of the demo. However, when I went back and clicked the "Saved Schedule 0" link, there were then 48 possible schedules. It seems that the classes were added twice for some reason.
  • -
  • Attempted to add schedule name field but was unsure of where to send the variable.
  • diff --git a/process.php b/process.php --- a/process.php +++ b/process.php @@ -67,6 +67,12 @@ if(!$DEBUG){ $savedSched->findPossibilities(); $savedSched->writeoutTables(); } + else if(isset($_GET['delsaved'])){ + $_SESSION['saved'][$_GET['delsaved']] = ''; + $_SESSION['saved'] = array_filter($_SESSION['saved']); // Remove null entries + header( 'Location: input.php' ) ; + + } else{ $allClasses = new Schedule($_POST['postData']['name']);
    Name this schedule: - - (For example: Fall ) +
    + (For example: Fall )