当前位置: 首页>>代码示例>>PHP>>正文


PHP Student::getLastName方法代码示例

本文整理汇总了PHP中Student::getLastName方法的典型用法代码示例。如果您正苦于以下问题:PHP Student::getLastName方法的具体用法?PHP Student::getLastName怎么用?PHP Student::getLastName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Student的用法示例。


在下文中一共展示了Student::getLastName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: validate

 public function validate(Student $student)
 {
     $this->validateFirstName($student->getFirstName());
     $this->validateLastName($student->getLastName());
     $this->validateGroupNumber($student->getGroupNumber());
     $this->validateEmail($student->getEmail());
     $this->validateMark($student->getMark());
     $this->validateBirthYear($student->getBirthYear());
     $this->validateSexOpt($student->getSex());
     $this->validateLocalityOpt($student->getLocality(true));
 }
开发者ID:soulsteel,项目名称:studentProject,代码行数:11,代码来源:Validator.php

示例2: displayIndividual

function displayIndividual($id, $date)
{
    global $debug;
    global $COMMON;
    $sql = "SELECT `Time`, `Major`, `EnrolledID` FROM `Proj2Appointments` \n        WHERE `Time` LIKE '{$date}%' AND `AdvisorID`='{$id}' AND `MAX`=1 ORDER BY `Time`";
    $rs = $COMMON->executeQuery($sql, "Advising Appointments");
    $matches = mysql_num_rows($rs);
    // see how many rows were collected by the query
    if ($debug) {
        echo "matches was {$matches}";
    }
    if ($matches == 0) {
        return;
    }
    echo "<h3>Individual Appointments:</h3>";
    echo "<table border='1'><th colspan='4'>Individual Appointments</th>\n";
    echo "<tr><td width='60px'>Time:</td><td>Majors Included:</td><td>Student's name</td><td>Student ID</td></tr>\n";
    while ($row = mysql_fetch_array($rs, MYSQL_NUM)) {
        echo "<tr>";
        echo "<td>" . date('g:i A', strtotime($row[0])) . "</td>";
        echo "<td>" . $row[1] . "</td>";
        if (strlen($row[2]) > 0) {
            $stud = $row[2];
            $student = new Student($COMMON, strtoupper($stud));
            $firstName = $student->getFirstName();
            $lastName = $student->getLastName();
            echo "<td>" . $firstName . " " . $lastName . "</td>";
        } else {
            echo "<td></td>";
        }
        echo "<td>" . $row[2] . "</td>";
        echo "</tr>";
    }
    echo "</table><br><br>";
}
开发者ID:jb-aero,项目名称:Project2,代码行数:35,代码来源:AdminPrintResults.php

示例3: foreach

    echo "<tr><td width='320px'>Time</td><td>Majors</td><td>Enrolled</td></tr>\n";
    // Display all items
    foreach ($appointments as $appt) {
        $advisorname = getAdvisorName($appt->getAdvisorID());
        if ($appt->getEnrolledID()) {
            $student = new Student($COMMON, trim($appt->getEnrolledID()));
        }
        echo "<tr><td><label for='" . $appt->getID() . "'><input type=\"radio\" id='" . $appt->getID() . "' name=\"IndApp\" \n                  required value=\"" . $appt->getID() . "\">";
        echo date('l, F d, Y g:i A', strtotime($appt->getTime())) . "</label></td>";
        if ($appt->getMajor()) {
            echo "<td>" . $appt->convertMajor() . "</td>";
        } else {
            echo "Available to all majors";
        }
        if ($appt->getEnrolledId()) {
            echo "<td>" . $student->getFirstName() . " " . $student->getLastName() . "</td>";
        } else {
            echo "<td>Empty</td>";
        }
        echo "</tr>\n";
    }
    echo "</table>";
    echo "<div class=\"nextButton\">";
    echo "<input type=\"submit\" name=\"next\" class=\"button large go\" value=\"Delete Appointment\">";
    echo "</div>";
    echo "</form>";
    echo "<form method=\"link\" action=\"AdminUI.php\">";
    echo "<input type=\"submit\" name=\"next\" class=\"button large\" value=\"Cancel\">";
    echo "</form>";
} else {
    echo "<br><b>There are currently no individual appointments scheduled.</b>";
开发者ID:jb-aero,项目名称:Project2,代码行数:31,代码来源:AdminEditInd.php

示例4: Common

		  <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: ";
if ($appt->getEnrolledID()) {
    echo "{$std}</b>";
开发者ID:jb-aero,项目名称:Project2,代码行数:31,代码来源:AdminConfirmEditInd.php

示例5:

	<div id="login">
		<div id="form">
			<div class="top">
			<h2>Edit Student Information<span class="login-create"></span></h2>
			<form action="StudProcessEdit.php" method="post" name="Edit">
			<div class="field">
				<label for="firstN">First Name</label>
				<input id="firstN" size="30" maxlength="50" type="text" name="firstN" required value=<?php 
echo $student->getFirstName();
?>
>
			</div>
			<div class="field">
				<label for="lastN">Last Name</label>
				<input id="lastN" size="30" maxlength="50" type="text" name="lastN" required value=<?php 
echo $student->getLastName();
?>
>
			</div>
			<div class="field">
				<label for="studID">Student ID</label>
				<input id="studID" size="30" maxlength="7" type="text" pattern="[A-Za-z]{2}[0-9]{5}" title="AB12345" name="studID" disabled value=<?php 
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();
?>
开发者ID:jb-aero,项目名称:Project2,代码行数:31,代码来源:06StudEditInfo.php


注:本文中的Student::getLastName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。