100) $ItemsPerPage = 100; /* display page selection links */ echo "
"; echo "Page $currentPage of $totalPages
"; display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage); echo "
"; echo "
"; /* display the option to choose how many comments per-page to display */ echo "
"; echo "Number of comments per page:"; echo " "; echo ""; echo " "; echo "
"; echo "
"; /* query for all of the commentId's, ordering by their time in reverse order */ $offset = (($currentPage-1) * $ItemsPerPage); $commentIds = query_parameters("SELECT commentId from appComments ORDER BY ". "appComments.time ASC LIMIT ?, ?", $offset, $ItemsPerPage); while ($oRow = mysql_fetch_object($commentIds)) { $sQuery = "SELECT from_unixtime(unix_timestamp(time), \"%W %M %D %Y, %k:%i\") as time, ". "commentId, parentId, versionId, userid, subject, body ". "FROM appComments WHERE commentId = '?'"; $hResult = query_parameters($sQuery, $oRow->commentId); /* call view_app_comment to display the comment */ $oComment_row = mysql_fetch_object($hResult); Comment::view_app_comment($oComment_row); } /* display page selection links */ echo "
"; display_page_range($currentPage, $pageRange, $totalPages, $_SERVER['PHP_SELF']."?iItemsPerPage=".$ItemsPerPage); echo "
"; apidb_footer(); ?>