當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Appointment::convertMajor方法代碼示例

本文整理匯總了PHP中Appointment::convertMajor方法的典型用法代碼示例。如果您正苦於以下問題:PHP Appointment::convertMajor方法的具體用法?PHP Appointment::convertMajor怎麽用?PHP Appointment::convertMajor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Appointment的用法示例。


在下文中一共展示了Appointment::convertMajor方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: trim

            $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();
            $message = "The following group appointment has been deleted by the adminstration of your advisor: " . "\r\n" . "Time: " . $appt->getTime() . "\r\n" . "To schedule for a new appointment, please log back into the UMBC COEIT Engineering and Computer Science Advising webpage." . "\r\n" . "http://coeadvising.umbc.edu  -> COEIT Advising Scheduling \r\n Reminder, this is only accessible on campus.";
            mail($eml, "Your COE Advising Appointment Has Been Deleted", $message);
        }
    }
    $sql = "DELETE FROM `Proj2Appointments` WHERE `id`='{$appID}'";
    $rs = $COMMON->executeQuery($sql, "Advising Appointments");
    echo "Time: " . date('l, F d, Y g:i A', strtotime($appt->getTime())) . "<br>";
    echo "Majors included: ";
    if ($appt->getMajor()) {
        echo $appt->convertMajor(', ') . "<br>";
    } else {
        echo "Available to all majors<br>";
    }
    echo "Number of students enrolled: " . $appt->getEnrolledNum() . "<br>";
    echo "Student limit: " . $appt->getMax();
    echo "<br><br>";
    echo "<form method=\"link\" action=\"AdminUI.php\">";
    echo "<input type=\"submit\" name=\"next\" class=\"button large go\" value=\"Return to Home\">";
    echo "</form>";
    echo "</div>";
    echo "<div class=\"bottom\">";
    if ($stds[0]) {
        echo "<p style='color:red'>Students have been notified of the cancellation.</p>";
    }
} else {
開發者ID:jb-aero,項目名稱:Project2,代碼行數:31,代碼來源:AdminConfirmEditGroup.php

示例2: Appointment

// 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: ";
if ($appt->getEnrolledID()) {
    echo "{$std}</b>";
    $sql = "UPDATE `Proj2Students` SET `Status`='C' WHERE `StudentID` = '" . trim($appt->getEnrolledID()) . "'";
    $rs = $COMMON->executeQuery($sql, "Advising Appointments");
    $message = "The following appointment has been deleted by the adminstration of your advisor: " . "\r\n" . "Time: " . $appt->getTime() . "\r\n" . "Advisor: " . $advisor->convertFullName() . "\r\n" . "Student: {$std}" . "\r\n" . "To schedule for a new appointment, please log back into the UMBC COEIT Engineering and Computer Science Advising webpage." . "\r\n" . "http://coeadvising.umbc.edu  -> COEIT Advising Scheduling \r\n Reminder, this is only accessible on campus.";
    mail($eml, "Your Advising Appointment Has Been Deleted", $message);
} else {
    echo "Empty";
}
?>
			<br><br>
開發者ID:jb-aero,項目名稱:Project2,代碼行數:31,代碼來源:AdminConfirmEditInd.php


注:本文中的Appointment::convertMajor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。