Example #1
0
    <div id="login">
      <div id="form">
        <div class="top">
          <h1>Removed Appointment</h1><br>
		  <div class="field">
          <?php 
$debug = false;
include '../CommonMethods.php';
include '../Appointment.php';
include '../Student.php';
include '../Advisor.php';
$COMMON = new Common($debug);
$indID = $_POST["IndApp"];
// Get appointment info from the database
$appt = new Appointment($COMMON, $indID);
$adv = $appt->getAdvisorID();
$advisor = new Advisor($COMMON, $adv);
if ($appt->getEnrolledID()) {
    $student = new Student($COMMON, trim($appt->getEnrolledID()));
    $std = $student->getFirstName() . " " . $student->getLastName();
    $eml = $student->getEmail();
}
$sql = "DELETE FROM `Proj2Appointments` WHERE `id`='{$indID}'";
$rs = $COMMON->executeQuery($sql, "Advising Appointments");
echo "Time: " . date('l, F d, Y g:i A', strtotime($appt->getTime())) . "<br>";
echo "Advisor: " . $advisor->convertFullName() . "<br>";
echo "Majors included: ";
if ($appt->getMajor()) {
    echo $appt->convertMajor() . "<br>";
} else {
    echo "Available to all majors<br>";
Example #2
0
include '../Appointment.php';
include '../Student.php';
include '../Advisor.php';
$COMMON = new Common($debug);
if ($_POST["finish"] == 'Cancel') {
    // Set status to none
    $stat = 'n';
} else {
    // Get student info from database
    $studid = $_SESSION["studID"];
    $student = new Student($COMMON, $studid);
    // Get new appointment info from database
    $newApptID = $_POST['appID'];
    $newAppt = new Appointment($COMMON, $newApptID);
    // Get new advisor ID
    $advisorID = $newAppt->getAdvisorID();
    if ($debug) {
        echo "Advisor -> {$advisorID}<br>\n";
    }
    // ************************ Lupoli 9-1-2015
    // we have to check to make sure someone did not steal that spot just before them!! (deadlock)
    // if the spot was taken, need to stop and reset
    if (isStillAvailable($_POST['appID'])) {
    } else {
        if ($debug == false) {
            header('Location: 13StudDenied.php');
            return;
        }
    }
    if ($_POST["finish"] == 'Reschedule') {
        // Get info from database about old appointment