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


PHP misc::pagination方法代码示例

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


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

示例1: flush

        echo str_replace('\\', "\", str_replace(' ', '%20', str_replace("'", "'", $row['user'])));
        ?>
'}
			//]]>
			</script>
<?php 
        if ($got_permission !== false) {
            ob_flush();
            flush();
        }
        ++$ccount;
    }
    echo "<br /><br /><div id='paginator'>";
    //Functionized the paginator... Let's see how well this works in practice.
    $misc = new misc();
    print $misc->pagination($_GET['page'], $_GET['s'], $id, $limit, $page_limit, $count, $pid);
    echo '<script type="text/javascript">
		//<![CDATA[
		filterComments(\'' . $id . '\', \'' . $ccount . '\')
		//]]></script></div><a href="#" onclick="Javascript:showHide(\'comment_form\'); return false;">>>Respond</a>
		<form method="post" action="index.php?page=comment&amp;id=' . $id . '&amp;s=save" name="comment_form" id="comment_form" style="display:none">
		<table><tr><td>
		<textarea name="comment" rows="0" cols="0"></textarea>
		</td></tr><tr><td>Post as anonymous?<br />
		<input type="checkbox" name="post_anonymous"/>
		</td></tr><tr><td>
		<input type="submit" name="submit" value="Post comment"/>
		</td></tr><tr><td>
		<input type="hidden" name="conf" id="conf" value="0"/>
		</td></tr></table></form>
		<script type="text/javascript">
开发者ID:xfirespeed,项目名称:TyP-Gallery,代码行数:31,代码来源:post_view.php

示例2: COUNT

}
$query = "SELECT COUNT(*) FROM {$alias_table} WHERE status !='rejected'";
$result = $db->query($query);
$row = $result->fetch_assoc();
$count = $row['COUNT(*)'];
$numrows = $count;
$result->free_result();
$query = "SELECT * FROM {$alias_table} WHERE status != 'rejected' ORDER BY alias ASC LIMIT {$page}, {$limit}";
$result = $db->query($query) or die($db->error);
$ccount = 0;
print '<table class="highlightable" style="width: 100%;"><tr><th width="25%"><b>Tag:<small> (What you search for...)</small></b></th><th width="25%"><b>Alias:</b><small> (What it should be...)</small></th><th>Reason:</th></tr>';
while ($row = $result->fetch_assoc()) {
    if ($row['status'] == "pending") {
        $status = "pending-tag";
    } else {
        $status = "";
    }
    echo '<tr class="' . $status . '"><td>' . $row['alias'] . '</td><td>' . $row['tag'] . '</td><td>' . $row['reason'] . '</td></tr>';
}
echo '</table><br /><br />
	<form method="post" action=""><table><tr><td>
	<b>Name:</b></td><td><input type="text" name="alias" value=""/></td></tr>
	<tr><td><b>Alias to:</b></td><td><input type="text" name="tag" value=""/></td></tr>
	</table>
	<input type="submit" name="submit" value="Submit"/>
	</form>
	<div id="paginator">';
$misc = new misc();
print $misc->pagination($_GET['page'], $sub, $id, $limit, $page_limit, $numrows, $_GET['pid'], $tags);
?>
</div></div></body></html>
开发者ID:xfirespeed,项目名称:TyP-Gallery,代码行数:31,代码来源:alias.php

示例3: urlencode

            $t_decode = urlencode(html_entity_decode($ttags, ENT_NOQUOTES, "UTF-8"));
            $c_decode = urlencode(html_entity_decode($current, ENT_NOQUOTES, "UTF-8"));
            echo '<li><a href="index.php?page=post&amp;s=list&amp;tags=' . $t_decode . "+" . $c_decode . '">+</a><a href="index.php?page=post&amp;s=list&amp;tags=' . $t_decode . "+-" . $c_decode . '">-</a> <span style="color: #a0a0a0;">? <a href="index.php?page=post&amp;s=list&amp;tags=' . $c_decode . '">' . str_replace('_', ' ', $current) . '</a> ' . $row['index_count'] . '</span></li>';
        }
        //Print out image results and filter javascript
        echo '<li><br /><br /></li></ul></div></center></div></div><div class="content"><div>';
        $images .= "</div><br /><br /><div id='paginator'>";
        $images .= '<script type="text/javascript">
			//<![CDATA[
			filterPosts(posts)
			//]]>
			</script>';
        echo $images;
        //Pagination function. This should work for the whole site... Maybe.
        $misc = new misc();
        print $misc->pagination($_GET['page'], $_GET['s'], $id, $limit, $page_limit, $numrows, $_GET['pid'], $_GET['tags']);
    }
    //Cache doesn't exist for search, make one.
    if ($no_cache === true) {
        $data = ob_get_contents();
        ob_end_clean();
        if (isset($_GET['pid']) && is_numeric($_GET['pid']) && $_GET['pid'] > 0) {
            $page = $_GET['pid'] / $limit + 1;
        } else {
            $page = 0;
        }
        if ($new_tag_cache != "") {
            if (!is_dir("{$main_cache_dir}" . "" . "search_cache/" . $new_tag_cache)) {
                @mkdir("{$main_cache_dir}" . "" . "search_cache/" . $new_tag_cache);
            }
            $cache->save("search_cache/" . $new_tag_cache . "/" . $page . ".html", $data);
开发者ID:xfirespeed,项目名称:TyP-Gallery,代码行数:31,代码来源:post_list.php

示例4: isset

        $images .= '<span class="thumb" style="margin: 10px;"><a href="index.php?page=post&amp;s=view&amp;id=' . $row['id'] . '" id="p' . $row['id'] . '" onclick="document.location=\'index.php?page=post&amp;s=view&amp;id=' . $row['id'] . '\'; return false;"><img src="' . $thumbnail_url . $misc->getThumb($row['image'], $row['directory']) . '" title="' . $tags . '" border="0" alt="image_thumb"/></a>';
        isset($_COOKIE['user_id']) && $_COOKIE['user_id'] == $id ? $images .= '<br /><a href="#" onclick="document.location=\'index.php?page=favorites&s=delete&id=' . $row['id'] . '&pid=' . $page . '\'; return false;"><b>Remove</b></a></span>' : ($images .= '</span>');
        $images .= '<script type="text/javascript">
			posts[' . $row['id'] . '] = {\'tags\':\'' . str_replace('\\', "&#92;", str_replace(' ', '%20', str_replace("'", "&#039;", $tags))) . '\'.split(/ /g), \'rating\':\'' . $row['rating'] . '\', \'score\':' . $row['score'] . ', \'user\':\'' . str_replace('\\', "&#92;", str_replace(' ', '%20', str_replace("'", "&#039;", $row['owner']))) . '\'}
			</script>';
    }
    $images .= '<div style="margin-top: 550px; text-align: right;"><a id="pi" href="#" onclick="showHideIgnored(\'0\',\'pi\'); return false;"></a></div>
		<script type="text/javascript">
		filterPosts(posts)
		</script>
		<div id=\'paginator\'>';
    echo $images;
    ob_flush();
    flush();
    $result->free_result();
    print $misc->pagination($_GET['page'], $_GET['s'], $id, $limit, $page_limit, $numrows, $page);
} else {
    if (isset($_GET['s']) && $_GET['s'] == "list") {
        //List how many users per page that should be here.
        //number of images/page
        $limit = 50;
        //number of pages to display. number - 1. ex: for 5 value should be 4
        $page_limit = 6;
        header("Cache-Control: store, cache");
        header("Pragma: cache");
        require "includes/header.php";
        echo '<div id="content"><div id="account-favorites-list"><table width="100%"><tr><th width="30%">User</th><th width="70%">Count</th></tr>';
        if (isset($_GET['pid']) && $_GET['pid'] != "" && is_numeric($_GET['pid']) && $_GET['pid'] >= 0) {
            $page = $db->real_escape_string($_GET['pid']);
        } else {
            $page = 0;
开发者ID:logtcn,项目名称:gelbooru-fork,代码行数:31,代码来源:favorites.php


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