diff --git a/src/Checkin.php b/src/Checkin.php index d8b83dbab4..a1366e7194 100644 --- a/src/Checkin.php +++ b/src/Checkin.php @@ -32,7 +32,6 @@ use ChurchCRM\dto\SystemURLs; use ChurchCRM\dto\SystemConfig; - $EventID = 0; $CheckoutOrDelete = false; $event = null; @@ -47,10 +46,10 @@ $CheckoutOrDelete = true; } -if(isset($_POST['child-id'])) { +if (isset($_POST['child-id'])) { $iChildID = FilterInput($_POST['child-id'], 'int'); } -if(isset($_POST['adult-id'])) { +if (isset($_POST['adult-id'])) { $iAdultID = FilterInput($_POST['adult-id'], 'int'); } @@ -63,7 +62,7 @@ ->filterByInActive(1, Criteria::NOT_EQUAL) ->find(); -if($EventID > 0) { +if ($EventID > 0) { //get Event Details $event = EventQuery::Create() ->findOneById($EventID); @@ -94,13 +93,13 @@ + ?> @@ -185,24 +184,24 @@ class="col-sm-2 control-label"> event_id, person_id, checkin_date, checkin_id, checkout_date, checkout_id - if (isset($_POST['CheckIn']) && $iChildID > 0 ) { - + if (isset($_POST['CheckIn']) && $iChildID > 0) { $attendee = EventAttendQuery::create() ->filterByEventId($EventID) ->findOneByPersonId($iChildID); - if($attendee) - { ?> + if ($attendee) { + ?> setEventId($EventID); $attendee->setPersonId($iChildID); @@ -234,7 +233,6 @@ class="col-sm-2 control-label"> ->filterByEventId($EventID) ->findOneByPersonId($iChildID) ->delete(); - } } @@ -244,7 +242,6 @@ class="col-sm-2 control-label"> if (isset($_POST['EventID']) && isset($_POST['child-id']) && (isset($_POST['CheckOutBtn']) || isset($_POST['DeleteBtn'])) ) { - $iChildID = FilterInput($_POST['child-id'], 'int'); $formTitle = (isset($_POST['CheckOutBtn']) ? gettext("CheckOut Person") : gettext("Delete Checkin in Entry")); ?> @@ -293,7 +290,7 @@ class="col-sm-2 control-label"> + } else { // DeleteBtn?>
@@ -301,6 +298,7 @@ class="col-sm-2 control-label"> name="DeleteCancel">
@@ -309,6 +307,7 @@ class="col-sm-2 control-label"> ->filterByEventId($EventID) ->find(); - foreach ($eventAttendees as $per) { - //Get Person who is checked in + foreach ($eventAttendees as $per) { + //Get Person who is checked in $checkedInPerson = PersonQuery::create() ->findOneById($per->getPersonId()); - $sPerson = $checkedInPerson->getFullName(); + $sPerson = $checkedInPerson->getFullName(); //Get Person who checked person in $sCheckinby = ""; - if ($per->getCheckinId()) { - $checkedInBy = PersonQuery::create() + if ($per->getCheckinId()) { + $checkedInBy = PersonQuery::create() ->findOneById($per->getCheckinId()); - $sCheckinby = $checkedInBy->getFullName(); - } + $sCheckinby = $checkedInBy->getFullName(); + } //Get Person who checked person out $sCheckoutby = ""; - if ($per->getCheckoutId()) { - $checkedOutBy = PersonQuery::create() + if ($per->getCheckoutId()) { + $checkedOutBy = PersonQuery::create() ->findOneById($per->getCheckoutId()); - $sCheckoutby = $checkedOutBy->getFullName(); - - } - - ?> + $sCheckoutby = $checkedOutBy->getFullName(); + } ?>   getCheckoutDate()) { ?> + if (!$per->getCheckoutDate()) { + ?>   + } else { + ?> + } ?> @@ -477,13 +476,13 @@ function SetPersonHtml(element, perArr) { function loadPerson($iPersonID) { - if ($iPersonID == 0) { + if ($iPersonID == 0) { echo ""; } $person = PersonQuery::create() ->findOneById($iPersonID); $familyRole="("; - if($person->getFamId()) { + if ($person->getFamId()) { if ($person->getFamilyRole()) { $familyRole .= $person->getFamilyRoleName(); } else { @@ -502,6 +501,5 @@ function loadPerson($iPersonID) ' '; echo $html; - } ?>