Exemple #1
0
?>
>Computer Engineering</option>
					<option value="CMSC" <?php 
if (getStudentMajorByID($_SESSION["studID"]) == 'CMSC') {
    echo "selected";
}
?>
>Computer Science</option>
					<option value="MENG" <?php 
if (getStudentMajorByID($_SESSION["studID"]) == 'MENG') {
    echo "selected";
}
?>
>Mechanical Engineering</option>
					<option value="CENG" <?php 
if (getStudentMajorByID($_SESSION["studID"]) == 'CENG ') {
    echo "selected";
}
?>
>Chemical Engineering</option>
<!-- someday
					<option <?php 
if ($_SESSION["major"] == 'Africana Studies') {
    echo "selected";
}
?>
>Africana Studies</option>
					<option <?php 
if ($_SESSION["major"] == 'American Studies') {
    echo "selected";
}
Exemple #2
0
  </head>
  <body>
  <?php 
include 'header.php';
?>
    <div id="login">
      <div id="form">
        <div class="top">
		<h1>Cancel Appointment</h1>
	    <div class="field">
	    <?php 
//Added function calls
$firstn = getStudentFirstNameByID($_SESSION["studID"]);
$lastn = getStudentLastNameByID($_SESSION["studID"]);
$studid = $_SESSION["studID"];
$major = getStudentMajorByID($_SESSION["studID"]);
$email = getStudentEmailByID($_SESSION["studID"]);
//Select the current appointment for user
$sql = "select * from Proj2Appointments where `EnrolledID` like '%{$studid}%'";
$rs = $COMMON->executeQuery($sql, $_SERVER["SCRIPT_NAME"]);
$row = mysql_fetch_row($rs);
$oldAdvisorID = $row[2];
$oldDatephp = strtotime($row[1]);
//if it is group advising.... get this data
if ($oldAdvisorID != 0) {
    $sql2 = "select * from Proj2Advisors where `id` = '{$oldAdvisorID}'";
    $rs2 = $COMMON->executeQuery($sql2, $_SERVER["SCRIPT_NAME"]);
    $row2 = mysql_fetch_row($rs2);
    $oldAdvisorName = $row2[1] . " " . $row2[2];
} else {
    $oldAdvisorName = "Group";
Exemple #3
0
session_start();
$debug = false;
include '../../CommonMethods.php';
$COMMON = new Common($debug);
//Include functions
include "Functions.php";
if ($_POST["finish"] == 'Cancel') {
    $_SESSION["status"] = "none";
} else {
    //Grab all User data
    //Changed to function calls
    $firstn = getStudentFirstNameByID($_SESSION["firstN"]);
    $lastn = getStudentLastNameByID($_SESSION["lastN"]);
    $studid = $_SESSION["studID"];
    $major = getStudentMajorByID($_SESSION["major"]);
    $email = getStudentEmailByID($_SESSION["email"]);
    $advisor = $_SESSION["advisor"];
    if ($debug) {
        echo "Advisor ->" . $advisor . "<br>\n";
    }
    //If student doesn't exist, create them.
    $apptime = $_SESSION["appTime"];
    if ($_SESSION["studExist"] == false) {
        $sql = "insert into Proj2Students (`FirstName`,`LastName`,`StudentID`,`Email`,`Major`) values ('{$firstn}','{$lastn}','{$studid}','{$email}','{$major}')";
        $rs = $COMMON->executeQuery($sql, $_SERVER["SCRIPT_NAME"]);
    }
    // ************************ 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($apptime, $advisor)) {
Exemple #4
0
<?php

session_start();
$debug = false;
include '../../CommonMethods.php';
$COMMON = new Common($debug);
//Include functions
include "Functions.php";
if (isset($_POST["advisor"])) {
    $_SESSION["advisor"] = $_POST["advisor"];
}
$localAdvisor = $_SESSION["advisor"];
//echo $localAdvisor;
//Get student Major from Function
$localMaj = getStudentMajorByID($_SESSION["studID"]);
?>
<!-- Get data for advisors and user data-->
<html lang="en">
  <head>
    <meta charset="UTF-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Select Appointment</title>
      <link rel='stylesheet' type='text/css' href='style.css'/>
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

  </head>
  <body>
  <?php 
include 'header.php';
?>
    <div id="login">