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


PHP pager函数代码示例

本文整理汇总了PHP中pager函数的典型用法代码示例。如果您正苦于以下问题:PHP pager函数的具体用法?PHP pager怎么用?PHP pager使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: read_invitations

function read_invitations()
{
    global $TABLE_PREFIX, $admintpl, $language, $CURUSER, $STYLEPATH, $btit_settings;
    $scriptname = htmlspecialchars($_SERVER["PHP_SELF"] . "?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=invitations");
    $addparam = "";
    $res = get_result("SELECT COUNT(*) as invites FROM {$TABLE_PREFIX}invitations", true);
    $count = $res[0]["invites"];
    list($pagertop, $pagerbottom, $limit) = pager('15', $count, $scriptname . "&");
    $admintpl->set("inv_pagertop", $pagertop);
    $admintpl->set("inv_pagerbottom", $pagerbottom);
    $results = get_result("SELECT * FROM {$TABLE_PREFIX}invitations ORDER BY id DESC {$limit}", true);
    $invitees = array();
    $i = 0;
    foreach ($results as $id => $data) {
        $res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE id = " . $data["inviter"], true);
        if (mysql_num_rows($res) > 0) {
            $inviter_name = mysql_result($res, 0, 0);
        } else {
            $inviter_name = 'Unknown';
        }
        $invitees[$i]["inviter"] = "<a href=\"index.php?page=userdetails&amp;user=" . $data["inviter"] . "\">" . $inviter_name . "</a>";
        $invitees[$i]["invitee"] = unesc($data["invitee"]);
        $invitees[$i]["hash"] = unesc($data["hash"]);
        $invitees[$i]["time_invited"] = $data["time_invited"];
        $invitees[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=invitations&amp;action=delete&amp;id=" . $data["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
        $i++;
    }
    $admintpl->set("invitees", $invitees);
    $admintpl->set("language", $language);
}
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:30,代码来源:admin.invitations.php

示例2: cleanup_show_main

function cleanup_show_main()
{
    $count1 = get_row_count('cleanup');
    $perpage = 15;
    $pager = pager($perpage, $count1, 'staffpanel.php?tool=cleanup_manager&amp;');
    $htmlout = "<h2>Current Cleanup Tasks</h2>\n    <table class='torrenttable' bgcolor='#333333' border='1' cellpadding='5px' width='80%'>\n    <tr>\n      <td class='colhead'>Cleanup Title &amp; Description</td>\n      <td class='colhead' width='150px'>Runs every</td>\n      <td class='colhead' width='150px'>Next Clean Time</td>\n      <td class='colhead' width='40px'>Edit</td>\n      <td class='colhead' width='40px'>Delete</td>\n      <td class='colhead' width='40px'>Off/On</td>\n      <td class='colhead' style='width: 40px;'>Run&nbsp;now</td>\n    </tr>";
    $sql = sql_query("SELECT * FROM cleanup ORDER BY clean_time ASC " . $pager['limit']) or sqlerr(__FILE__, __LINE__);
    if (!mysqli_num_rows($sql)) {
        stderr('Error', 'Fucking panic now!');
    }
    while ($row = mysqli_fetch_assoc($sql)) {
        $row['_clean_time'] = get_date($row['clean_time'], 'LONG');
        $row['clean_increment'] = $row['clean_increment'];
        $row['_class'] = $row['clean_on'] != 1 ? " style='color:red'" : '';
        $row['_title'] = $row['clean_on'] != 1 ? " (Locked)" : '';
        $row['_clean_time'] = $row['clean_on'] != 1 ? "<span style='color:red'>{$row['_clean_time']}</span>" : $row['_clean_time'];
        $htmlout .= "<tr>\n          <td{$row['_class']}><strong>{$row['clean_title']}{$row['_title']}</strong><br />{$row['clean_desc']}</td>\n          <td>" . mkprettytime($row['clean_increment']) . "</td>\n          <td>{$row['_clean_time']}</td>\n          <td align='center'><a href='staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=edit&amp;cid={$row['clean_id']}'>\n            <img src='./pic/aff_tick.gif' alt='Edit Cleanup' title='Edit' border='0' height='12' width='12' /></a></td>\n\n          <td align='center'><a href='staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=delete&amp;cid={$row['clean_id']}'>\n            <img src='./pic/aff_cross.gif' alt='Delete Cleanup' title='Delete' border='0' height='12' width='12' /></a></td>\n          <td align='center'><a href='staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=unlock&amp;cid={$row['clean_id']}&amp;clean_on={$row['clean_on']}'>\n            <img src='./pic/warned.png' alt='On/Off Cleanup' title='on/off' border='0' height='12' width='12' /></a></td>\n<td align='center'><a href='staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=run&amp;cid={$row['clean_id']}'>Run it now</a></td>\n </tr>";
    }
    $htmlout .= "</table>";
    if ($count1 > $perpage) {
        $htmlout .= $pager['pagerbottom'];
    }
    $htmlout .= "<br />\n                <span class='btn'><a href='./staffpanel.php?tool=cleanup_manager&amp;action=cleanup_manager&amp;mode=new'>Add New</a></span>";
    echo stdhead('Cleanup Manager - View') . $htmlout . stdfoot();
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:25,代码来源:cleanup_manager.php

示例3: index

 public function index()
 {
     $table = 'Article';
     $M = M($table);
     $select = $M->table($table . ' a')->field("a.*,t.*")->join("topic t on a.id=t.id")->order('a.id desc');
     $page_size = C('PAGE_SIZE');
     if (array_key_exists('p', $_GET)) {
         $p = $_GET['p'];
     } else {
         $p = 1;
     }
     pager($select, $p, 'Comm:Index:list');
 }
开发者ID:ysking,项目名称:commlib,代码行数:13,代码来源:ListAction.class.php

示例4: display

function display($table, $vyber, $sub, $page, $extended)
{
    if ($_POST["filter_meno"]) {
        $filter_do_meno = sec_input(sec_sql($_POST["filter_do_meno"]));
        $_SESSION["filter_do_meno"] = $filter_do_meno;
    }
    if (!empty($_SESSION["filter_do_meno"])) {
        $where[] = "meno LIKE \"%" . $_SESSION["filter_do_meno"] . "%\"";
    }
    echo "<div class=\"confirm_order\">\r\n        <a href=\"?vyber={$vyber}&sub={$table}&action=insert\">Vložiť novú položku</a>\r\n            </div>";
    if ($table == "dodavatel") {
        $query = "SELECT id, meno, vymaz from {$table} ORDER BY vymaz, meno ASC";
        $th = "<th>Meno</th><th>úpravy</th>";
    }
    if ($table == "do_produkt") {
        echo "<div class=\"main_box_33\">";
        echo "<form method=\"POST\">";
        echo textfield("filter_do_meno", $_SESSION["filter_do_meno"], "Meno", 15, 10);
        echo submit("filter_meno", "Zobraz");
        echo "</form>";
        echo "</div>";
        if (count($where) > 0) {
            $where = "WHERE " . implode(" AND ", $where);
        }
        $query = "SELECT id, meno, email_meno, vymaz from {$table} {$where} ORDER BY vymaz, meno ASC";
        $th = "<th>Meno</th><th>Em@il Meno</th><th>úpravy</th>";
    }
    $pager = pager("{$table}", $page, $vyber . "&sub=" . $sub, $query);
    $page_from = $pager[page_from];
    echo "<div class=\"pager\">Strany: " . implode(" | ", $pager[pages]) . "</div>";
    echo "Počet všetkých položiek: {$pager['num_max']}";
    $query .= " LIMIT {$page_from}";
    echo "<table id=\"nast_material\">";
    echo "<thead>\r\n            <tr>\r\n            {$th}\r\n    </tr>        \r\n    </thead>\r\n    <tbody>";
    $value = sql_query($query);
    //dd($value);
    foreach ($value as $riadok) {
        if ($table == "dodavatel") {
            $td = "<td>{$riadok[meno]}</td>                    \r\n            ";
        }
        if ($table == "do_produkt") {
            $td = "<td>{$riadok[meno]}</td><td>{$riadok[email_meno]}</td>                    \r\n            ";
        }
        echo "<tr" . ($riadok[vymaz] == 1 ? " class=\"vymazane\"" : "") . ">\r\n                {$td}\r\n              <td>\r\n              <a href=\"?vyber={$vyber}&sub={$sub}&action=edit&id={$riadok[id]}&page={$page}\">upraviť</a> | \r\n              <a href=\"?vyber={$vyber}&sub={$sub}&action=delete&id={$riadok[id]}\">\r\n              " . ($riadok[vymaz] == 1 ? "zobraziť" : "vymazať") . "</a> \r\n              <img src=\"assets/images/" . ($riadok[vymaz] == 0 ? "checked" : "unchecked") . ".png\">\r\n              </td></tr>";
    }
    echo "</tbody>\r\n        </table>";
    echo "<div class=\"pager\">Strany: " . implode(" | ", $pager[pages]) . "</div>";
}
开发者ID:jozefvasko,项目名称:kraf-app,代码行数:48,代码来源:nastavenia_do.php

示例5: customers_list

function customers_list($event = '', $step = '', $message = '')
{
    global $statuses, $comments_disabled_after, $step, $txp_user;
    pagetop("Customers", $message);
    extract(get_prefs());
    extract(gpsa(array('page', 'sort', 'dir', 'crit', 'qty', 'search_method')));
    $sesutats = array_flip($statuses);
    $dir = $dir == 'desc' ? 'desc' : 'asc';
    switch ($sort) {
        case 'RealName':
            $sort_sql = 'RealName ' . $dir;
            break;
        case 'orders':
            $sort_sql = 'orders ' . $dir;
            break;
        default:
            $dir = 'desc';
            $sort_sql = 'user_id ' . $dir;
            break;
    }
    $switch_dir = $dir == 'desc' ? 'asc' : 'desc';
    $criteria = "privs = 0";
    if ($search_method and $crit) {
        $crit_escaped = doSlash($crit);
        $critsql = array('id' => "ID = '{$crit_escaped}'", 'title_body' => "Title rlike '{$crit_escaped}' or Body rlike '{$crit_escaped}'", 'section' => "Section rlike '{$crit_escaped}'", 'categories' => "Category1 rlike '{$crit_escaped}' or Category2 rlike '{$crit_escaped}'", 'status' => "Status = '" . @$sesutats[gTxt($crit_escaped)] . "'", 'author' => "AuthorID rlike '{$crit_escaped}'");
        if (array_key_exists($search_method, $critsql)) {
            $criteria = $critsql[$search_method];
            $limit = 500;
        } else {
            $search_method = '';
            $crit = '';
        }
    } else {
        $search_method = '';
        $crit = '';
    }
    $total = safe_count('txp_users', "{$criteria}");
    if (isset($qty)) {
        $customers_list_pageby = $qty;
    } else {
        $customers_list_pageby = 15;
    }
    $limit = max(@$customers_list_pageby, 15);
    list($page, $offset, $numPages) = pager($total, $limit, $page);
    $rs = safe_rows_start('*', 'txp_users', "{$criteria} order by {$sort_sql} limit {$offset}, {$limit}");
    $customersOnPage = $offset + $limit;
    if ($rs) {
        echo n . n . '<form name="longform" method="post" action="index.php" onsubmit="return verify(\'' . gTxt('are_you_sure') . '\')">' . n . startTable('list', '', '', '', '700') . n . tr(n . tda("Displaying {$offset} - {$customersOnPage} of {$total} customers", ' colspan="2" style="border: none; padding-bottom: 15px;"') . n . tda('<a href="?event=customers&step=edit_customer" class="navlink">Add a new customer</a> <a href="?event=customers&step=export_customer" class="navlink">Export customers</a>', ' colspan="2" style="text-align: right; border: none; padding-bottom: 15px;"')) . n . tr(n . column_head('Customer', 'RealName', 'customers', true, $switch_dir, $crit, $search_method) . column_head('Phone', 'shipping_phone', 'customers', true, $switch_dir, $crit, $search_method) . column_head('Email', 'email', 'customers', true, $switch_dir, $crit, $search_method) . column_head('Orders', 'order_num', 'customers', true, $switch_dir, $crit, $search_method));
        include_once txpath . '/publish/taghandlers.php';
        while ($a = nextRow($rs)) {
            extract($a);
            $order_num = safe_count("orders", "user_id = {$user_id}");
            $RealName = eLink('customers', 'edit_customer', 'user_id', $user_id, $RealName);
            $Orders = eLink('order', 'edit', 'customer', $name, $order_num);
            echo n . n . tr(n . td($RealName, "25%") . td($billing_phone, "25%") . td($email, "25%") . td($Orders, "25%"));
        }
        echo n . endTable() . n . '</form>' . n . nav_form('customers', $page, $numPages, $sort, $dir, $crit, $search_method) . n . pageby_form('customers', $customers_list_pageby);
    }
}
开发者ID:duongcuong96,项目名称:textcommerce,代码行数:59,代码来源:tc_core_customers_library.php

示例6: SQL_Query_exec

//TORRENT
if ($type == "torrent") {
    $res = SQL_Query_exec("SELECT id, name FROM torrents WHERE id = {$id}");
    $row = mysql_fetch_array($res);
    if (!$row) {
        show_error_msg(T_("ERROR"), "News id invalid", 0);
        stdfoot();
    }
    echo "<center><b>" . T_("COMMENTSFOR") . "</b> <a href='torrents-details.php?id=" . $row['id'] . "'>" . htmlspecialchars($row['name']) . "</a></center><br />";
}
begin_frame(T_("COMMENTS"));
$subres = SQL_Query_exec("SELECT COUNT(*) FROM comments WHERE {$type} = {$id}");
$subrow = mysql_fetch_array($subres);
$commcount = $subrow[0];
if ($commcount) {
    list($pagertop, $pagerbottom, $limit) = pager(10, $commcount, "comments.php?id={$id}&amp;type={$type}&amp;");
    $commquery = "SELECT comments.id, text, user, comments.added, avatar, signature, username, title, class, uploaded, downloaded, privacy, donated FROM comments LEFT JOIN users ON comments.user = users.id WHERE {$type} = {$id} ORDER BY comments.id {$limit}";
    $commres = SQL_Query_exec($commquery);
} else {
    unset($commres);
}
if ($commcount) {
    print $pagertop;
    commenttable($commres, $type);
    print $pagerbottom;
} else {
    print "<br /><b>" . T_("NOCOMMENTS") . "</b><br />\n";
}
echo "<center>";
echo "<form name=\"comment\" method=\"post\" action=\"comments.php?type={$type}&amp;id={$id}&amp;takecomment=yes\">";
echo textbbcode("comment", "body") . "<br />";
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:31,代码来源:comments.php

示例7: htmlspecialchars

	<!--List Item-->
	<tr>
	<td><?php echo htmlspecialchars(nicedate($log[$n]["date"],true)) ?></td>
	<td><?php echo htmlspecialchars($log[$n]["fullname"])?></td>
	<td><?php 
		echo $lang["collectionlog-" . $log[$n]["type"]] ;
		if ($log[$n]["notes"] != "" ) { 
			##  notes field contains user IDs, collection references and /or standard texts
			##  Translate the standard texts
			$standard = array('#all_users', '#new_resource');
			$translated   = array($lang["all_users"], $lang["new_resource"]);
			$newnotes = str_replace($standard, $translated, $log[$n]["notes"]);
			echo $newnotes;
		}
		?></td>
	<td><?php if ($log[$n]['resource']!=0){?><a onClick="return CentralSpaceLoad(this,true);" href='<?php echo $baseurl_short?>pages/view.php?ref=<?php echo urlencode($log[$n]["resource"]) ?>'><?php echo $log[$n]["resource"]?></a><?php } ?></td>
	<td><?php if ($log[$n]['resource']!=0){?><a onClick="return CentralSpaceLoad(this,true);" href='<?php echo $baseurl_short?>pages/view.php?ref=<?php echo urlencode($log[$n]["resource"]) ?>'><?php echo i18n_get_translated($log[$n]["title"])?></a><?php } ?></td>
	</tr> 
<?php } ?>
</table>
</div> <!-- End of Listview -->

<div class="BottomInpageNav">
<?php pager(false); ?></div>

</div> <!-- End of BasicsBox -->

<?php
include "../include/footer.php";
?>
开发者ID:artsmia,项目名称:mia_resourcespace,代码行数:30,代码来源:collection_log.php

示例8: sqlesc

 if ($s && $w == "name") {
     $where = "WHERE s.name LIKE " . sqlesc("%" . $s . "%");
 } elseif ($s && $w == "imdb") {
     $where = "WHERE s.imdb LIKE " . sqlesc("%" . $s . "%");
 } elseif ($s && $w == "comment") {
     $where = "WHERE s.comment LIKE " . sqlesc("%" . $s . "%");
 } else {
     $where = "";
 }
 $link = $s && $w ? "s={$s}&amp;w={$w}&amp;" : "";
 $count = get_row_count("subtitles AS s", "{$where}");
 if ($count == 0 && !$s && !$w) {
     stdmsg("", "There is no subtitle, go <a href=\"subtitles.php?mode=upload\">here</a> and start uploading.", false);
 }
 $perpage = 5;
 $pager = pager($perpage, $count, "subtitles.php?" . $link);
 $res = sql_query("SELECT s.id, s.name,s.lang, s.imdb,s.fps,s.poster,s.cds,s.hits,s.added,s.owner,s.comment, u.username FROM subtitles AS s LEFT JOIN users AS u ON s.owner=u.id {$where} ORDER BY s.added DESC {$pager['limit']}") or sqlerr(__FILE__, __LINE__);
 $HTMLOUT .= "<table width='700' cellpadding='5' cellspacing='0' border='0' align='center' style='font-weight:bold'>\n<tr><td style='border:none' valign='middle'>\n<fieldset style='text-align:center; border:#0066CC solid 1px; background-color:#999999'>\n<legend style='text-align:center; border:#0066CC solid 1px ; background-color:#999999;font-size:13px;'><b>Search</b></legend>\n<form action='subtitles.php' method='get'>\n<input size='50' value='" . $s . "' name='s' type='text' />\n<select name='w'>\n<option value='name' " . ($w == "name" ? "selected='selected'" : "") . ">Name</option>\n<option value='imdb' " . ($w == "imdb" ? "selected='selected'" : "") . ">IMDb</option>\n<option value='comment' " . ($w == "comment" ? "selected='selected'" : "") . ">Comments</option>\n</select>\n<input type='submit' value='Search' />&nbsp;<input type='button' onclick=\"window.location.href='subtitles.php?mode=upload'\" value='Upload' />\n</form></fieldset></td></tr>";
 if ($s) {
     $HTMLOUT .= "<tr><td style='border:none;'>Search result for <i>'{$s}'</i><br />" . (mysqli_num_rows($res) == 0 ? "Nothing found! Try again with a refined search string." : "") . "</td></tr>";
 }
 $HTMLOUT .= "\n</table>\n<br />";
 if (mysqli_num_rows($res) > 0) {
     if ($count > $perpage) {
         $HTMLOUT .= "<div align=\"left\" style=\"padding:5px\">{$pager['pagertop']}</div>";
     }
     $HTMLOUT .= "<table width='700' cellpadding='5' cellspacing='0' border='1' align='center' style='font-weight:bold'>\n<tr><td class='colhead' align='center'>Lang</td>\n<td class='colhead' align='left' style='width:80%'>Name</td>\n<td class='colhead' align='center'>IMDb</td>\n<td class='colhead' align='center'>Added</td>\n<td class='colhead' align='center'>Hits</td>\n<td class='colhead' align='center'>FPS</td>\n<td class='colhead' align='center'>CD#</td>";
     while ($arr = mysqli_fetch_assoc($res)) {
         if ($arr["owner"] == $CURUSER["id"] || $CURUSER['class'] > UC_MODERATOR) {
             $HTMLOUT .= "<td class='colhead' align='center'>Tools</td>";
         }
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:31,代码来源:subtitles.php

示例9: site_url

?>
</h1>

	<div class="pull-right">
		<a class="btn btn-primary" href="<?php 
echo site_url('import/form');
?>
"><i class="icon-plus icon-white"></i> <?php 
echo lang('new');
?>
</a>
	</div>
	
	<div class="pull-right">
		<?php 
echo pager(site_url('import/index'), 'mdl_import');
?>
	</div>

</div>

<?php 
echo $this->layout->load_view('layout/alerts');
?>

<table class="table table-striped">

	<thead>
		<tr>
            <th><?php 
echo lang('id');
开发者ID:rumahkecil,项目名称:fusioninvoice-1,代码行数:31,代码来源:index.php

示例10: list

    } else {
        $admintpl->set("poll_delete", false, true);
    }
    $admintpl->set("show_poller", false, true);
    $admintpl->set("new_poll", true, true);
    $admintpl->set("polls", $polls);
    $admintpl->set("new_polls", $newpolls);
}
/***
* Show poll voters
***/
if (isset($votes) && !isset($_POST['new']) && empty($id)) {
    //Per Page Listing Limitation Start - 7:29 PM 3/22/2007
    $count = $voters;
    $perpage = $GLOBALS["votesppage"];
    list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=poller&amp;votes=" . $votes . "&amp;voters=" . $voters . "&amp;" . $addparams);
    //Per Page Listing Limitation Stop
    //mysql query to select all information on polls in the database
    $resource = do_sqlquery("SELECT pv.*, username, prefixcolor, suffixcolor, optionText, defaultChecked FROM {$TABLE_PREFIX}poller_vote pv LEFT JOIN {$TABLE_PREFIX}users u ON pv.memberID=u.id LEFT JOIN {$TABLE_PREFIX}users_level ul on u.id_level=ul.id_level LEFT JOIN {$TABLE_PREFIX}poller_option po on pv.optionID=po.ID WHERE pv.pollerID='" . $votes . "' GROUP BY pv.voteDate " . $limit . "", true);
    //die("SELECT pv.*, username, prefixcolor, suffixcolor, optionText, defaultChecked FROM {$TABLE_PREFIX}poller_vote pv LEFT JOIN {$TABLE_PREFIX}users u ON pv.memberID=u.id LEFT JOIN {$TABLE_PREFIX}users_level ul on u.id_level=ul.id_level LEFT JOIN {$TABLE_PREFIX}poller_option po on pv.optionID=po.ID WHERE pv.pollerID='".$votes."' GROUP BY pv.voteDate ".$limit."");
    $block_title = $language["POLLING_SYSTEM"] . " - " . $language["POLL_VOTERS"];
    //Per Page Listing Limitation Start - 7:35 PM 3/22/2007
    if ($count > $perpage) {
        $admintpl->set("poll_pager_top", $pagertop);
    } else {
        $admintpl->set("poll_pager_top", "");
    }
    //Per Page Listing Limitation Stop
    $i = 0;
    while ($results = mysqli_fetch_assoc($resource)) {
        //background color for checked poll option
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:admin.polls.php

示例11: class_check

    $HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\r\n\t\t<head>\r\n\t\t<title>Error!</title>\r\n\t\t</head>\r\n\t\t<body>\r\n\t<div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>\r\n\t</body></html>";
    echo $HTMLOUT;
    exit;
}
require_once INCL_DIR . 'user_functions.php';
require_once INCL_DIR . 'pager_functions.php';
require_once INCL_DIR . 'html_functions.php';
require_once INCL_DIR . 'bbcode_functions.php';
require_once CLASS_DIR . 'class_check.php';
class_check(UC_STAFF);
$lang = array_merge($lang);
$HTMLOUT = '';
// //////////////////////
$count1 = get_row_count('shoutbox');
$perpage = 15;
$pager = pager($perpage, $count1, 'staffpanel.php?tool=shistory&amp;action=shistory&amp;');
$res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC " . $pager['limit'] . "") or sqlerr(__FILE__, __LINE__);
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagertop'];
}
$HTMLOUT .= begin_main_frame();
if (mysql_num_rows($res) == 0) {
    $HTMLOUT .= "No shouts here";
} else {
    $HTMLOUT .= "<table align='center' border='0' cellspacing='0' cellpadding='2' width='100%' class='small'>\n";
    while ($arr = mysql_fetch_assoc($res)) {
        if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) {
            continue;
        }
        if ($arr['to_user'] == $CURUSER['id'] || $arr['userid'] == $CURUSER['id'] && $arr['to_user'] != 0) {
            $private = "<img src='{$INSTALLER09['pic_base_url']}private-shout.png' alt='Private shout' title='Private shout!' width='16' style='padding-left:2px;padding-right:2px;' border='0' />";
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:31,代码来源:shistory.php

示例12: get_pager_from

      <thead>
        <tr>
          <th>Message</th>
          <th>Added</th>
          <th>User</th>
          <th>IP</th>
          <th>Trace</th>
          <th>User agent</th>
        </tr>
      </thead>
      <tbody>
    ';
$from = get_pager_from($_GET);
$num_exceptions = db_count_num('exceptions');
$results_per_page = 30;
pager(CONFIG_SITE_ADMIN_URL . 'list_exceptions/', $num_exceptions, $results_per_page, $from);
$exceptions = db_query_fetch_all('
    SELECT
       e.id,
       e.message,
       e.added,
       e.added_by,
       e.trace,
       INET_NTOA(e.user_ip) AS user_ip,
       e.user_agent,
       u.team_name
    FROM exceptions AS e
    LEFT JOIN users AS u ON u.id = e.added_by
    ORDER BY e.id DESC
    LIMIT ' . $from . ', ' . $results_per_page);
foreach ($exceptions as $exception) {
开发者ID:jpnelson,项目名称:mellivora,代码行数:31,代码来源:list_exceptions.php

示例13: site_url

</h1>

    <div class="pull-right">
        <a class="btn btn-sm btn-primary" href="<?php 
echo site_url('custom_fields/form');
?>
">
            <i class="fa fa-plus"></i> <?php 
echo lang('new');
?>
        </a>
    </div>

    <div class="pull-right">
        <?php 
echo pager(site_url('custom_fields/index'), 'mdl_custom_fields');
?>
    </div>

</div>

<div id="content table-content">

    <?php 
echo $this->layout->load_view('layout/alerts');
?>

    <table class="table table-striped">

        <thead>
        <tr>
开发者ID:quantumsized,项目名称:InvoicePlane,代码行数:31,代码来源:index.php

示例14: class_check

require_once CLASS_DIR . 'class_check.php';
class_check(UC_SYSOP);
$lang = array_merge($lang);
$HTMLOUT = $where = '';
$search = isset($_POST['search']) ? strip_tags($_POST['search']) : '';
if (!empty($search)) {
    $where = "WHERE txt LIKE " . sqlesc("%{$search}%") . "";
}
//== Delete items older than 1 month
$secs = 30 * 86400;
sql_query("DELETE FROM infolog WHERE " . time() . " - added > {$secs}") or sqlerr(__FILE__, __LINE__);
$res = sql_query("SELECT COUNT(*) FROM infolog {$where}");
$row = mysql_fetch_array($res);
$count = $row[0];
$perpage = 15;
$pager = pager($perpage, $count, "staffpanel.php?tool=sysoplog&amp;action=sysoplog&amp;");
$HTMLOUT = '';
$res = sql_query("SELECT added, txt FROM infolog {$where} ORDER BY added DESC {$pager['limit']}") or sqlerr(__FILE__, __LINE__);
$HTMLOUT .= "<h1>Staff actions log</h1>";
$HTMLOUT .= "<table border='1' cellspacing='0' width='115' cellpadding='5'>\n\r\n             <tr>\r\n\t\t\t <td class='tabletitle' align='left'>Search Log</td>\n\r\n\t\t\t </tr>\r\n             <tr>\r\n\t\t\t <td class='table' align='left'>\n\r\n\t\t\t <form method='post' action='staffpanel.php?tool=sysoplog&amp;action=sysoplog'>\n\r\n\t\t\t <input type='text' name='search' size='40' value='' />\n\r\n\t\t\t <input type='submit' value='Search' style='height: 20px' />\n\r\n\t\t\t </form></td></tr></table>";
if ($count > $perpage) {
    $HTMLOUT .= $pager['pagertop'];
}
if (mysql_num_rows($res) == 0) {
    $HTMLOUT .= "<b>No records found</b>";
} else {
    $HTMLOUT .= "<table border='1' cellspacing='0' cellpadding='5'>\r\n      <tr>\r\n        <td class='colhead' align='left'>Date</td>\r\n        <td class='colhead' align='left'>Time</td>\r\n        <td class='colhead' align='left'>Event</td>\r\n      </tr>";
    while ($arr = mysql_fetch_assoc($res)) {
        $color = '#FF4763';
        if (strpos($arr['txt'], 'Warned')) {
            $color = "#FF0000";
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:31,代码来源:sysoplog.php

示例15: mysql_result

$totalrows = mysql_result($res, 0, 0);
$loop = array();
if (!empty($totalrows)) {
    if ($o >= $totalrows) {
        $o = $totalrows - $r;
        $o = $o >= 0 ? $o : 0;
    }
    $query = "SELECT * FROM {$from} WHERE {$where} ORDER BY `news_id` DESC LIMIT {$o},{$r}";
    if (!($res = @mysql_query($query))) {
        trigger_error(mysql_error(), E_USER_ERROR);
    }
    while ($rsrow = mysql_fetch_assoc($res)) {
        $rsrow['news_title'] = sanitize_and_format($rsrow['news_title'], TYPE_STRING, $__field2format[TEXT_DB2DISPLAY]);
        $loop[] = $rsrow;
    }
    $output['pager2'] = pager($totalrows, $o, $r);
}
$output['return2me'] = 'site_news.php';
if (!empty($_SERVER['QUERY_STRING'])) {
    $output['return2me'] .= '?' . $_SERVER['QUERY_STRING'];
}
$output['return2me'] = rawurlencode($output['return2me']);
$tpl->set_file('content', 'site_news.html');
$tpl->set_loop('loop', $loop);
$tpl->set_var('output', $output);
$tpl->process('content', 'content', TPL_LOOP | TPL_NOLOOP);
$tpl->drop_loop('loop');
$tpl->drop_var('output.pager2');
unset($loop);
$tplvars['title'] = 'Site news';
$tplvars['page'] = 'site_news';
开发者ID:babae,项目名称:etano,代码行数:31,代码来源:site_news.php


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