Changeset - 5cce14d5f1c2
[Not reviewed]
default
0 2 0
ethanzonca - 15 years ago 2010-07-09 22:52:37

Added title functionality
2 files changed with 8 insertions and 4 deletions:
0 comments (0 inline, 0 general)
input.php
Show inline comments
 
@@ -250,18 +250,19 @@ else
 

	
 
	</p>
 

	
 
<form method="post" action="process.php" id="scheduleForm">
 

	
 
<table id="jsrows">
 
<!--	<tr>
 
	<tr id="namecol">
 
		<td colspan="11">Name this schedule:
 
			<input type="text" class="required" name="postData[name]" />
 
			(For example: Fall <?php echo Date("Y"); ?>)
 
		</td>
 
	</tr>-->
 
	</tr>
 

	
 
<!-- Header -->
 
	<tr>
 
		<td>Class</td>
 
		<td class="center">Letter</td>
 
		<td class="center">Start Time</td>
 
		<td class="center">End Time</td>
process.php
Show inline comments
 
@@ -65,24 +65,27 @@ if(!$DEBUG){
 
	if(isset($_GET['savedkey'])){
 
		$savedSched = unserialize($_SESSION['saved'][$_GET['savedkey']]);
 
                $savedSched->findPossibilities();
 
		$savedSched->writeoutTables();
 
	}
 
	else{
 
		$allClasses = new Schedule("Fall 2010");
 
		$allClasses = new Schedule($_POST['postData']['name']);
 
	
 
		foreach(sortInputs($_POST) as $class)
 
		{
 
			if(is_array($class)) // Skip the schedule name
 
			{
 
			$allClasses->addClass($class['name']);
 
	
 
			foreach($class as $section)
 
				if(is_array($section)) // Skip the name, which isn't a section
 
					if(is_array($section)) // Skip the section name, which isn't a section
 
				{
 
			             $allClasses->addSection($class['name'], $section['letter'], $section['start'], $section['end'], arrayToDays($section['days']));
 
				}
 
		}
 
		}
 
		$allClasses->findPossibilities();
 
		$allClasses->writeoutTables();
 
		if(!isset($_SESSION['saved']))
 
			$_SESSION['saved'] = array();
 
		array_push ( $_SESSION['saved'], serialize($allClasses));
 
	}
0 comments (0 inline, 0 general)