| Id: '.$id.' | |||
| Track number: '.$track_id.' | |||
| Customer name: '.$customer_name.' | |||
| Customer address: '.$customer_address.' | |||
| Customer phone: '.$customer_phone.' | |||
| Customer email: '.$customer_email.' | |||
| Items name: '.$item_name.' | |||
| Items detail: '.$item_detail.' | |||
| Entry date: '.$date_entry.' | |||
| Source address: '.$source_address.' | |||
| Destination address: '.$destination_address.' | |||
| Shipment cost: =N='.number_format($cost).' | |||
| Other detail: '.$other_detail.' | |||
| Status: '.$status1_color.' | |||
| Received detail: '.$received_detail.' | |||
| Date delivered: '.$date_delivered.' | |||
Total cost: =N=".number_format($cost_delivered)."
"; }elseif($status_type=='not delivered'){ print "Total cost: =N=".number_format($cost_not_delivered)."
"; } ?>"; // how many rows we have in database $query = "SELECT COUNT(id) AS numrows FROM logistic_shipment WHERE status1 = '$status_type'"; $result = mysqli_query($conn,$query) or die(mysqli_error($conn)); $row = mysqli_fetch_array($result, MYSQL_ASSOC); $numrows = $row['numrows']; // how many pages we have when using paging? $maxPage = ceil($numrows/$rowsPerPage); // print the link to access each page $self = $_SERVER['PHP_SELF']; $nav = ''; for($page = 1; $page <= $maxPage; $page++) { if ($page == $pageNum) { $nav .= " $page "; // no need to create a link to current page } else { $nav .= " $page "; } } // creating previous and next link // plus the link to go straight to // the first and last page if ($pageNum > 1) { $page = $pageNum - 1; $prev = " [Prev] "; $first = " [First Page] "; } else { $prev = ' '; // we're on page one, don't print previous link $first = ' '; // nor the first page link } if ($pageNum < $maxPage) { $page = $pageNum + 1; $next = " [Next] "; $last = " [Last Page] "; } else { $next = ' '; // we're on the last page, don't print next link $last = ' '; // nor the last page link } // print the navigation link echo $first . $prev . $nav . $next . $last; // and close the database connection // include '../conn/closedb.php'; ?>