query($query); // Get total of Num rows from the database query if (isset($_GET['pn'])) { // Get pn from URL vars if it is present $pn = preg_replace('#[^0-9]#i', '', $_GET['pn']); // filter everything but numbers for security(new) } else { // If the pn URL variable is not present force it to be value of page number 1 $pn = 1; } $itemsPerPage = 20; $lastPage = ceil($query / $itemsPerPage); if ($pn < 1) { // If it is less than 1 $pn = 1; // force if to be 1 } else if ($pn > $lastPage) { // if it is greater than $lastpage $pn = $lastPage; // force it to be $lastpage's value } $centerPages = ""; $sub1 = $pn - 1; $sub2 = $pn - 2; $add1 = $pn + 1; $add2 = $pn + 2; if ($pn == 1) { $centerPages .= '  ' . $pn . '  '; $centerPages .= '  ' . $add1 . '  '; } else if ($pn == $lastPage) { $centerPages .= '  ' . $sub1 . '  '; $centerPages .= '  ' . $pn . '  '; } else if ($pn > 2 && $pn < ($lastPage - 1)) { $centerPages .= '  ' . $sub2 . '  '; $centerPages .= '  ' . $sub1 . '  '; $centerPages .= '  ' . $pn . '  '; $centerPages .= '  ' . $add1 . '  '; $centerPages .= '  ' . $add2 . '  '; } else if ($pn > 1 && $pn < $lastPage) { $centerPages .= '  ' . $sub1 . '  '; $centerPages .= '  ' . $pn . '  '; $centerPages .= '  ' . $add1 . '  '; } $limit = 'LIMIT ' . ($pn - 1) * $itemsPerPage . ',' . $itemsPerPage; $paginationDisplay = ""; // Initialize the pagination output variable if($pn > 0){ if ($lastPage != "1") { $paginationDisplay .= 'Page ' . $pn . ' of ' . $lastPage . '      '; if ($pn != 1) { $previous = $pn - 1; $paginationDisplay .= '  Back '; } $paginationDisplay .= '' . $centerPages . ''; if ($pn != $lastPage) { $nextPage = $pn + 1; $paginationDisplay .= '  Next '; } } } ?>
get_results($querys); if ($results): ?>
trans_id; ?> post_id; ?> user_name; ?> pay_email; ?> post_title; ?> paypal_transection_id; ?> status == 1) echo 'Paid'; if ($result->status == 0) echo 'Pending'; ?> txn_type; ?> payable_amt; ?> payment_date); ?>
: