} 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
<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'); ?>
<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>
</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>";
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>";
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>";
$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]);
$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);
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>";
} // 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 . '"'); }
} 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>";
</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>
$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>"; }
} 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>"; } }
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>"; $return .= "<td style='width: 33%; padding-top: 15px; vertical-align: top; {$style} {$style4}'>"; $return .= "<span style='font-size: 115%; font-weight: bold'>" . _('Status') . "</span><br/>"; $return .= $row["status"]; $return .= "</td>"; $return .= "<td style='width: 33%; padding-top: 15px; vertical-align: top; {$style} {$style4}'>"; $return .= "<span style='font-size: 115%; font-weight: bold'>" . _('Schedule') . "</span><br/>"; if ($row["billingScheduleType"] == "Ad Hoc") { $return .= _("Ad Hoc"); } else { try { $dataSched = array("gibbonFinanceBillingScheduleID" => $row["gibbonFinanceBillingScheduleID"]); $sqlSched = "SELECT * FROM gibbonFinanceBillingSchedule WHERE gibbonFinanceBillingScheduleID=:gibbonFinanceBillingScheduleID"; $resultSched = $connection2->prepare($sqlSched); $resultSched->execute($dataSched); } catch (PDOException $e) { $return .= "<div class='error'>" . $e->getMessage() . "</div>"; } if ($resultSched->rowCount() == 1) { $rowSched = $resultSched->fetch(); $return .= $rowSched["name"]; } } $return .= "</td>"; $return .= "</tr>"; $return .= "<tr>"; $return .= "<td style='width: 33%; padding-top: 15px; padding-left: 10px; vertical-align: top; {$style} {$style2} {$style3}'>"; $return .= "<span style='font-size: 115%; font-weight: bold'>" . _('Due Date') . "</span><br/>"; $return .= dateConvertBack($guid, $row["invoiceDueDate"]); $return .= "</td>"; $return .= "<td style='width: 33%; padding-top: 15px; vertical-align: top; {$style} {$style2} {$style3}'>"; $return .= "<span style='font-size: 115%; font-weight: bold'>" . _('Date Paid') . "</span><br/>"; $return .= dateConvertBack($guid, $row["paidDate"]); $return .= "</td>"; $return .= "<td style='width: 33%; padding-top: 15px; vertical-align: top; {$style} {$style2} {$style3}'>"; $return .= "<span style='font-size: 115%; font-weight: bold'>" . _('Invoice Number') . "</span><br/>"; $invoiceNumber = getSettingByScope($connection2, "Finance", "invoiceNumber"); if ($invoiceNumber == "Person ID + Invoice ID") { $return .= ltrim($row["gibbonPersonID"], "0") . "-" . ltrim($gibbonFinanceInvoiceID, "0"); } else { if ($invoiceNumber == "Student ID + Invoice ID") { $return .= ltrim($row["studentID"], "0") . "-" . ltrim($gibbonFinanceInvoiceID, "0"); } else { $return .= ltrim($gibbonFinanceInvoiceID, "0"); } } $return .= "</td>"; $return .= "</tr>"; $return .= "</table>"; //Fee table $return .= "<h3 style='padding-top: 40px; padding-left: 10px; margin: 0px; {$style4}'>"; $return .= _("Fee Table"); $return .= "</h3>"; $feeTotal = 0; try { $dataFees["gibbonFinanceInvoiceID"] = $row["gibbonFinanceInvoiceID"]; $sqlFees = "SELECT gibbonFinanceInvoiceFee.gibbonFinanceInvoiceFeeID, gibbonFinanceInvoiceFee.feeType, gibbonFinanceFeeCategory.name AS category, gibbonFinanceInvoiceFee.name AS name, gibbonFinanceInvoiceFee.fee, gibbonFinanceInvoiceFee.description AS description, NULL AS gibbonFinanceFeeID, gibbonFinanceInvoiceFee.gibbonFinanceFeeCategoryID AS gibbonFinanceFeeCategoryID, sequenceNumber FROM gibbonFinanceInvoiceFee JOIN gibbonFinanceFeeCategory ON (gibbonFinanceInvoiceFee.gibbonFinanceFeeCategoryID=gibbonFinanceFeeCategory.gibbonFinanceFeeCategoryID) WHERE gibbonFinanceInvoiceID=:gibbonFinanceInvoiceID ORDER BY sequenceNumber"; $resultFees = $connection2->prepare($sqlFees); $resultFees->execute($dataFees); } catch (PDOException $e) { $return .= "<div class='error'>" . $e->getMessage() . "</div>"; } if ($resultFees->rowCount() < 1) { $return .= "<div class='error'>"; $return .= _("There are no records to display"); $return .= "</div>"; } else { $return .= "<table cellspacing='0' style='width: 100%; {$style4}'>"; $return .= "<tr class='head'>"; $return .= "<th style='text-align: left; padding-left: 10px'>"; $return .= _("Name"); $return .= "</th>"; $return .= "<th style='text-align: left'>"; $return .= _("Category"); $return .= "</th>"; $return .= "<th style='text-align: left'>"; $return .= _("Description"); $return .= "</th>"; $return .= "<th style='text-align: left'>"; $return .= _("Fee") . "<br/>"; if ($currency != "") { $return .= "<span style='font-style: italic; font-size: 85%'>" . $currency . "</span>"; } $return .= "</th>"; $return .= "</tr>"; $count = 0; $rowNum = "odd"; while ($rowFees = $resultFees->fetch()) { if ($count % 2 == 0) { $rowNum = "even"; } else { $rowNum = "odd"; } $count++; $return .= "<tr style='height: 25px' class={$rowNum}>"; $return .= "<td style='padding-left: 10px'>"; $return .= $rowFees["name"]; $return .= "</td>"; $return .= "<td>"; $return .= $rowFees["category"]; $return .= "</td>"; $return .= "<td>"; $return .= $rowFees["description"]; $return .= "</td>"; $return .= "<td>"; if (substr($currency, 4) != "") { $return .= substr($currency, 4) . " "; } $return .= number_format($rowFees["fee"], 2, ".", ","); $feeTotal += $rowFees["fee"]; $return .= "</td>"; $return .= "</tr>"; } $return .= "<tr style='height: 35px'>"; $return .= "<td colspan=3 style='text-align: right'>"; $return .= "<b>" . _('Invoice Total:') . "</b>"; $return .= "</td>"; $return .= "<td>"; if (substr($currency, 4) != "") { $return .= substr($currency, 4) . " "; } $return .= "<b>" . number_format($feeTotal, 2, ".", ",") . "</b>"; $return .= "</td>"; $return .= "</tr>"; $return .= "<tr style='height: 35px' class='current'>"; $return .= "<td colspan=3 style='text-align: right; {$style2}'>"; $return .= "<b>" . _('Amount Paid:') . "</b>"; $return .= "</td>"; $return .= "<td style='{$style2}'>"; if (substr($currency, 4) != "") { $return .= substr($currency, 4) . " "; } $return .= "<b>" . number_format($row["paidAmount"], 2, ".", ",") . "</b>"; $return .= "</td>"; $return .= "</tr>"; } $return .= "</table>"; //Invoice Notes $receiptNotes = getSettingByScope($connection2, "Finance", "receiptNotes"); if ($receiptNotes != "") { $return .= "<h3 style='margin-top: 40px'>"; $return .= _("Notes"); $return .= "</h3>"; $return .= "<p>"; $return .= $receiptNotes; $return .= "</p>"; } return $return; } }
$count = 0; $options = ""; while ($row = $result->fetch()) { try { $dataChild = array("gibbonFamilyID" => $row["gibbonFamilyID"], "gibbonSchoolYearID" => $_SESSION[$guid]["gibbonSchoolYearID"]); $sqlChild = "SELECT * FROM gibbonFamilyChild JOIN gibbonPerson ON (gibbonFamilyChild.gibbonPersonID=gibbonPerson.gibbonPersonID) JOIN gibbonStudentEnrolment ON (gibbonPerson.gibbonPersonID=gibbonStudentEnrolment.gibbonPersonID) JOIN gibbonRollGroup ON (gibbonStudentEnrolment.gibbonRollGroupID=gibbonRollGroup.gibbonRollGroupID) WHERE gibbonFamilyID=:gibbonFamilyID AND gibbonPerson.status='Full' AND (dateStart IS NULL OR dateStart<='" . date("Y-m-d") . "') AND (dateEnd IS NULL OR dateEnd>='" . date("Y-m-d") . "') AND gibbonStudentEnrolment.gibbonSchoolYearID=:gibbonSchoolYearID ORDER BY surname, preferredName "; $resultChild = $connection2->prepare($sqlChild); $resultChild->execute($dataChild); } catch (PDOException $e) { } while ($rowChild = $resultChild->fetch()) { $select = ""; if ($rowChild["gibbonPersonID"] == $search) { $select = "selected"; } $options = $options . "<option {$select} value='" . $rowChild["gibbonPersonID"] . "'>" . formatName("", $rowChild["preferredName"], $rowChild["surname"], "Student") . "</option>"; $gibbonPersonID[$count] = $rowChild["gibbonPersonID"]; $count++; } } if ($count == 0) { print "<div class='error'>"; print _("Access denied."); print "</div>"; } else { if ($count == 1) { $search = $gibbonPersonID[0]; } else { print "<h2>"; print _("Choose"); print "</h2>";
$sql = "INSERT INTO gibbonPerson SET surname=:surname, firstName=:firstName, preferredName=:preferredName, officialName=:officialName, gender=:gender, dob=:dob, email=:email, username=:username, password='', passwordStrong=:passwordStrong, passwordStrongSalt=:passwordStrongSalt, status=:status, gibbonRoleIDPrimary=:gibbonRoleIDPrimary, gibbonRoleIDAll=:gibbonRoleIDAll"; $result = $connection2->prepare($sql); $result->execute($data); } catch (PDOException $e) { //Fail 2 print $e->getMessage(); exit; $URL .= "&addReturn=fail2"; header("Location: {$URL}"); break; } $gibbonPersonID = $connection2->lastInsertId(); if ($status == "Pending Approval") { //Attempt to notify Admissions if ($_SESSION[$guid]["organisationAdmissions"]) { $notificationText = sprintf(_('An new public registration, for %1$s, is pending approval.'), formatName("", $preferredName, $surname, "Student")); setNotification($connection2, $guid, $_SESSION[$guid]["organisationAdmissions"], $notificationText, "User Admin", "/index.php?q=/modules/User Admin/user_manage_edit.php&gibbonPersonID={$gibbonPersonID}&search="); } //Success 1 $URL .= "&addReturn=success1"; header("Location: {$URL}"); } else { //Success 0 $URL .= "&addReturn=success0"; header("Location: {$URL}"); } } } } } }
try { $dataLog = array("gibbonPersonID" => $rowRollGroup["gibbonPersonID"], "date" => $currentDate . "%"); $sqlLog = "SELECT * FROM gibbonAttendanceLogPerson, gibbonPerson WHERE gibbonAttendanceLogPerson.gibbonPersonID=gibbonPerson.gibbonPersonID AND gibbonAttendanceLogPerson.gibbonPersonID=:gibbonPersonID AND date LIKE :date ORDER BY timestampTaken DESC"; $resultLog = $connection2->prepare($sqlLog); $resultLog->execute($dataLog); } catch (PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>"; } $rowLog = $resultLog->fetch(); if ($rowLog["type"] == "Absent") { print "<td style='border: 1px solid #CC0000!important; background: none; background-color: #F6CECB; width:20%; text-align: center; vertical-align: top'>"; } else { print "<td style='border: 1px solid #ffffff; width:20%; text-align: center; vertical-align: top'>"; } print getUserPhoto($guid, $rowRollGroup["image_75"], 75); print "<div style='padding-top: 5px'><b>" . formatName("", htmlPrep($rowRollGroup["preferredName"]), htmlPrep($rowRollGroup["surname"]), "Student", true) . "<b></div><br/>"; print "<input type='hidden' name='{$count}-gibbonPersonID' value='" . $rowRollGroup["gibbonPersonID"] . "'>"; print "<select style='float: none; width:130px; margin-bottom: 3px' name='{$count}-type'>"; print "<option "; if ($rowLog["type"] == "Present") { print "selected "; } print "value='Present'>" . _('Present') . "</option>"; print "<option "; if ($rowLog["type"] == "Present - Late") { print "selected "; } print "value='Present - Late'>" . _('Present - Late') . "</option>"; print "<option "; if ($rowLog["type"] == "Present - Offsite") { print "selected ";
$resultFamily = $connection2->prepare($sqlFamily); $resultFamily->execute($dataFamily); } catch (PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>"; } while ($rowFamily = $resultFamily->fetch()) { try { $dataFamily2 = array("gibbonFamilyID" => $rowFamily["gibbonFamilyID"]); $sqlFamily2 = "SELECT * FROM gibbonPerson JOIN gibbonFamilyAdult ON (gibbonPerson.gibbonPersonID=gibbonFamilyAdult.gibbonPersonID) WHERE gibbonFamilyID=:gibbonFamilyID ORDER BY contactPriority, surname, preferredName"; $resultFamily2 = $connection2->prepare($sqlFamily2); $resultFamily2->execute($dataFamily2); } catch (PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>"; } while ($rowFamily2 = $resultFamily2->fetch()) { print "<u>" . formatName($rowFamily2["title"], $rowFamily2["preferredName"], $rowFamily2["surname"], "Parent") . "</u><br/>"; $numbers = 0; for ($i = 1; $i < 5; $i++) { if ($rowFamily2["phone" . $i] != "") { if ($rowFamily2["phone" . $i . "Type"] != "") { print "<i>" . $rowFamily2["phone" . $i . "Type"] . ":</i> "; } if ($rowFamily2["phone" . $i . "CountryCode"] != "") { print "+" . $rowFamily2["phone" . $i . "CountryCode"] . " "; } print $rowFamily2["phone" . $i] . "<br/>"; $numbers++; } } if ($numbers == 0) { print "<span style='font-size: 85%; font-style: italic'>" . _('No number available.') . "</span><br/>";
print _('Use Control, Command and/or Shift to select multiple.'); ?> </i></span> </td> <td class="right"> <select name="guests[]" id="guests[]" multiple style="width: 302px; height: 150px"> <?php try { $dataSelect = array(); $sqlSelect = "SELECT gibbonPersonID, title, preferredName, surname, category FROM gibbonPerson JOIN gibbonRole ON (gibbonPerson.gibbonRoleIDPrimary=gibbonRole.gibbonRoleID) WHERE status='Full' ORDER BY surname, preferredName"; $resultSelect = $connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch (PDOException $e) { } while ($rowSelect = $resultSelect->fetch()) { print "<option value='" . $rowSelect["gibbonPersonID"] . "'>" . formatName(htmlPrep($rowSelect["title"]), htmlPrep($rowSelect["preferredName"]), htmlPrep($rowSelect["surname"]), htmlPrep($rowSelect["category"]), true, true) . "</option>"; } ?> </select> </td> <tr> <td> <b><?php print _('Role'); ?> </b><br/> </td> <td class="right"> <select name="role" id="role" style="width: 302px"> <option value="Guest Student"><?php print _('Guest Student');
$iXP = XPReq($aAuteur['level']) * QUIZZ_AUTEUR_XP; $oPDO->query('UPDATE viewer SET gils=gils+' . calcGILSTotal($aAuteur, QUIZZ_AUTEUR_GILS) . ', xpcurrent=' . calcXPTotal($aAuteur, $iXP)); } // STATUS 1 -> QUIZZ EST PROC, ATTENDS POUR REPONSE if ($aCooldown['status'] == '1') { // RECUP LA QUESTION $aQuizz = $oPDO->query('SELECT * FROM quizz WHERE actual=1')->fetch(PDO::FETCH_ASSOC); // Parcours le fichier quizz.txt if (is_file(PATH_FROM_QUIZZ)) { $oFile = fopen(PATH_FROM_QUIZZ, "r"); $aProfile = array(); while (!feof($oFile)) { $sLine = trim(fgets($oFile, 4096)); // explose la ligne $aLine = explode(',', $sLine); $sName = formatName($aLine[0]); if (isset($aLine[1])) { $sRep = strtolower($aLine[1]); } else { $sRep = ''; } echo $sName . ' REPOND ' . $sRep . '<br />'; $aViewer = $oPDO->query('SELECT * FROM viewer WHERE name="' . $sName . '"')->fetch(PDO::FETCH_ASSOC); if ($aViewer && $sRep != '') { if ($aQuizz['auteur'] != $aViewer['name']) { if ($aViewer['gils'] > 0) { // RETIRE LES GILS $oPDO->query('UPDATE viewer SET gils=gils-1 WHERE name="' . $sName . '"'); if (strtolower($sRep) == strtolower($aQuizz['reponse'])) { // BONNE REPONSE $oPDO->query('UPDATE quizz SET actual=0, used=1 WHERE actual=1');
} $count++; //Color row by status if ($row["status"] == "Approved") { $rowNum = "current"; } if ($row["status"] == "Rejected" or $row["status"] == "Cancelled") { $rowNum = "error"; } print "<tr class={$rowNum}>"; print "<td>"; print "<b>" . $row["title"] . "</b><br/>"; print "<span style='font-size: 85%; font-style: italic'>" . $row["budget"] . "</span>"; print "</td>"; print "<td>"; print formatName("", $row["preferredName"], $row["surname"], "Staff", false, true); print "</td>"; print "<td>"; print $row["status"]; print "</td>"; print "<td>"; print number_format($row["cost"], 2, ".", ","); print "</td>"; print "<td>"; print dateConvertBack($guid, substr($row["timestampCreator"], 0, 10)); print "</td>"; print "<td>"; print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . $_SESSION[$guid]["module"] . "/expenses_manage_view.php&gibbonFinanceExpenseID=" . $row["gibbonFinanceExpenseID"] . "&gibbonFinanceBudgetCycleID={$gibbonFinanceBudgetCycleID}&status={$status}&gibbonFinanceBudgetID={$gibbonFinanceBudgetID}'><img title='" . _('View') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/plus.png'/></a> "; if ($row["status"] == "Requested") { if (approvalRequired($guid, $_SESSION[$guid]["gibbonPersonID"], $row["gibbonFinanceExpenseID"], $gibbonFinanceBudgetCycleID, $connection2, FALSE) == TRUE) { print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . $_SESSION[$guid]["module"] . "/expenses_manage_approve.php&gibbonFinanceExpenseID=" . $row["gibbonFinanceExpenseID"] . "&gibbonFinanceBudgetCycleID={$gibbonFinanceBudgetCycleID}&status={$status}&gibbonFinanceBudgetID=" . $row["gibbonFinanceBudgetID"] . "'><img title='" . _('Approve/Reject') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/iconTick.png'/></a> ";
<form method="post" action="<?php print $_SESSION[$guid]["absoluteURL"] . "/modules/" . $_SESSION[$guid]["module"] . "/family_manage_edit_editChildProcess.php?gibbonFamilyID={$gibbonFamilyID}&gibbonPersonID={$gibbonPersonID}&search={$search}"; ?> "> <table class='smallIntBorder' cellspacing='0' style="width: 100%"> <tr> <td style='width: 275px'> <b><?php print _('Child\'s Name'); ?> *</b><br/> <span style="font-size: 90%"><i></i></span> </td> <td class="right"> <input readonly name="child" id="child" maxlength=200 value="<?php print formatName("", htmlPrep($row["preferredName"]), htmlPrep($row["surname"]), "Student"); ?> " type="text" style="width: 300px"> <script type="text/javascript"> var child=new LiveValidation('child'); child.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!'); ?> "}); </script> </td> </tr> <tr> <td> <b><?php print _('Comment');
} $current = $array[$i]["gibbonFamilyID"]; $next = ""; if (isset($array[$i + 1]["gibbonFamilyID"])) { $next = $array[$i + 1]["gibbonFamilyID"]; } if ($current == $next) { $students .= formatName("", $array[$i]["preferredName"], $array[$i]["surname"], "Student") . "<br/>"; } else { print "<tr class={$rowNum}>"; print "<td>"; print $array[$i]["name"]; print "</td>"; print "<td>"; print $students; print formatName("", $array[$i]["preferredName"], $array[$i]["surname"], "Student") . "<br/>"; print "</td>"; print "<td>"; //Print Name if ($array[$i]["nameAddress"] != "") { print $array[$i]["nameAddress"] . "<br/>"; } else { if ($array[$i]["name"] != "") { print $array[$i]["name"] . "<br/>"; } } //Print address $addressBits = explode(",", trim($array[$i]["homeAddress"])); $addressBits = array_diff($addressBits, array("")); $charsInLine = 0; $buffer = "";
$sqlSelect = "SELECT gibbonCourseClassID, gibbonCourse.name, gibbonCourse.nameShort AS course, gibbonCourseClass.nameShort AS class FROM gibbonCourse JOIN gibbonCourseClass ON (gibbonCourse.gibbonCourseID=gibbonCourseClass.gibbonCourseID) WHERE gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonYearGroupIDList LIKE :gibbonYearGroupIDList ORDER BY course, class"; $resultSelect = $connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch (PDOException $e) { } while ($rowSelect = $resultSelect->fetch()) { try { $dataSelect2 = array("gibbonCourseClassID" => $rowSelect["gibbonCourseClassID"]); $sqlSelect2 = "SELECT surname, preferredName, title FROM gibbonCourseClassPerson JOIN gibbonPerson ON (gibbonCourseClassPerson.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE status='Full' AND role='Teacher' AND gibbonCourseClassID=:gibbonCourseClassID"; $resultSelect2 = $connection2->prepare($sqlSelect2); $resultSelect2->execute($dataSelect2); } catch (PDOException $e) { } $teachers = ""; while ($rowSelect2 = $resultSelect2->fetch()) { $teachers .= formatName("", $rowSelect2["preferredName"], $rowSelect2["surname"], "Staff", false) . ", "; } print "<option value='" . $rowSelect["gibbonCourseClassID"] . "'>" . htmlPrep($rowSelect["course"]) . "." . htmlPrep($rowSelect["class"]); if ($teachers != "") { print " - " . substr($teachers, 0, -2) . ""; } print "</option>"; } ?> </optgroup> <?php } else { ?> <optgroup label='--<?php print _('All Classes'); ?>
$output .= _("Name") . "<br/>"; $output .= "</th>"; $output .= "<th style='color: #fff; text-align: left'>"; $output .= _("Confirmed"); $output .= "</th>"; $output .= "<th style='color: #fff; text-align: left'>"; $output .= _("Actions"); $output .= "</th>"; $output .= "</tr>"; $rowCount = 0; while ($rowConfirm = $resultConfirm->fetch()) { //COLOR ROW BY STATUS! $output .= "<script type=\"text/javascript\">\n\t\t\t\t\t\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\t\t\t\t\t\tsetInterval(function() {\n\t\t\t\t\t\t\t\t\t\t\t\$(\"#row" . $rowCount . "\").load(\"index_notification_ajax_alarm_tickUpdate.php\", {\"gibbonAlarmID\": \"" . $row["gibbonAlarmID"] . "\", \"gibbonPersonID\": \"" . $rowConfirm["gibbonPersonID"] . "\"});\n\t\t\t\t\t\t\t\t\t\t}, 5000);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t</script>"; $output .= "<tr id='row" . $rowCount . "'>"; $output .= "<td style='color: #fff'>"; $output .= formatName("", $rowConfirm["preferredName"], $rowConfirm["surname"], "Staff", true, true) . "<br/>"; $output .= "</td>"; $output .= "<td style='color: #fff'>"; if ($row["gibbonPersonID"] == $rowConfirm["gibbonPersonID"]) { $output .= _("NA"); } else { if ($rowConfirm["gibbonAlarmConfirmID"] != "") { $output .= "<img src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/iconTick.png'/> "; } } $output .= "</td>"; $output .= "<td style='color: #fff'>"; if ($row["gibbonPersonID"] != $rowConfirm["gibbonPersonID"]) { if ($rowConfirm["gibbonAlarmConfirmID"] == "") { $output .= "<a target='_parent' href='" . $_SESSION[$guid]["absoluteURL"] . "/index_notification_ajax_alarmConfirmProcess.php?gibbonPersonID=" . $rowConfirm["gibbonPersonID"] . "&gibbonAlarmID=" . $row["gibbonAlarmID"] . "'><img title='" . _('Confirm') . "' src='./themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/iconTick_light.png'/></a> "; }
//Attempt to add like on positive behaviour if ($type == "Positive") { $return = setLike($connection2, "Behaviour", $_SESSION[$guid]["gibbonSchoolYearID"], "gibbonBehaviourID", $gibbonBehaviourID, $_SESSION[$guid]["gibbonPersonID"], $gibbonPersonID, "Positive Behaviour", $likeComment); } if ($type == "Negative") { try { $dataDetail = array("gibbonSchoolYearID" => $_SESSION[$guid]["gibbonSchoolYearID"], "gibbonPersonID" => $gibbonPersonID); $sqlDetail = "SELECT gibbonPersonIDTutor, gibbonPersonIDTutor2, gibbonPersonIDTutor3, surname, preferredName FROM gibbonRollGroup JOIN gibbonStudentEnrolment ON (gibbonStudentEnrolment.gibbonRollGroupID=gibbonRollGroup.gibbonRollGroupID) JOIN gibbonPerson ON (gibbonStudentEnrolment.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE gibbonStudentEnrolment.gibbonSchoolYearID=:gibbonSchoolYearID AND gibbonStudentEnrolment.gibbonPersonID=:gibbonPersonID"; $resultDetail = $connection2->prepare($sqlDetail); $resultDetail->execute($dataDetail); } catch (PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>"; } if ($resultDetail->rowCount() == 1) { $rowDetail = $resultDetail->fetch(); $name = formatName("", $rowDetail["preferredName"], $rowDetail["surname"], "Student", false); $notificationText = sprintf(_('Someone has created a negative behaviour record for your tutee, %1$s.'), $name); if ($rowDetail["gibbonPersonIDTutor"] != NULL and $rowDetail["gibbonPersonIDTutor"] != $_SESSION[$guid]["gibbonPersonID"]) { setNotification($connection2, $guid, $rowDetail["gibbonPersonIDTutor"], $notificationText, "Behaviour", "/index.php?q=/modules/Behaviour/behaviour_view_details.php&gibbonPersonID={$gibbonPersonID}&search="); } if ($rowDetail["gibbonPersonIDTutor2"] != NULL and $rowDetail["gibbonPersonIDTutor2"] != $_SESSION[$guid]["gibbonPersonID"]) { setNotification($connection2, $guid, $rowDetail["gibbonPersonIDTutor2"], $notificationText, "Behaviour", "/index.php?q=/modules/Behaviour/behaviour_view_details.php&gibbonPersonID={$gibbonPersonID}&search="); } if ($rowDetail["gibbonPersonIDTutor3"] != NULL and $rowDetail["gibbonPersonIDTutor3"] != $_SESSION[$guid]["gibbonPersonID"]) { setNotification($connection2, $guid, $rowDetail["gibbonPersonIDTutor3"], $notificationText, "Behaviour", "/index.php?q=/modules/Behaviour/behaviour_view_details.php&gibbonPersonID={$gibbonPersonID}&search="); } } } } if ($partialFail == TRUE) { //Fail 5
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @session_start(); //Module includes include "./modules/" . $_SESSION[$guid]["module"] . "/moduleFunctions.php"; if (isActionAccessible($guid, $connection2, "/modules/Attendance/report_studentHistory_print.php") == FALSE) { //Acess denied print "<div class='error'>"; print _("You do not have access to this action."); print "</div>"; } else { $gibbonPersonID = $_GET["gibbonPersonID"]; try { $data = array("gibbonPersonID" => $gibbonPersonID); $sql = "SELECT surname, preferredName, dateStart, dateEnd FROM gibbonPerson WHERE gibbonPersonID=:gibbonPersonID"; $result = $connection2->prepare($sql); $result->execute($data); } catch (PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>"; } $row = $result->fetch(); if ($gibbonPersonID != "") { $output = ""; print "<h2>"; print _("Attendance History for") . " " . formatName("", $row["preferredName"], $row["surname"], "Student"); print "</h2>"; report_studentHistory($guid, $gibbonPersonID, FALSE, $_SESSION[$guid]["absoluteURL"] . "/report.php?q=/modules/" . $_SESSION[$guid]["module"] . "/report_studentHistory_print.php&gibbonPersonID={$gibbonPersonID}", $connection2, $row["dateStart"], $row["dateEnd"]); } }
if ($row["ownershipType"] == "Individual") { print "Individual<br/>"; } } if ($row["gibbonPersonIDOwnership"] != "") { try { $dataPerson = array("gibbonPersonID" => $row["gibbonPersonIDOwnership"]); $sqlPerson = "SELECT title, preferredName, surname FROM gibbonPerson WHERE gibbonPersonID=:gibbonPersonID"; $resultPerson = $connection2->prepare($sqlPerson); $resultPerson->execute($dataPerson); } catch (PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>"; } if ($resultPerson->rowCount() == 1) { $rowPerson = $resultPerson->fetch(); print "<span style='font-size: 85%; font-style: italic'>" . formatName($rowPerson["title"], $rowPerson["preferredName"], $rowPerson["surname"], "Staff", FALSE, TRUE) . "</span>"; } } print "</td>"; print "<td>"; print $row["status"] . "<br/>"; print "<span style='font-size: 85%; font-style: italic'>" . $row["borrowable"] . "</span>"; print "</td>"; print "<td>"; if ($row["purchaseDate"] == "") { print "<i>" . _('Unknown') . "</i><br/>"; } else { print dateConvertBack($guid, $row["purchaseDate"]) . "<br/>"; } print "<span style='font-size: 85%; font-style: italic'>" . $row["vendor"] . "</span>"; print "</td>";
print "<div class='error'>" . $e->getMessage() . "</div>"; } if ($resultFamily->rowCount() > 0) { while ($rowFamily = $resultFamily->fetch()) { //Get adults conditions try { $dataMember = array("gibbonFamilyID" => $rowFamily["gibbonFamilyID"]); $sqlMember = "SELECT * FROM gibbonFamilyAdult JOIN gibbonPerson ON (gibbonFamilyAdult.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE gibbonFamilyID=:gibbonFamilyID AND contactCall='Y' ORDER BY contactPriority, surname, preferredName"; $resultMember = $connection2->prepare($sqlMember); $resultMember->execute($dataMember); } catch (PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>"; } while ($rowMember = $resultMember->fetch()) { if ($rowMember["phone1"] != "" or $rowMember["phone2"] != "" or $rowMember["phone3"] != "" or $rowMember["phone4"] != "") { print "<b>" . formatName($rowMember["title"], $rowMember["preferredName"], $rowMember["surname"], "Parent", false) . "</b><br/>"; for ($i = 1; $i < 5; $i++) { if ($rowMember["phone" . $i] != "") { if ($rowMember["phone" . $i . "Type"] != "") { print "<i>" . $rowMember["phone" . $i . "Type"] . ":</i> "; } if ($rowMember["phone" . $i . "CountryCode"] != "") { print "+" . $rowMember["phone" . $i . "CountryCode"] . " "; } print $rowMember["phone" . $i] . "<br/>"; } } } } } }