本文整理汇总了PHP中Appointment::getEnrolledID方法的典型用法代码示例。如果您正苦于以下问题:PHP Appointment::getEnrolledID方法的具体用法?PHP Appointment::getEnrolledID怎么用?PHP Appointment::getEnrolledID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Appointment
的用法示例。
在下文中一共展示了Appointment::getEnrolledID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Common
<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>";
}
echo "Enrolled: ";
示例2: Common
$delete = !isset($_POST["edit"]);
// Get appointment ID from post or get
if (isset($_POST["GroupApp"])) {
$appID = $_POST["GroupApp"];
} else {
$appID = $_GET["app"];
}
include '../CommonMethods.php';
include '../Appointment.php';
include '../Student.php';
$COMMON = new Common($debug);
// Get appointment info
$appt = new Appointment($COMMON, $appID);
if ($delete == true) {
echo "<h1>Removed Appointment</h1><br>";
$stds = $appt->getEnrolledID();
$stds = trim($stds);
// had some side white spaces sometimes
$stds = split(" ", $stds);
if ($debug) {
var_dump("\n<BR>EMAILS ARE: {$stds} \n<BR>");
}
// foreach($stds as $element) { echo("->".$element."\n"); }
if ($stds[0]) {
foreach ($stds as $element) {
$element = trim($element);
$sql = "UPDATE `Proj2Students` SET `Status`='C' WHERE `StudentID` = '{$element}'";
$rs = $COMMON->executeQuery($sql, "Advising Appointments");
// Get student info from database
$student = new Student($COMMON, $element);
$eml = $student->getEmail();
示例3: header
// ************************ 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
$oldApptID = $_POST["oldAppID"];
$oldAppt = new Appointment($COMMON, $oldApptID);
//remove stud from EnrolledID
$newIDs = str_replace($studid, "", $oldAppt->getEnrolledID());
if ($debug) {
echo "Old IDs: " . $oldAppt->getEnrolledID() . "<br>";
echo "New IDs: {$newIDs}<br>";
}
$sql = "update `Proj2Appointments` set `EnrolledNum` = EnrolledNum-1, `EnrolledID` = '{$newIDs}' where `id`='{$oldApptID}'";
$rs = $COMMON->executeQuery($sql, $_SERVER["SCRIPT_NAME"]);
// Status is rescheduled appointment
$stat = 'r';
} else {
// Status is normal appointment scheduling
$stat = 'co';
}
// Schedule new app
// Add new student ID to list of ID's and update enrollment total
$newIDs = $newAppt->getEnrolledID() . " {$studid}";