db->get_where('lms_books', ['id' => $ibData['book_id']])->row_array(); $stdIs = $ibData['eu_unique_id']; $eu_name = $this->LmsAdmin_Model->getStudentDataById($stdIs); $name = ''; $mobile = ''; if ($eu_name) { $name = $eu_name['name']; $mobile = $eu_name['mobile']; } $issDateObj = new DateTime($ibData['issued_date']); $issueDate = $issDateObj->format('Y-m-d'); $todayDateObj = new DateTime($npCurrDate); $todayIs = $todayDateObj->format('Y-m-d'); $retDateObj = new DateTime($ibData['return_date']); $returnDate = $retDateObj->format('Y-m-d'); $remDaysClass = ''; $date1 = date_create($todayIs); $date2 = date_create($returnDate); $remaining_days = $date1->diff($date2)->format("%r%a"); if ($remaining_days == 0) { $remaining_days = 'Due Today'; $remDaysClass = 'due'; } else if ($remaining_days < 0) $remaining_days = '0 Days'; else $remaining_days = $remaining_days . ' Days'; $class = ''; $over_due_days = 0; $date11 = date_create($returnDate); $date22 = date_create($todayIs); $over_due_days = $date11->diff($date22)->format("%r%a"); if ($over_due_days > 0) $class = 'class="due" style="font-weight:500"'; if ($over_due_days < 0) $over_due_days = 0; ?>
Book Name Student Id Student Name Contact Issued Date Remaining Days Over Due Status
format(DATE_FORMAT); ?> > > Days