示例#1
0
    echo "<label for='info'>";
    echo "Advisor: ", $oldAdvisorName, "<br>";
    // Display advisor office for individual advisor
    if (isset($oldAdvisorOffice)) {
        echo "Office: ", $oldAdvisorOffice, "<br>";
    }
    echo "Appointment: ", date('l, F d, Y g:i A', $oldDatephp), "<br>";
    // Display meeting location
    echo "Meeting Location: ", $appt->getMeeting(), "</label><br>";
    // Hidden input for old appointment ID
    echo "<input type='hidden' name='oldAppID' value='{$oldApptID}'>";
}
$currentAdvisorID = $_POST["advisor"];
$currentDatephp = strtotime($_POST["appTime"]);
// Get appointment information for current appointment, even if it's taken
$appointments = Appointment::searchAppointments($COMMON, $currentAdvisorID, $student->getMajor(), $_POST["appTime"], null, false, 1, '');
$currentAppt = $appointments[0];
$currentApptID = $currentAppt->getID();
if ($currentAdvisorID != 0) {
    // Individual advisor, so get info from database
    $currentAdvisor = new Advisor($COMMON, $currentAdvisorID);
    $currentAdvisorName = $currentAdvisor->convertFullName();
    $currentAdvisorOffice = $currentAdvisor->getOffice();
} else {
    // Group advising appointment
    $currentAdvisorName = "Group";
}
echo "<h2>Current Appointment</h2>";
echo "<label for='newinfo'>";
echo "Advisor: ", $currentAdvisorName, "<br>";
// Display office for individual advisor
示例#2
0
    <meta charset="UTF-8" />
    <title>Search for Appointment</title>
	<link rel='stylesheet' type='text/css' href='../css/standard.css'/>
  </head>
  <body>
    <div id="login">
      <div id="form">
        <div class="top">
		<h1>Search Results</h1>
		<h3>Showing open appointments only</h3>
	    <div class="field">
			<p>Showing results for: </p>
			<?php 
// Get student data from database
$student = new Student($COMMON, $_SESSION["studID"]);
$major = $student->getMajor();
$date = $_POST["date"];
$times = $_POST["time"];
$advisor = $_POST["advisor"];
$results = array();
if ($date == '') {
    echo "Date: All";
} else {
    echo "Date: ", $date;
    $date = date('Y-m-d', strtotime($date));
}
echo "<br>";
if (empty($times)) {
    echo "Time: All";
} else {
    $i = 0;
示例#3
0
  </head>
  <body>
    <div id="login">
      <div id="form">
        <div class="top">
		<h1>Select Appointment Time</h1>
	    <div class="field">
		<form action = "10StudConfirmSch.php" method = "post" name = "SelectTime">
	    <?php 
// Hidden form field for advisor ID
echo "<input type='hidden' name='advisor' value='{$localAdvisor}'>";
// http://php.net/manual/en/function.time.php fpr SQL statements below
// Comparing timestamps, could not remember.
$curtime = time();
// Search for open appointments with given advisor, student's major, and that are in the future
$appointments = Appointment::searchAppointments($COMMON, $localAdvisor, $student->getMajor());
// Display title
if ($localAdvisor != 0) {
    echo "<h2>Individual Advising</h2><br>";
    echo "<label for='prompt'>Select appointment with ", $advisor->convertFullName(), ":</label><br>";
} else {
    echo "<h2>Group Advising</h2><br>";
    echo "<label for='prompt'>Select appointment:</label><br>";
}
// Display all appointment options on screen
foreach ($appointments as $appt) {
    $datephp = strtotime($appt->getTime());
    echo "<label for='", $appt->getID(), "'>";
    echo "<input id='", $appt->getID(), "' type='radio' name='appTime' required value='", $appt->getTime(), "'>", date('l, F d, Y g:i A', $datephp), "</label><br>\n";
}
?>
示例#4
0
echo $student->getStudentId();
?>
>
			</div>
			<div class="field">
				<label for="email">E-mail</label>
				<input id="email" size="30" maxlength="255" type="email" name="email" required value=<?php 
echo $student->getEmail();
?>
>
			</div>
			<div class="field">
					<label for="major">Major</label>
					<select id="major" name = "major">
					<option <?php 
if ($student->getMajor() == 'CMPE') {
    echo "selected";
}
?>
>Computer Engineering</option>
					<option <?php 
if ($student->getMajor() == 'CMSC') {
    echo "selected";
}
?>
>Computer Science</option>
					<option <?php 
if ($student->getMajor() == 'MENG') {
    echo "selected";
}
?>