本文整理汇总了PHP中formatName函数的典型用法代码示例。如果您正苦于以下问题:PHP formatName函数的具体用法?PHP formatName怎么用?PHP formatName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formatName函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _
}
print "</optgroup>";
print "<optgroup label='--" . _('All Users') . "--'>";
try {
$dataSelect = array();
$sqlSelect = "SELECT gibbonPersonID, surname, preferredName, status FROM gibbonPerson WHERE status='Full' ORDER BY surname, preferredName";
$resultSelect = $connection2->prepare($sqlSelect);
$resultSelect->execute($dataSelect);
} catch (PDOException $e) {
}
while ($rowSelect = $resultSelect->fetch()) {
$selected = "";
if ($row["gibbonPersonIDStatusResponsible"] == $rowSelect["gibbonPersonID"]) {
$selected = "selected";
}
print "<option {$selected} value='" . $rowSelect["gibbonPersonID"] . "'>" . formatName("", htmlPrep($rowSelect["preferredName"]), htmlPrep($rowSelect["surname"]), "Student", true) . "{$expected}</option>";
}
print "</optgroup>";
?>
</select>
</td>
<tr>
<td>
<b><?php
print _('Role');
?>
</b><br/>
</td>
<td class="right">
<select name="role" id="role" style="width: 302px">
<option value="Organiser"><?php
示例2: _
<optgroup label='--<?php
print _('All Enrolled Students by Alphabet');
?>
--'>
<?php
$students = array();
$count = 0;
try {
$dataSelect = array("gibbonSchoolYearID" => $gibbonSchoolYearID);
$sqlSelect = "SELECT gibbonFinanceInvoiceeID, preferredName, surname, gibbonRollGroup.name AS name, dayType FROM gibbonPerson, gibbonStudentEnrolment, gibbonRollGroup, gibbonFinanceInvoicee WHERE gibbonPerson.gibbonPersonID=gibbonStudentEnrolment.gibbonPersonID AND gibbonStudentEnrolment.gibbonRollGroupID=gibbonRollGroup.gibbonRollGroupID AND gibbonFinanceInvoicee.gibbonPersonID=gibbonPerson.gibbonPersonID AND status='FULL' AND gibbonRollGroup.gibbonSchoolYearID=:gibbonSchoolYearID ORDER BY surname, preferredName";
$resultSelect = $connection2->prepare($sqlSelect);
$resultSelect->execute($dataSelect);
} catch (PDOException $e) {
}
while ($rowSelect = $resultSelect->fetch()) {
print "<option value='" . $rowSelect["gibbonFinanceInvoiceeID"] . "'>" . formatName("", htmlPrep($rowSelect["preferredName"]), htmlPrep($rowSelect["surname"]), "Student", true) . " - " . htmlPrep($rowSelect["name"]) . "</option>";
}
?>
</optgroup>
</select>
</td>
</tr>
<?php
//BILLING TYPE CHOOSER
?>
<tr>
<td>
<b><?php
print _('Scheduling');
?>
示例3: _
<td class="right">
<select style="width: 302px" name="gibbonPersonID" id="gibbonPersonID">
<?php
print "<option value='Please select...'>" . _('Please select...') . "</option>";
try {
$dataSelect = array("gibbonSchoolYearID" => $_SESSION[$guid]["gibbonSchoolYearID"]);
$sqlSelect = "SELECT * FROM gibbonPerson JOIN gibbonStudentEnrolment ON (gibbonPerson.gibbonPersonID=gibbonStudentEnrolment.gibbonPersonID) JOIN gibbonRollGroup ON (gibbonStudentEnrolment.gibbonRollGroupID=gibbonRollGroup.gibbonRollGroupID) WHERE gibbonRollGroup.gibbonSchoolYearID=:gibbonSchoolYearID AND status='Full' ORDER BY surname, preferredName";
$resultSelect = $connection2->prepare($sqlSelect);
$resultSelect->execute($dataSelect);
} catch (PDOException $e) {
}
while ($rowSelect = $resultSelect->fetch()) {
if ($gibbonPersonID == $rowSelect["gibbonPersonID"]) {
print "<option selected value='" . $rowSelect["gibbonPersonID"] . "'>" . formatName("", htmlPrep($rowSelect["preferredName"]), htmlPrep($rowSelect["surname"]), "Student", true) . " (" . htmlPrep($rowSelect["nameShort"]) . ")</option>";
} else {
print "<option value='" . $rowSelect["gibbonPersonID"] . "'>" . formatName("", htmlPrep($rowSelect["preferredName"]), htmlPrep($rowSelect["surname"]), "Student", true) . " (" . htmlPrep($rowSelect["nameShort"]) . ")</option>";
}
}
?>
</select>
<script type="text/javascript">
var gibbonPersonID=new LiveValidation('gibbonPersonID');
gibbonPersonID.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php
print _('Select something!');
?>
"});
</script>
</td>
</tr>
<tr>
示例4: array
</i></span>
</td>
<td class="right">
<?php
try {
$dataSelect = array("gibbonPersonMedicalID" => $row["gibbonPersonMedicalID"]);
$sqlSelect = "SELECT surname, preferredName FROM gibbonPerson JOIN gibbonPersonMedical ON (gibbonPerson.gibbonPersonID=gibbonPersonMedical.gibbonPersonID) WHERE gibbonPersonMedicalID=:gibbonPersonMedicalID";
$resultSelect = $connection2->prepare($sqlSelect);
$resultSelect->execute($dataSelect);
} catch (PDOException $e) {
}
$rowSelect = $resultSelect->fetch();
?>
<input readonly name="personName" id="personName" maxlength=255 value="<?php
print formatName("", $rowSelect["preferredName"], $rowSelect["surname"], "Student");
?>
" type="text" style="width: 300px">
</td>
</tr>
<tr>
<td>
<b><?php
print _('Condition Name');
?>
*</b><br/>
</td>
<td class="right">
<select style="width: 302px" name="name" id="name">
<?php
print "<option value='Please select...'>" . _('Please select...') . "</option>";
示例5: _
print "<i>" . _('There are no records to display.') . "</i>";
print "</td>";
print "</tr>";
} else {
$PAS = getSettingByScope($connection2, 'System', 'primaryAssessmentScale');
while ($rowStudents = $resultStudents->fetch()) {
if ($count % 2 == 0) {
$rowNum = "even";
} else {
$rowNum = "odd";
}
$count++;
//COLOR ROW BY STATUS!
print "<tr class={$rowNum}>";
print "<td>";
print "<div style='padding: 2px 0px'>" . $count . ") <b><a href='index.php?q=/modules/Students/student_view_details.php&gibbonPersonID=" . $rowStudents["gibbonPersonID"] . "&subpage=Markbook#" . $gibbonCourseClassID . "'>" . formatName("", $rowStudents["preferredName"], $rowStudents["surname"], "Student", true) . "</a><br/></div>";
print "<input name='{$count}-gibbonPersonID' id='{$count}-gibbonPersonID' value='" . $rowStudents["gibbonPersonID"] . "' type='hidden'>";
print "</td>";
try {
$dataEntry = array("gibbonCourseClassID" => $gibbonCourseClassID, "gibbonPersonIDStudent" => $rowStudents["gibbonPersonID"]);
$sqlEntry = "SELECT * FROM gibbonMarkbookTarget JOIN gibbonScaleGrade ON (gibbonMarkbookTarget.gibbonScaleGradeID=gibbonScaleGrade.gibbonScaleGradeID) WHERE gibbonCourseClassID=:gibbonCourseClassID AND gibbonPersonIDStudent=:gibbonPersonIDStudent";
$resultEntry = $connection2->prepare($sqlEntry);
$resultEntry->execute($dataEntry);
} catch (PDOException $e) {
print "<div class='error'>" . $e->getMessage() . "</div>";
}
$rowEntry = NULL;
if ($resultEntry->rowCount() == 1) {
$rowEntry = $resultEntry->fetch();
}
print "<td>";
示例6: _
print _("Actions");
print "</th>";
print "</tr>";
$count = 0;
$rowNum = "odd";
while ($row = $result->fetch()) {
if ($count % 2 == 0) {
$rowNum = "even";
} else {
$rowNum = "odd";
}
$count++;
//COLOR ROW BY STATUS!
print "<tr class={$rowNum}>";
print "<td>";
print formatName("", $row["preferredName"], $row["surname"], "Student", true);
print "</td>";
print "<td>";
print $row["email"];
print "</td>";
print "<td>";
print "<b>" . $row["name"] . "</b><br/>";
print "<span style='font-size: 85%; font-style: italic'>" . $row["producer"] . "</span>";
print "</td>";
print "<td>";
print dateConvertBack($guid, $row["returnExpected"]);
print "</td>";
print "<td>";
print (strtotime($today) - strtotime($row["returnExpected"])) / (60 * 60 * 24);
print "</td>";
print "<td>";
示例7: dire
$aRaffle[$sName] = $iTicket;
$oPDO->query('UPDATE viewer SET gils=gils-' . $iPrice . ' WHERE name="' . $sName . '"');
}
}
// Annonce la fermeture de la raffle
dire('[RAFFLE] Un total de ' . $iTotalTicket . ' ont était acheté pour la somme de ' . $iTotalGils . ' gils.');
// Prépare les var pour sortir le gagnant
$iPos = 0;
$iPoolStart = 0;
$iPoolEnd = 0;
$iTicketWin = rand(1, $iTotalTicket);
unlink(PATH_TO_RAFFLE);
raffle('set %raffle.pos 0');
while (true) {
foreach ($aRaffle as $sName => $iTicket) {
$sName = formatName($sName);
// régle le pool start
if ($iPoolStart == 0) {
$iPoolStart = 1;
} else {
$iPoolStart = $iPoolEnd + 1;
}
// régle le pool end
$iPoolEnd = $iPoolStart + $iTicket - 1;
// vérifie si gagnant
if ($iTicketWin >= $iPoolStart && $iTicketWin <= $iPoolEnd) {
// TICKET GAGNANT
$iPos++;
raffle('set %raffle.winner.' . $iPos . ' ' . $sName);
echo 'win ' . $iPos . ': ' . $sName . '<br />';
unset($aRaffle[$sName]);
示例8: array
$fail = TRUE;
}
//Update session variables
try {
$data = array("gibbonPersonID" => $organisationAdmissions);
$sql = "SELECT surname, preferredName, email FROM gibbonPerson WHERE gibbonPersonID=:gibbonPersonID";
$result = $connection2->prepare($sql);
$result->execute($data);
} catch (PDOException $e) {
$fail = TRUE;
}
if ($result->rowCount() != 1) {
$fail = TRUE;
} else {
$row = $result->fetch();
$_SESSION[$guid]["organisationAdmissionsName"] = formatName("", $row["preferredName"], $row["surname"], "Staff", FALSE, TRUE);
$_SESSION[$guid]["organisationAdmissionsEmail"] = $row["email"];
}
try {
$data = array("pagination" => $pagination);
$sql = "UPDATE gibbonSetting SET value=:pagination WHERE scope='System' AND name='pagination'";
$result = $connection2->prepare($sql);
$result->execute($data);
} catch (PDOException $e) {
$fail = TRUE;
}
try {
$data = array("country" => $country);
$sql = "UPDATE gibbonSetting SET value=:country WHERE scope='System' AND name='country'";
$result = $connection2->prepare($sql);
$result->execute($data);
示例9: formatName
print "<tr class={$rowNum}>";
print "<td>";
print formatName("", $row["preferredName"], $row["surname"], "Student", false);
print "</td>";
print "<td>";
try {
$dataUpdater = array("gibbonPersonIDUpdater" => $row["gibbonPersonIDUpdater"]);
$sqlUpdater = "SELECT gibbonPerson.title, gibbonPerson.surname, gibbonPerson.preferredName FROM gibbonPerson WHERE gibbonPersonID=:gibbonPersonIDUpdater";
$resultUpdater = $connection2->prepare($sqlUpdater);
$resultUpdater->execute($dataUpdater);
} catch (PDOException $e) {
print "<div class='error'>" . $e->getMessage() . "</div>";
}
if ($resultUpdater->rowCount() == 1) {
$rowUpdater = $resultUpdater->fetch();
print formatName($rowUpdater["title"], $rowUpdater["preferredName"], $rowUpdater["surname"], "Parent", false);
}
print "</td>";
print "<td>";
print dateConvertBack($guid, substr($row["timestamp"], 0, 10)) . " at " . substr($row["timestamp"], 11, 5);
print "</td>";
print "<td>";
print $row["status"];
print "</td>";
print "<td>";
if ($row["status"] == "Pending") {
print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . $_SESSION[$guid]["module"] . "/data_finance_edit.php&gibbonFinanceInvoiceeUpdateID=" . $row["gibbonFinanceInvoiceeUpdateID"] . "'><img title='" . _('Edit') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/config.png'/></a> ";
print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . $_SESSION[$guid]["module"] . "/data_finance_delete.php&gibbonFinanceInvoiceeUpdateID=" . $row["gibbonFinanceInvoiceeUpdateID"] . "'><img title='" . _('Delete') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/garbage.png'/></a>";
}
print "</td>";
print "</tr>";
示例10: foreach
}
// AJOUTE LES NOUVEAU FOLLOW ET MET A JOUR LES ANCIEN
$sNEW = '';
foreach ($aList as $aList2) {
foreach ($aList2 as $aValue) {
$sName = formatName($aValue->user->name);
// TRAVAIL UNIQUEMENT SI LA LIGNE EXISTE DANS LA TABLE VIEWER
$iCount = $oPDO->query('SELECT COUNT(*) FROM viewer WHERE name="' . $sName . '"')->fetch(PDO::FETCH_COLUMN);
if ($iCount == '1') {
if (!isset($aFollower[$sName])) {
$aFollower[$sName] = 1;
// NOUVEAU FOLLOWER
if ($sNEW != '') {
$sNEW .= ',';
}
$sNEW .= '("' . formatName($sName) . '")';
echo 'INSERT: ' . $sName . '<br />';
$oPDO->query('UPDATE viewer SET follower=1, followVerif=1, followerLast="' . $sToday . '" WHERE name="' . $sName . '"');
$iPrice = rand(0, 7);
if (strtolower($sName) == 'pandacool75') {
$iPrice = 7;
}
if (strtolower($sName) == 'tiignon') {
$iPrice = 7;
}
newFollower($sName, $iPrice);
setCountFollower(intval(getCountFollower()) + 1);
$i7Day = microtrue() + 60 * 60 * 24 * 7;
if ($iPrice == 0) {
$oPDO->query('UPDATE viewer SET level=level+40, follower=1, followVerif=1, followerLast="' . $sToday . '" WHERE name="' . $sName . '"');
}
示例11: while
}
while ($row = $resultPage->fetch()) {
if ($count % 2 == 0) {
$rowNum = "even";
} else {
$rowNum = "odd";
}
$count++;
//COLOR ROW BY STATUS!
print "<tr class={$rowNum}>";
print "<td>";
if ($row["type"] == "Staff") {
print formatName($row["title"], $row["preferredName"], $row["surname"], $row["type"], true);
}
if ($row["type"] == "Student") {
print formatName($row["title"], $row["preferredName"], $row["surname"], $row["type"], true);
}
print "</td>";
print "<td>";
if ($row["yearGroup"] != "") {
print _($row["yearGroup"]);
}
print "</td>";
print "<td>";
if ($row["rollGroup"] != "") {
print $row["rollGroup"];
}
print "</td>";
print "<td>";
print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . $_SESSION[$guid]["module"] . "/tt_view.php&gibbonPersonID=" . $row["gibbonPersonID"] . "&allUsers={$allUsers}&search={$search}'><img title='" . _('View Details') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/plus.png'/></a> ";
print "</td>";
示例12: array
</i></span>
</td>
<td class="right">
<?php
try {
$dataSelect = array("gibbonPersonID" => $row["gibbonPersonIDPayment"]);
$sqlSelect = "SELECT * FROM gibbonPerson JOIN gibbonStaff ON (gibbonPerson.gibbonPersonID=gibbonStaff.gibbonPersonID) WHERE gibbonPerson.gibbonPersonID=:gibbonPersonID ORDER BY surname, preferredName";
$resultSelect = $connection2->prepare($sqlSelect);
$resultSelect->execute($dataSelect);
} catch (PDOException $e) {
}
if ($resultSelect->rowCount() == 1) {
$rowSelect = $resultSelect->fetch();
?>
<input readonly name="payee" id="payee" maxlength=10 value="<?php
print formatName(htmlPrep($rowSelect["title"]), $rowSelect["preferredName"], htmlPrep($rowSelect["surname"]), "Staff", true, true);
?>
" type="text" style="width: 300px">
<?php
}
?>
</td>
</tr>
<tr id="paymentMethodRow">
<td>
<b><?php
print _('Payment Method');
?>
</b><br/>
</td>
示例13: while
$count = 0;
$rowNum = "odd";
while ($row = $result->fetch()) {
if ($count % 2 == 0) {
$rowNum = "even";
} else {
$rowNum = "odd";
}
$count++;
//COLOR ROW BY STATUS!
print "<tr class={$rowNum}>";
print "<td>";
print $row["name"];
print "</td>";
print "<td>";
print "<a href='index.php?q=/modules/Timetable/tt_view.php&gibbonPersonID=" . $row["gibbonPersonID"] . "'>" . formatName("", $row["preferredName"], $row["surname"], "Student", true) . "</a>";
print "</td>";
print "<td>";
try {
$dataCount = array("gibbonPersonID" => $row["gibbonPersonID"], "gibbonSchoolYearID" => $_SESSION[$guid]["gibbonSchoolYearID"]);
$sqlCount = "SELECT * FROM gibbonCourse JOIN gibbonCourseClass ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) JOIN gibbonCourseClassPerson ON (gibbonCourseClass.gibbonCourseClassID=gibbonCourseClassPerson.gibbonCourseClassID) WHERE gibbonPersonID=:gibbonPersonID AND role='Student' AND gibbonSchoolYearID=:gibbonSchoolYearID";
$resultCount = $connection2->prepare($sqlCount);
$resultCount->execute($dataCount);
} catch (PDOException $e) {
print "<div class='error'>" . $e->getMessage() . "</div>";
}
if ($resultCount->rowCount() >= 0) {
print $resultCount->rowCount();
} else {
print "<i>" . _('NA') . "</i>";
}
示例14: getUserPhoto
} else {
$rowNum = "odd";
}
$count++;
//COLOR ROW BY STATUS!
print "<tr class={$rowNum}>";
print "<td>";
print getUserPhoto($guid, $row["image_240"], 75);
print "</td>";
print "<td>";
$roleCategory = getRoleCategory($row["gibbonRoleIDPrimary"], $connection2);
if ($roleCategory == "Student" and isActionAccessible($guid, $connection2, "/modules/Students/student_view_details.php")) {
print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/Students/student_view_details.php&gibbonPersonID=" . $row["gibbonPersonID"] . "'>" . formatName("", $row["preferredName"], $row["surname"], $roleCategory, false) . "</a><br/>";
print "<span style='font-size: 85%; font-style: italic'>" . _($roleCategory) . "</i>";
} else {
print formatName("", $row["preferredName"], $row["surname"], $roleCategory, false) . "<br/>";
print "<span style='font-size: 85%; font-style: italic'>" . _($roleCategory) . "</i>";
}
print "</td>";
print "<td>";
print _($row["title"]) . "<br/>";
print "<span style='font-size: 85%; font-style: italic'>" . $row["comment"] . "</span>";
print "</td>";
print "<td>";
print dateConvertBack($guid, substr($row["timestamp"], 0, 10));
print "</td>";
print "</tr>";
}
print "</table>";
}
}
示例15: receiptContents
function receiptContents($guid, $connection2, $gibbonFinanceInvoiceID, $gibbonSchoolYearID, $currency = "", $email = FALSE)
{
$return = "";
try {
$data = array("gibbonSchoolYearID" => $gibbonSchoolYearID, "gibbonSchoolYearID2" => $gibbonSchoolYearID, "gibbonFinanceInvoiceID" => $gibbonFinanceInvoiceID);
$sql = "SELECT gibbonPerson.gibbonPersonID, studentID, surname, preferredName, gibbonFinanceInvoice.*, companyContact, companyName, companyAddress, gibbonRollGroup.name AS rollgroup FROM gibbonFinanceInvoice JOIN gibbonFinanceInvoicee ON (gibbonFinanceInvoice.gibbonFinanceInvoiceeID=gibbonFinanceInvoicee.gibbonFinanceInvoiceeID) JOIN gibbonPerson ON (gibbonFinanceInvoicee.gibbonPersonID=gibbonPerson.gibbonPersonID) JOIN gibbonStudentEnrolment ON (gibbonStudentEnrolment.gibbonPersonID=gibbonPerson.gibbonPersonID) JOIN gibbonRollGroup ON (gibbonStudentEnrolment.gibbonRollGroupID=gibbonRollGroup.gibbonRollGroupID) WHERE gibbonStudentEnrolment.gibbonSchoolYearID=:gibbonSchoolYearID2 AND gibbonFinanceInvoice.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonFinanceInvoiceID=:gibbonFinanceInvoiceID";
$result = $connection2->prepare($sql);
$result->execute($data);
} catch (PDOException $e) {
$return = FALSE;
}
if ($result->rowCount() == 1) {
//Let's go!
$row = $result->fetch();
if ($email == TRUE) {
$return .= "<div style='width: 100%; text-align: right'>";
$return .= "<a target='_blank' href='" . $_SESSION[$guid]["absoluteURL"] . "'><img height='100px' width='400px' class='School Logo' alt='Logo' src='" . $_SESSION[$guid]["absoluteURL"] . "/" . $_SESSION[$guid]["organisationLogo"] . "'/></a>";
$return .= "</div>";
}
//Receipt Text
$receiptText = getSettingByScope($connection2, "Finance", "receiptText");
if ($receiptText != "") {
$return .= "<p>";
$return .= $receiptText;
$return .= "</p>";
}
$style = "";
$style2 = "";
$style3 = "";
$style4 = "";
if ($email == TRUE) {
$style = "border-top: 1px solid #333; ";
$style2 = "border-bottom: 1px solid #333; ";
$style3 = "background-color: #f0f0f0; ";
$style4 = "background-color: #f6f6f6; ";
}
//Receipt Details
$return .= "<table cellspacing='0' style='width: 100%'>";
$return .= "<tr>";
$return .= "<td style='padding-top: 15px; padding-left: 10px; vertical-align: top; {$style} {$style3}' colspan=3>";
$return .= "<span style='font-size: 115%; font-weight: bold'>" . _('Receipt To') . " (" . $row["invoiceTo"] . ")</span><br/>";
if ($row["invoiceTo"] == "Company") {
$invoiceTo = "";
if ($row["companyContact"] != "") {
$invoiceTo .= $row["companyContact"] . ", ";
}
if ($row["companyName"] != "") {
$invoiceTo .= $row["companyName"] . ", ";
}
if ($row["companyAddress"] != "") {
$invoiceTo .= $row["companyAddress"] . ", ";
}
$return .= substr($invoiceTo, 0, -2);
} else {
try {
$dataParents = array("gibbonFinanceInvoiceeID" => $row["gibbonFinanceInvoiceeID"]);
$sqlParents = "SELECT parent.title, parent.surname, parent.preferredName, parent.email, parent.address1, parent.address1District, parent.address1Country, homeAddress, homeAddressDistrict, homeAddressCountry FROM gibbonFinanceInvoicee JOIN gibbonPerson AS student ON (gibbonFinanceInvoicee.gibbonPersonID=student.gibbonPersonID) JOIN gibbonFamilyChild ON (gibbonFamilyChild.gibbonPersonID=student.gibbonPersonID) JOIN gibbonFamily ON (gibbonFamilyChild.gibbonFamilyID=gibbonFamily.gibbonFamilyID) JOIN gibbonFamilyAdult ON (gibbonFamily.gibbonFamilyID=gibbonFamilyAdult.gibbonFamilyID) JOIN gibbonPerson AS parent ON (gibbonFamilyAdult.gibbonPersonID=parent.gibbonPersonID) WHERE gibbonFinanceInvoiceeID=:gibbonFinanceInvoiceeID AND (contactPriority=1 OR (contactPriority=2 AND contactEmail='Y')) ORDER BY contactPriority, surname, preferredName";
$resultParents = $connection2->prepare($sqlParents);
$resultParents->execute($dataParents);
} catch (PDOException $e) {
$return .= "<div class='error'>" . $e->getMessage() . "</div>";
}
if ($resultParents->rowCount() < 1) {
$return .= "<div class='warning'>" . _('There are no family members available to send this receipt to.') . "</div>";
} else {
$return .= "<ul style='margin-top: 3px; margin-bottom: 3px'>";
while ($rowParents = $resultParents->fetch()) {
$return .= "<li>";
$invoiceTo = "";
$invoiceTo .= "<b>" . formatName(htmlPrep($rowParents["title"]), htmlPrep($rowParents["preferredName"]), htmlPrep($rowParents["surname"]), "Parent", false) . "</b>, ";
if ($rowParents["address1"] != "") {
$invoiceTo .= $rowParents["address1"] . ", ";
if ($rowParents["address1District"] != "") {
$invoiceTo .= $rowParents["address1District"] . ", ";
}
if ($rowParents["address1Country"] != "") {
$invoiceTo .= $rowParents["address1Country"] . ", ";
}
} else {
$invoiceTo .= $rowParents["homeAddress"] . ", ";
if ($rowParents["homeAddressDistrict"] != "") {
$invoiceTo .= $rowParents["homeAddressDistrict"] . ", ";
}
if ($rowParents["homeAddressCountry"] != "") {
$invoiceTo .= $rowParents["homeAddressCountry"] . ", ";
}
}
$return .= substr($invoiceTo, 0, -2);
$return .= "</li>";
}
$return .= "</ul>";
}
}
$return .= "</td>";
$return .= "</tr>";
$return .= "<tr>";
$return .= "<td style='width: 33%; padding-top: 15px; padding-left: 10px; vertical-align: top; {$style} {$style4}'>";
$return .= "<span style='font-size: 115%; font-weight: bold'>" . _('Fees For') . "</span><br/>";
$return .= formatName("", htmlPrep($row["preferredName"]), htmlPrep($row["surname"]), "Student", true) . "<br/><span style='font-style: italic; font-size: 85%'>" . _('Roll Group') . " " . $row["rollgroup"] . "</span><br/>";
$return .= "</td>";
//.........这里部分代码省略.........