} if (isset($_POST['submit3'])) { $_SESSION['section'] = $_POST['section']; //then find events, check for conflicts, add to calendar. $error = add_event($_SESSION['section'], "section", $_SESSION['year'], $_SESSION['season'], $_SESSION['ta_id']); } if (isset($_POST['submit'])) { $_SESSION['crn'] = $_POST['crn']; //get section id from CRN or return NOT FOUND $error = add_event($_SESSION['crn'], "crn", $_SESSION['year'], $_SESSION['season'], $_SESSION['ta_id']); } if (isset($_POST['drop'])) { //drop this section from db //the value comes in as dept|course|section $s = explode("|", $_POST['assigned']); drop_section($s[2], $s[1], $s[0], $_SESSION['year'], $_SESSION['season'], $_SESSION['ta_id']); } ?> <form name="quarter_form" id="quarter_form" action="quarter.php" method="post"> <p style="margin-left: 20px">Select a quarter: <select name="quarter" id="quarter"> <?php populate_quarters(); ?> </select> </p> <input class="button blue" style="padding: 5px; font-size:small; float:right" type="submit" name="submit" id="submit" value="Submit"/> </form> <?php } else { $quarter = explode("|", $_POST['quarter']); $_SESSION['year'] = $quarter[0]; $_SESSION['season'] = $quarter[1]; $_SESSION['season_name'] = $quarter[2];
header("Location:loginstaff.php"); } if (!isset($_SESSION['year'])) { session_regenerate_id(true); session_write_close(); header("Location:quarterstaff.php"); } if (isset($_POST['new'])) { //new custom event $_SESSION['error'] = custom_section($_POST['tacal'], '', '', $_POST['name'], $_SESSION['year'], $_SESSION['season'], $_POST['day'], $_POST['eventstart'], $_POST['eventend']); $_GET['tacal'] = $_POST['tacal']; } //new custom event if (isset($_POST['r'])) { $_GET['tacal'] = $_POST['tacal']; drop_section($_POST['drop'], '', '', $_SESSION['year'], $_SESSION['season'], $_POST['tacal']); } //remove custom event staffheader($_SESSION['name'], "tacal.php", $_SESSION['year'], $_SESSION['season_name'], $_SESSION['season']); ?> <link rel="stylesheet" type="text/css" href="css/calendar.css"> <!--start main container --> <div style="margin-top:10px;" id="error-message"> <?php print $_SESSION['error']; unset($_SESSION['error']); ?> </div> <fieldset style="background-color:white;"> <legend><p2 class="shadow40">Select TA :