function bDateTimeBefore($idx1, $idx2) { //--------------------------------------------------------------------- // return true if $objDateTime1<$objDateTime2 //--------------------------------------------------------------------- return dl_date_time::bDateTimeAfter($idx2, $idx1); }
private function strClientBasedGroupRptHTML() { //--------------------------------------------------------------------- // //--------------------------------------------------------------------- global $glclsDTDateFormat; $clsDateTime = new dl_date_time(); $strOut = '<table class="enpRptC"> <tr> <td class="enpRptLabel">clientID</td> <td class="enpRptLabel">Name</td> <td class="enpRptLabel">Location</td> <td class="enpRptLabel">Age/Gender</td> <td class="enpRptLabel">Group Membership</td> </tr>' . "\n"; $sqlStr = "SELECT\n cr_lKeyID, cr_strFName, cr_strLName,\n cr_dteBirth, cr_enumGender, cr_lLocationID,\n cl_strLocation\n FROM tmpGroupMatch\n INNER JOIN client_records ON cr_lKeyID=gm_lForeignID\n INNER JOIN client_location ON cr_lLocationID=cl_lKeyID\n ORDER BY gm_lKeyID;"; $query = $this->db->query($sqlStr); foreach ($query->result() as $row) { $lFID = $row->cr_lKeyID; $this->groupMembershipViaFID(CENUM_CONTEXT_CLIENT, $lFID); $strGroupList = '<ul style="list-style-type: square; display:inline; margin-left: 0; padding-left: 0;">'; foreach ($this->arrMemberInGroups as $grpMember) { $strGroupList .= '<li style="margin-left: 20px; padding-left: 3px;">' . htmlspecialchars($grpMember->strGroupName) . '</li>'; } $strGroupList .= '</ul>'; $strAgeBDay = $clsDateTime->strPeopleAge(0, $row->cr_dteBirth, $lAgeYears, $glclsDTDateFormat); $strOut .= '<tr> <td class="enpRpt" style="width: 65px;">' . strLinkView_ClientRecord($lFID, 'View client record', true) . ' ' . str_pad($lFID, 5, '0', STR_PAD_LEFT) . ' </td> <td class="enpRpt" style="width: 160px;">' . htmlspecialchars($row->cr_strLName . ', ' . $row->cr_strFName) . ' </td> <td class="enpRpt" style="width: 200px;">' . htmlspecialchars($row->cl_strLocation) . ' </td> <td class="enpRpt" style="width: 150px;">' . $strAgeBDay . '<br>' . $row->cr_enumGender . ' </td> <td class="enpRpt" style="width: 200px;">' . $strGroupList . ' </td> </tr>' . "\n"; $strOut .= '</tr>' . "\n"; } $strOut .= '</table>' . "\n"; return $strOut; }