} } //major stuff $majorDB = ""; $majorPrint = "All"; if (!empty($majors)) { $majorPrint = ""; foreach ($majors as $m) { $majorDB .= $m . " "; $majorPrint .= $m . ", "; } $majorPrint = substr($majorPrint, 0, -2); } //get advisor id $User = $_SESSION["UserN"]; $Pass = getAdvisorPassword($_SESSION["UserN"]); $sql = "select `id` from `Proj2Advisors` where `Username` = '{$User}' and `Password` = '{$Pass}'"; $rs = $COMMON->executeQuery($sql, $_SERVER["SCRIPT_NAME"]); $row = mysql_fetch_row($rs); $id = $row[0]; //make sure app doesn't exist //insert new app to DB //print app foreach ($datetimes as $dt) { $sql = "SELECT * from `Proj2Appointments` where `Time` = '{$dt}' and `AdvisorID` = '0'"; $rs = $COMMON->executeQuery($sql, $_SERVER["SCRIPT_NAME"]); $row = mysql_fetch_row($rs); echo date('l, F d, Y g:i A', strtotime($dt)), "<br>Majors included: ", $majorPrint; echo "<br>Number of seats: {$studentLimit}"; echo '<br> Meeting Location: ' . $location; if ($row) {
/usr/bin/fs sa /afs/umbc.edu/public/web/sites/coeadvising/prod/php/session/ web.coeadvising all then edit .htaccess file here in the same directory */ session_start(); //Comes from AdminSignin.php include '../../CommonMethods.php'; include 'Functions.php'; $debug = false; $Common = new Common($debug); $_SESSION["UserN"] = strtoupper($_POST["UserN"]); //$_SESSION["PassW"] = strtoupper($_POST["PassW"]); $_SESSION["UserVal"] = false; $user = $_SESSION["UserN"]; $pass = getAdvisorPassword($user); $sql = "SELECT * FROM `Proj2Advisors` WHERE `Username` = '{$user}' AND `Password` = '{$pass}'"; $rs = $Common->executeQuery($sql, "Advising Appointments"); $row = mysql_fetch_row($rs); if ($row) { if ($debug) { echo "<br>" . var_dump($_SESSION) . "<- Session variables above<br>"; } else { header('Location: AdminUI.php'); } } else { $_SESSION["UserVal"] = true; header('Location: AdminSignIn.php'); }