<tr> <?php require_once 'private/LMS_Engine.php'; $engine = new LMS_Engine(); if (isset($type) && $type == "Books") { $path = "Librarian.php?page=issued_Book_detail"; $issue_info = $engine->get_issue_by_($found['id']); } elseif (isset($type) && $type == "CD-DVDs") { $path = "Librarian.php?page=issued_CD_detail"; $state = $engine->is_issuedCD($found['id']); $issue_info = $engine->get_CD_issue_by_($found['id']); } elseif (isset($type) && $type == "Magazines") { $path = "Librarian.php?page=issued_Magazine_detail"; $state = $engine->is_issuedMagazine($found['id']); $issue_info = $engine->get_Meg_issue_by_($found['id']); } else { $path = "Librarian.php?page=issued_Book_detail"; $state = $engine->is_issuedBook($found['id']); $issue_info = $engine->get_issue_by_($found['id']); } $User_Info = $engine->get_student($issue_info['user_id']); $prev_date = strtotime($issue_info['borrow_date']); $date_dif = abs(time() - $prev_date); if ($date_dif > 86400) { $days_ = floor($date_dif / (60 * 60 * 24)); $date_dif = $days_ . " days ago"; } elseif ($date_dif > 3600) { $hour = floor($date_dif / (60 * 60)); $date_dif = $hour . " hours ago"; } elseif ($date_dif > 60) { $min = floor($date_dif / 60);