DashBoard

Total
Books

Issued
Books

Late
Dues

Damaged
Books
Recently Issued Books View more
db->get_where('lms_books', ['id'=> $ridata['book_id']])->row_array(); $stdIs = $ridata['eu_unique_id']; $eu_name = $this->LmsAdmin_Model->getStudentDataById($stdIs); $name=''; $mobile=''; if($eu_name) { $name = $eu_name['name']; $mobile = $eu_name['mobile']; } //calculating of remaining days $today = date('Y-m-d'); $remdays_diff = strtotime($ridata['return_date'])-strtotime($today); $remaining_days = round($remdays_diff / 86400); if($remaining_days<0) { $remaining_days = 0; } //calculating of over due days $oddays = 0; $class=''; $overdue_diff = strtotime($today)-strtotime($ridata['return_date']); $overdue_days = round($overdue_diff / 86400); if($overdue_days>$remaining_days){ $oddays = $overdue_days; $class = 'class="due"'; } $issDateObj = new DateTime($ridata['issued_date']); $issueDate = $issDateObj->format('Y-m-d'); $todayDateObj = new DateTime($npCurrDate); $todayIs = $todayDateObj->format('Y-m-d'); $retDateObj = new DateTime($ridata['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"'; if($over_due_days < 0) $over_due_days = 0; ?>
Book Name Student Name Contact Issued Date Remaining Days Over Due
format(DATE_FORMAT); ?> > Days