Exemple #1
0
                      </td>
                    </tr>
                 <?php 
    }
    ?>

              </table>
            </div>
            <!-- /.box-body -->
            <!--Pagination -->
              <?php 
    if ($searchKey != "") {
        $numRows = $contributionController->countRows($searchKey);
    } else {
        if ($status != "") {
            $numRows = $contributionController->countStatus($status);
        } else {
            $numRows = $contributionController->countRows();
        }
    }
    // 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 .= "<li class='paginate_button active'><a href='#' >{$page}</a> ";
            // no need to create a link to current page
        } else {
            if ($searchKey == "") {