当前位置: 首页>>代码示例>>PHP>>正文


PHP Pagination::previous_page方法代码示例

本文整理汇总了PHP中Pagination::previous_page方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::previous_page方法的具体用法?PHP Pagination::previous_page怎么用?PHP Pagination::previous_page使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pagination的用法示例。


在下文中一共展示了Pagination::previous_page方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Pagination

            }
        }
    }
    if ($success) {
        $session->message("<div class='success'>Job(s) has been remove from Spotlight</div>");
        redirect_to($_SERVER['PHP_SELF']);
        die;
    }
}
$page = !empty($_GET['page']) ? (int) $_GET['page'] : 1;
$per_page = JOBS_PER_SEARCH;
$total_count = Job::count_all();
$smarty->assign('total_count', $total_count);
$smarty->assign('page', $page);
$pagination = new Pagination($page, $per_page, $total_count);
$smarty->assign('previous_page', $pagination->previous_page());
$smarty->assign('has_previous_page', $pagination->has_previous_page());
$smarty->assign('total_pages', $pagination->total_pages());
$smarty->assign('has_next_page', $pagination->has_next_page());
$smarty->assign('next_page', $pagination->next_page());
$offset = $pagination->offset();
$sql = " SELECT * FROM " . TBL_JOB;
$sql .= " LIMIT {$per_page} ";
$sql .= " OFFSET {$offset} ";
$lists = Job::find_by_sql($sql);
$manage_lists = array();
if ($lists && is_array($lists)) {
    $i = 1;
    foreach ($lists as $list) {
        unset($employer);
        if (!empty($list->fk_employer_id) && $list->fk_employer_id != 0) {
开发者ID:nim94sha,项目名称:Online-Job-Portal,代码行数:31,代码来源:manage_listings.php

示例2:

						</tr>
		            </tbody>
        <?php 
        $serial_no++;
    }
}
?>
 
</table>
<div class="pagination " style="clear: both;">
	<ul>
		<?php 
if ($pagination->total_pages() > 1) {
    if ($pagination->has_previous_page()) {
        echo "<li class='disabled'><a href=\"cheack_my_feedbacks.php?page=";
        echo $pagination->previous_page();
        echo "\">&laquo; Previous</a></li> ";
    }
    for ($i = 1; $i <= $pagination->total_pages(); $i++) {
        if ($i == $page) {
            echo "<li><span class=\"selected\">{$i}</span></li>";
        } else {
            echo "<li><a href=\"cheack_my_feedbacks.php?page={$i}\">{$i}</a></li>";
        }
    }
    if ($pagination->has_next_page()) {
        echo "<li class='disabled'> <a href=\"cheack_my_feedbacks.php?page=";
        echo $pagination->next_page();
        echo "\">Next &raquo;</a></li> ";
    }
}
开发者ID:Ghaji,项目名称:transcripts,代码行数:31,代码来源:cheack_my_feedbacks.php

示例3: confirm

"><i class="small circular inverted yellow eye icon"></i></a>
    		</td>
			<?php 
    if ($_SESSION['role'] != "moderator" && $_SESSION['role'] != "student") {
        echo "<td><a href=\"edit_request.php?id={$request->id}\"><i class=\"small circular inverted orange edit icon\"></i></a></td>\t\n\t\t\t<td><a href=\"delete_request.php?id={$request->id}\" onclick=\"return confirm('Are you sure?');\"><i class=\"small circular inverted red remove icon\"></i></a></td>\n\t\t\t\n\t\t\t";
    }
    ?>
		  </tr>  
	<?php 
}
?>
	</table>


<?php 
$prev = $pagination->previous_page();
$next = $pagination->next_page();
$lastpage = $pagination->total_pages();
$LastPagem1 = $lastpage - 1;
$paginate = '';
if ($lastpage > 1) {
    $paginate .= "<ul class='pagination'>";
    // Previous
    if ($pagination->has_previous_page()) {
        $paginate .= "<li><a href='list_requests.php?page={$prev}'>&laquo; Previous</a></li>";
    }
    // Pages
    if ($lastpage < 7 + $stages * 2) {
        for ($counter = 1; $counter <= $lastpage; $counter++) {
            if ($counter == $page) {
                $paginate .= "<li class='active'><a href='list_requests.php?page={$counter}'>{$counter}</a></li>";
开发者ID:aluck19,项目名称:assignment2Do,代码行数:31,代码来源:list_requests.php

示例4:

    echo "<td><a href=\"" . $photo->image_path() . " \" ><img width=\"100\" height = \" 100\"src=\"" . $photo->image_path() . "\" /></a></td>";
    echo "<td>" . $photo->caption . "</td>";
    echo "<td>" . $photo->filename . "</td>";
    echo "<td>" . $photo->type . "</td>";
    echo "<td>" . $photo->size_as_text() . "</td>";
    echo "</tr>";
}
?>
</table> -->


		<div id="pagination" style="clear:both;">
			<?php 
if ($pagination->total_pages() > 1) {
    if ($pagination->has_prev_page()) {
        echo " <a href=\"index.php?page=" . $pagination->previous_page() . "\">previous &laquo;</a>";
    }
    for ($i = 1; $i <= $pagination->total_pages(); $i++) {
        if ($i == $page) {
            echo "<span class=\"selected\" >" . $i . "</span>";
        } else {
            echo "<a href=\"index.php?page=" . $i . "\">" . $i . "</a>";
        }
    }
    if ($pagination->has_next_page()) {
        echo " <a href=\"index.php?page=" . $pagination->next_page() . "\">Next &raquo;</a>";
    }
}
?>
		<br />
		<br />
开发者ID:ciplpj,项目名称:photo_gallery,代码行数:31,代码来源:index.php

示例5:

                                </table>

                        </div>
                </div>  
                                <!--PAGINATION CLCIK ON THE BELOW SIDE-->
    <div class="row text-center">

      <div class="col-xs-4">

        <?php 
if ($pagination->total_page() > 1) {
    ?>
            <ul class="pagination">
        <?php 
    if ($pagination->has_previous_page()) {
        echo "<li><a href=\"add_town.php?page={$pagination->previous_page()}\">&laquo;</a></li>";
    } else {
        echo "<li class=\"disabled\"><span>&laquo;</span></li>";
    }
    for ($i = 1; $i <= $pagination->total_page(); $i++) {
        if ($i == $pagination->current_page) {
            echo "<li class=\"active\"><a href=\"add_town.php?page={$i}\">{$i}</a></li>";
        } else {
            echo "<li><a href=\"add_town.php?page={$i}\">{$i}</a></li>";
        }
    }
    if ($pagination->has_next_page()) {
        echo "<li><a href=\"add_town.php?page={$pagination->next_page()}\">&raquo;</a></li>";
    } else {
        echo "<li class=\"disabled\"><span>&raquo;</span></li>";
    }
开发者ID:rodzflores,项目名称:Casing-Catering,代码行数:31,代码来源:town_modal.php

示例6: urldecode

		</a>
    <p><?php 
    echo $photo->caption;
    ?>
</p>
  </div>
<?php 
}
?>

<div id="pagination" style="clear: both;">
    <?php 
if ($pagination->total_pages() > 1) {
    if ($pagination->has_previous_page()) {
        echo "<a href=\"index.php?page=";
        echo urldecode($pagination->previous_page());
        echo "\">&laquo; Previous</a> ";
    }
    for ($i = 1; $i <= $pagination->total_pages(); $i++) {
        if ($i == $page) {
            echo " <span class=\"selected\">{$i}</span> ";
        } else {
            echo " <a href=\"index.php?page={$i}\">{$i}</a> ";
        }
    }
    if ($pagination->has_next_page()) {
        echo " <a href=\"index.php?page=";
        echo urldecode($pagination->next_page());
        echo "\">Next &raquo;</a> ";
    }
}
开发者ID:kamy333,项目名称:photo_gallery,代码行数:31,代码来源:index.php

示例7:

}
?>
                                    
                                    </table>  
                                    <!--PAGINATION CLCIK ON THE BELOW SIDE-->
    <div class="row text-center">

      <div class="col-xs-12">

        <?php 
if ($pagination->total_page() > 1) {
    ?>
            <ul class="pagination">
        <?php 
    if ($pagination->has_previous_page()) {
        echo "<li><a href=\"Team_member.php?page={$pagination->previous_page()}\">&laquo;</a></li>";
    } else {
        echo "<li class=\"disabled\"><span>&laquo;</span></li>";
    }
    for ($i = 1; $i <= $pagination->total_page(); $i++) {
        if ($i == $pagination->current_page) {
            echo "<li class=\"active\"><a href=\"Team_member.php?page={$i}\">{$i}</a></li>";
        } else {
            echo "<li><a href=\"Team_member.php?page={$i}\">{$i}</a></li>";
        }
    }
    if ($pagination->has_next_page()) {
        echo "<li><a href=\"Team_member.php?page={$pagination->next_page()}\">&raquo;</a></li>";
    } else {
        echo "<li class=\"disabled\"><span>&raquo;</span></li>";
    }
开发者ID:rodzflores,项目名称:Casing-Catering,代码行数:31,代码来源:Team_member.php

示例8:

                                        <?php 
}
?>
                            </table>
                            <!--PAGINATION CLCIK ON THE BELOW SIDE-->
    <div class="row text-center">

      <div class="col-xs-12">

        <?php 
if ($pagination->total_page() > 1) {
    ?>
            <ul class="pagination">
        <?php 
    if ($pagination->has_previous_page()) {
        echo "<li><a href=\"Event_5.php?page={$pagination->previous_page()}\">&laquo;</a></li>";
    } else {
        echo "<li class=\"disabled\"><span>&laquo;</span></li>";
    }
    for ($i = 1; $i <= $pagination->total_page(); $i++) {
        if ($i == $pagination->current_page) {
            echo "<li class=\"active\"><a href=\"Event_5.php?page={$i}\">{$i}</a></li>";
        } else {
            echo "<li><a href=\"Event_5.php?page={$i}\">{$i}</a></li>";
        }
    }
    if ($pagination->has_next_page()) {
        echo "<li><a href=\"Event_5.php?page={$pagination->next_page()}\">&raquo;</a></li>";
    } else {
        echo "<li class=\"disabled\"><span>&raquo;</span></li>";
    }
开发者ID:rodzflores,项目名称:Casing-Catering,代码行数:31,代码来源:event_modal.php

示例9:

?>
                            </table> 


                  <!--PAGINATION CLCIK ON THE BELOW SIDE-->
    <div class="row text-center">

      <div class="col-xs-12">

        <?php 
if ($pagination->total_page() > 1) {
    ?>
            <ul class="pagination">
        <?php 
    if ($pagination->has_previous_page()) {
        echo "<li><a href=\"customer_feedback_6.php?page={$pagination->previous_page()}\">&laquo;</a></li>";
    } else {
        echo "<li class=\"disabled\"><span>&laquo;</span></li>";
    }
    for ($i = 1; $i <= $pagination->total_page(); $i++) {
        if ($i == $pagination->current_page) {
            echo "<li class=\"active\"><a href=\"customer_feedback_6.php?page={$i}\">{$i}</a></li>";
        } else {
            echo "<li><a href=\"customer_feedback_6.php?page={$i}\">{$i}</a></li>";
        }
    }
    if ($pagination->has_next_page()) {
        echo "<li><a href=\"customer_feedback_6.php?page={$pagination->next_page()}\">&raquo;</a></li>";
    } else {
        echo "<li class=\"disabled\"><span>&raquo;</span></li>";
    }
开发者ID:rodzflores,项目名称:Casing-Catering,代码行数:31,代码来源:Customer_feedback_6.php

示例10:

    <input type="hidden" readonly name"review_option" id="review_option" value="<?php 
    echo $ques_options[$id];
    ?>
" />
  	<?php 
}
?>
</table>
  
  <div id="pagination" style="clear: both;">
<?php 
if ($pg->total_pages() > 1) {
    if ($pg->has_previous_page()) {
        ?>
    	<a href="javascript:void(0)" onClick="call_review('review.php?page=<?php 
        echo $pg->previous_page();
        ?>
')"> &laquo; Previous</a> 
   		<?php 
    }
    ?>

		<?php 
    for ($j = 1; $j <= $pg->total_pages(); $j++) {
        if ($j == $page) {
            ?>
			<span class="selected"><?php 
            echo $j;
            ?>
</span>
            <?php 
开发者ID:niteshsinha,项目名称:OQM,代码行数:31,代码来源:review.php

示例11:

    	echo '">&larr; Previous</a>';
    	echo '</li>';
    }
    
    if ($pagination->has_next_page()){
    	
    	echo '<li class="next">';
    	echo '<a href="list_photos.php?page=';
    	echo $pagination->next_page();
    	echo '">Next &rarr;</a>';
    	echo '</li>';
    }
    echo '</ul>';
    */
    echo '<ul class="pagination pagination">';
    echo $pagination->has_previous_page() ? '<li><a href="list_photos.php?page=' . $pagination->previous_page() . '">&laquo;</a></li>' : '<li class="disabled"><a href="">&laquo;</a></li>';
    for ($i = 1; $i <= $pagination->total_pages(); $i++) {
        echo '<li';
        echo $i == $pagination->current_page ? ' class="active"' : '';
        echo '>';
        echo '<a href="list_photos.php?page=';
        echo $i;
        echo '">' . $i . '</a>';
        echo '</li>';
    }
    echo $pagination->has_next_page() ? '<li><a href="list_photos.php?page=' . $pagination->next_page() . '">&raquo;</a></li>' : '<li class="disabled"><a href="">&raquo;</a></li>';
    echo '</ul>';
}
?>
		</div>
		
开发者ID:afthaj,项目名称:gaman-new,代码行数:30,代码来源:list_photos.php

示例12: Pagination

			<br><br>
		
	<?php 
    }
}
?>
		
		
		<div id="pagination" style="clear: both;" >
			
			<?php 
$anotherpagination = new Pagination($page, $per_page, $total_count);
if ($anotherpagination->total_pages() > 1) {
    if ($anotherpagination->has_previous_page()) {
        echo "<a href =\"allusers.php?page=";
        echo $anotherpagination->previous_page();
        echo "\">&laquo; Previous</a> ";
    }
    for ($i = 1; $i <= $anotherpagination->total_pages(); $i++) {
        if ($i == $page) {
            echo " <span class=\"selected\">{$i}</span> ";
        } else {
            echo " <a href=\"allusers.php?page={$i}\">{$i}</a> ";
        }
    }
    if ($anotherpagination->has_next_page()) {
        echo " <a href =\"allusers.php?page=";
        echo $anotherpagination->next_page();
        echo "\">Next &raquo;</a> ";
    }
}
开发者ID:raph8888,项目名称:raph-web.com,代码行数:31,代码来源:allusers.php

示例13: count

    echo "<td><a href=\"../" . $photo->image_path() . " \" ><img width=\"100\" height = \" 100\"src=\"../" . $photo->image_path() . "\" /></a></td>";
    echo "<td>" . $photo->caption . "</td>";
    echo "<td>" . $photo->filename . "</td>";
    echo "<td>" . $photo->type . "</td>";
    echo "<td>" . $photo->size_as_text() . "</td>";
    echo "<td><a href=\"delete_photo.php?id=" . $photo->id . "\">Delete</a></td>";
    echo "<td><a href=\"photo_comment.php?id=" . $photo->id . "\">View All " . count($photo->comment()) . " Comments" . "</td>";
    echo "</tr>";
}
?>
		</table>
		<div id="pagination">
			<?php 
if ($pagination->total_pages() > 1) {
    if ($pagination->has_prev_page()) {
        echo " <a href=\"view_photograph.php?page=" . $pagination->previous_page() . "\">previous &laquo;</a>";
    }
    for ($i = 1; $i <= $pagination->total_pages(); $i++) {
        if ($i == $page) {
            echo "<span class=\"selected\" >" . $i . "</span>";
        } else {
            echo "<a href=\"view_photograph.php?page=" . $i . "\">" . $i . "</a>";
        }
    }
    if ($pagination->has_next_page()) {
        echo " <a href=\"view_photograph.php?page=" . $pagination->next_page() . "\">Next &raquo;</a>";
    }
}
?>

		</div>
开发者ID:ciplpj,项目名称:photo_gallery,代码行数:31,代码来源:view_photograph.php


注:本文中的Pagination::previous_page方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。