<thead> <tr> <th>#</th> <th>Selection</th> <th>Serial</th> <th>Address</th> <th>Start Date-Hour</th> <th>End Date-Hour</th> </tr> </thead> <tbody id='permissions'> <?php $permissionsLocks = Permission::searchByRecipient($_SESSION['identification']); $counter = 1; foreach ($permissionsLocks as $permission) { $lock = Lock::searchBySerial($permission->lockSerial()); $row = "<tr>" . "<td>" . $counter++ . "</td>" . "<td><input type='radio' name='permissions' onchange='showCodes(selectPermission())' value='" . $permission->id() . "'></td>" . "<td>" . $lock->serial() . "</td>" . "<td>" . $lock->address() . "</td>" . "<td>" . $permission->startDateHour() . "</td>" . "<td>" . $permission->endDateHour() . "</td>" . "</tr>"; echo $row; } ?> </tbody> </table> </fieldset> </div> </div> </div> </div> <div class="section"> <div class="container"> <div class="row"> <div class="col-md-12">
public function myLock() { return Lock::searchBySerial($this->lockSerial); }