コード例 #1
0
ファイル: index.php プロジェクト: junilm/MyMap_AdminPanel
">
                                                  <i class="fa fa-trash" title="Delete"></i>
                                              </a>
                                          </span>
                                      </div>
                                  </td>
                              </tr>
                              <?php 
    }
    ?>
                          </table>
                      </div>
                      <!-- /.box-body -->
                      <?php 
    if ($searchKey != "") {
        $numRows = $feedbackController->countRows();
    } else {
        $numRows = $feedbackController->countRows($searchKey);
    }
    // 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 == "") {
                $nav .= "<li class='paginate_button'><a href=\"{$self}?page={$page}\">{$page}</a> ";