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


PHP Pager::queryRows方法代码示例

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


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

示例1: intval

        $type = -1;
        if ($_GET['type'] == '') {
            $type = -1;
        } else {
            $type = intval($_GET['type']);
        }
        if ($type > -1) {
            $cond .= " and type={$type}";
        }
        if (in_array($orderby, array('id', 'posttime', 'hits'))) {
            $orderbystr = $orderby . ' desc';
        }
        $curPage = intval($_GET["page"]);
        $pager = new Pager();
        $pager->init(20, $curPage, "admin.php?inc=article&action=list&k={$keyword}&channelid={$channelid}&orderby={$orderby}&page={page}");
        $rows = $pager->queryRows($db, "articles", $cond, "*", $orderbystr);
        $recstr = _LANG($_AL['all.totalrecords'], array($pager->recordNum));
        echo <<<EOT
\t<div class="div_clear" style="height:10px;"></div>
\t<div class="tips_1">
{$_AL['all.keyword']}: <input class="text_css" type="text" size="20" value="{$keyword}" id="keyword" />
<select id="orderby"><option value="id">{$_AL['all.orderby']}</option><option value="posttime">{$_AL['all.posttime']}</option><option value="hits">{$_AL['all.hits']}</option></select>
<input class="button_css" type="button" value="  {$_AL['all.search']}  " onclick="searcharticle()" />
&nbsp;&nbsp;&nbsp;{$recstr}</div>
\t<table class="table_1" width="100%">
\t\t<tr><td class="td_6"><a class="td_5_1a" href="admin.php?inc=article&action=add&channelid={$channelid}"><img src="images/ico_add.gif" border="0" /> {$_AL['article.add']}</a></td></tr>
\t</table>

EOT;
        echo "<form id=\"articlesform\" onsubmit=\"return false;\">";
        echo "<table class=\"table_1\" width=\"100%\">";
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:article.php

示例2: intval

            continue;
        }
        $secmenu .= "<li class='big'><a href=\"" . $webcore->genNavLink($tmpchannel) . "\">{$tmpchannel['title']}</a></li>";
    }
} else {
    $par_channel = $channel;
}
$msgkey = $_GET['msgkey'];
$curPage = intval($_GET["page"]);
$condition = "langid={$_SYS['langid']} and state=1";
$condition .= empty($msgkey) ? "" : " and (name like '%{$msgkey}%' or title like '%{$msgkey}%' or remark like '%{$msgkey}%' or reply like '%{$msgkey}%')";
$orderstr = "id desc";
$pagerlink = $webcore->genUrl("msg.php?page={page}" . (empty($msgkey) ? "" : "&msgkey={$msgkey}"));
$pager = new Pager();
$pager->init(intval($cache_settings['perpagemsg']), $curPage, $pagerlink);
$msgs = $pager->queryRows($db, "msgs", $condition, "*", $orderstr);
$index = 0;
foreach ($msgs as $key => $msg) {
    $msg['mod'] = ++$index % 2;
    $msg['name'] = htmlFilter($msg['name']);
    $msg['email'] = htmlFilter($msg['email']);
    $msg['contact1'] = htmlFilter($msg['contact1']);
    $msg['title'] = htmlFilter($msg['title']);
    $msg['remark'] = nl2br(htmlFilter($msg['remark']));
    $msg['posttime'] = getDateStr($msg['posttime']);
    $msg['replytime'] = getDateStr($msg['replytime']);
    $msgs[$key] = $msg;
}
$_SYS['positionchannel'] = " » <a href=" . $webcore->genUrl("msg.php") . ">{$channel['title']}</a>";
$msgkey = empty($msgkey) ? $_LANG['header.search'] : htmlFilter($msgkey);
require_once './header.php';
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:msg.php

示例3: trim

foreach ($cache_channels as $cache_prochannel) {
    if ($cache_prochannel['systemtype'] == '1') {
        break;
    }
}
$k = trim($_GET['k']);
$curPage = intval($_GET["page"]);
$cid = intval($_GET["cid"]);
$pagerlink = $webcore->genUrl("productlist.php?cid={$cid}&page={page}" . (empty($k) ? "" : "&k={$k}"));
$condition = "langid={$_SYS['langid']}";
$condition .= empty($k) ? "" : " and name like '%{$k}%'";
$condition .= empty($cid) ? "" : " and cid in (select id from {$db->pre}procates where id={$cid} or pid={$cid})";
$orderstr = "ordernum,id desc";
$pager = new Pager();
$pager->init(intval($cache_settings['perpagepro']), $curPage, $pagerlink);
$products = $pager->queryRows($db, "products", $condition, "id,cid,type,hits,posttime,alias,name,price1,picids,picpaths", $orderstr);
foreach ($products as $key => $product) {
    $product['link'] = $webcore->genUrl("product.php?id={$product['id']}");
    $product['name'] = htmlFilter($product['name']);
    $product['price1'] = number_format($product['price1'], 2);
    $protmppic = $webcore->getPics($product['picids'], $product['picpaths'], 0, true, true);
    $product['picpath'] = $protmppic['picpath'];
    $products[$key] = $product;
}
unset($protmppic);
if (!empty($cid)) {
    $procate = $cache_procates[$cid];
    empty($procate) && $webcore->checkViewLang('productlist', $cid);
    $headtitle = empty($procate['seotitle']) ? strip_tags($procate['title']) : strip_tags(str_replace(array("\r", "\n"), array('', ''), $procate['seotitle']));
    $headkeywords = empty($procate['metakeywords']) ? $headtitle : strip_tags(str_replace(array("\r", "\n"), array('', ''), $procate['metakeywords']));
    $headdesc = empty($procate['metadesc']) ? $headtitle : strip_tags(str_replace(array("\r", "\n"), array('', ''), $procate['metadesc']));
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:productlist.php

示例4: intval

}
$curPage = intval($_GET["page"]);
$folderid = intval($_GET["folderid"]);
if ($folderid > 0) {
    setCookies("lastfolderid", $folderid);
} else {
    $folderid = intval(getCookies("lastfolderid"));
}
//preview
setCookies("lastfoldertype", 2);
$pagerlink = "files.php?page={page}&folderid={$folderid}";
$condition = "folderid={$folderid}";
$orderstr = "id desc";
$pager = new Pager();
$pager->init(10, $curPage, $pagerlink);
$attachements = $pager->queryRows($db, "attachments", $condition, "*", $orderstr);
foreach ($attachements as $key => $att) {
    $att['shortfilename'] = htmlFilter(cutStr($att['filename'], 12));
    $att['filename'] = htmlFilter($att['filename']);
    $att['uploadtime'] = getDateStr($att['uploadtime']);
    $attachements[$key] = $att;
}
$folderrow = $cache_folders[$folderid];
$folderrow['title'] = htmlFilter($folderrow['title']);
print <<<EOT
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>IMAGE</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/default.css" rel="stylesheet" type="text/css" />
开发者ID:JackyMamba,项目名称:SimpleEOW,代码行数:31,代码来源:files.php

示例5: intval

        $type = -1;
        if ($_GET['type'] == '') {
            $type = -1;
        } else {
            $type = intval($_GET['type']);
        }
        if ($type > -1) {
            $cond .= " and type={$type}";
        }
        if (in_array($orderby, array('ordernum,id', 'posttime', 'hits', 'price1', 'level'))) {
            $orderbystr = $orderby . ' desc';
        }
        $curPage = intval($_GET["page"]);
        $pager = new Pager();
        $pager->init(15, $curPage, "admin.php?inc=products&action=list&k={$keyword}&cid={$cid}&type={$type}&orderby={$orderby}&page={page}");
        $rows = $pager->queryRows($db, "products", $cond, "*", $orderbystr);
        $recstr = _LANG($_AL['all.totalrecords'], array($pager->recordNum));
        echo <<<EOT
\t<div class="div_clear" style="height:10px;"></div>
\t<div class="tips_1">
<select id="cid"><option value="0">{$_AL['products.choosecate']}</option>{$cache_procates_option}</select>
{$_AL['all.keyword']}: <input class="text_css" type="text" size="20" value="{$keyword}" id="keyword" />
<select id="orderby"><option value="ordernum,id">{$_AL['all.orderby']}</option><option value="posttime">{$_AL['all.posttime']}</option><option value="hits">{$_AL['all.hits']}</option><option value="price1">{$_AL['products.price']}</option><option value="level">{$_AL['products.level']}</option></select>
<select id="type"><option value="-1">{$_AL['all.property']}</option><option value="1">{$_AL['products.types'][1]}</option><option value="2">{$_AL['products.types'][2]}</option></select>
<input class="button_css" type="button" value="  {$_AL['all.search']}  " onclick="searchproducts()" />
&nbsp;&nbsp;&nbsp;{$recstr}</div>
\t<table class="table_1" width="100%">
\t\t<tr><td class="td_6"><a class="td_5_1a" href="admin.php?inc=products&action=add"><img src="images/ico_add.gif" border="0" /> {$_AL['products.add']}</a></td></tr>
\t</table>

EOT;
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:products.php

示例6: foreach

    $par_channel = $cache_channels[$channel['pid']];
    foreach ($cache_channels[$channel['pid']]['childcid'] as $childcid) {
        $tmpchannel = $cache_channels[$childcid];
        if ($tmpchannel['ishidden'] == '1') {
            continue;
        }
        $secmenu .= "<li class='big'><a href=\"" . $webcore->genNavLink($tmpchannel) . "\">{$tmpchannel['title']}</a></li>";
    }
} else {
    $par_channel = $channel;
}
$condition = empty($channelid) ? "" : "channelid={$channelid}";
$orderstr = "id desc";
$curPage = intval($_GET["page"]);
$pagerlink = "articlelist.php?cid={$channelid}";
$pagerlink .= "&page={page}";
$pagerlink = $webcore->genUrl($pagerlink);
$pager = new Pager();
$pager->init(intval($cache_settings['perpageart']), $curPage, $pagerlink);
$articles = $pager->queryRows($db, "articles", $condition, "*", $orderstr);
foreach ($articles as $key => $article) {
    $article['link'] = $webcore->genUrl("view.php?id={$article['id']}");
    $article['title'] = htmlFilter($article['title']);
    $article['picpath'] = $webcore->getPicPath($article['picpath'], true, true);
    $article['posttime'] = getDateStr($article['posttime'], false, 0);
    $articles[$key] = $article;
}
$_SYS['positionchannel'] = " » <a href=" . $webcore->genUrl("articlelist.php?cid={$channel['id']}") . ">{$channel['title']}</a>";
require_once './header.php';
require_once getTemplatePath('articlelist.htm');
footer();
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:articlelist.php

示例7: array

\t<table class="settop"><tr><td class="settop_left"><img src="../language/{$cache_langs[$_SYS['alangid']]['directory']}/flag.gif" title="{$effect_lang}" /></td><td><div id="smalltab_container"></div></td></tr></table>
\t<div class="smalltab_line"></div>
\t<div id="t1">
EOT;
        $dwidth = array(0, 35, 200, 300, 100, 150, 60, 80, 150);
        $cond = "langid={$_SYS['alangid']}";
        $keyword = trim($_GET['k']);
        $orderbystr = 'ordernum,id desc';
        $keyword = str_replace("*", "%", $keyword);
        if (!empty($keyword)) {
            $cond .= " and (title like '%{$keyword}%' or  content like '%{$keyword}%')";
        }
        $curPage = intval($_GET["page"]);
        $pager = new Pager();
        $pager->init(15, $curPage, "admin.php?inc=vote&action=list&k={$keyword}&page={page}");
        $rows = $pager->queryRows($db, "votes", $cond, "*", $orderbystr);
        $recstr = _LANG($_AL['all.totalrecords'], array($pager->recordNum));
        echo <<<EOT
\t<div class="div_clear" style="height:10px;"></div>
\t<div class="tips_1">
{$_AL['all.keyword']}: <input class="text_css" type="text" size="20" value="{$keyword}" id="keyword" />
<input class="button_css" type="button" value="  {$_AL['all.search']}  " onclick="searchvotes()" />
&nbsp;&nbsp;&nbsp;{$recstr}</div>
\t<table class="table_1" width="100%">
\t\t<tr><td class="td_6"><a class="td_5_1a" href="admin.php?inc=vote&action=add"><img src="images/ico_add.gif" border="0" /> {$_AL['vote.add']}</a></td></tr>
\t</table>

EOT;
        echo "<form id=\"votesform\" onsubmit=\"return false;\">";
        echo "<table class=\"table_1\" width=\"100%\">";
        echo "<tr style=\"font-weight:bold;color:#333333;\"><td class=\"row_0\">" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[6]}px;\">{$_AL['vote.order']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[2]}px;\">{$_AL['vote.subject']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[3]}px;\">{$_AL['vote.allowvotetime']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[4]}px;\">{$_AL['vote.totalnum']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[5]}px;\">{$_AL['all.control']}</div>" . "";
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:vote.php

示例8: array

\t<table class="settop"><tr><td class="settop_left"><img src="../language/{$cache_langs[$_SYS['alangid']]['directory']}/flag.gif" title="{$effect_lang}" /></td><td><div id="smalltab_container"></div></td></tr></table>
\t<div class="smalltab_line"></div>
\t<div id="t1"></div>
\t<div id="t2">
EOT;
        $dwidth = array(0, 35, 300, 300, 100, 130, 80, 80, 150);
        $cond = "langid={$_SYS['alangid']}";
        $keyword = $_GET['k'];
        $keyword = str_replace("*", "%", $keyword);
        if (!empty($keyword)) {
            $cond .= " and (tkey like '%{$keyword}%' or  tvalue like '%{$keyword}%')";
        }
        $curPage = intval($_GET["page"]);
        $pager = new Pager();
        $pager->init(10, $curPage, "admin.php?inc=template&action=varlist&k={$keyword}&page={page}");
        $rows = $pager->queryRows($db, "templatevars", $cond, "*", "tkey");
        echo <<<EOT
\t<div class="div_clear" style="height:10px;"></div>
\t<div class="tips_1">
{$_AL['all.keyword']}: <input class="text_css" type="text" size="20" value="{$keyword}" id="keyword" />
<input class="button_css" type="button" value="  {$_AL['all.search']}  " onclick="searchvar()" />
</div>
\t<table class="table_1" width="100%">
\t\t<tr><td class="td_6"><a class="td_5_1a" href="admin.php?inc=template&action=addvar"><img src="images/ico_add.gif" border="0" /> {$_AL['template.addvar']}</a></td></tr>
\t</table>

EOT;
        echo "<form id=\"varform\" onsubmit=\"return false;\">";
        echo "<table class=\"table_1\" width=\"100%\">";
        echo "<tr style=\"font-weight:bold;color:#333333;\"><td class=\"row_0\">" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[1]}px;\">{$_AL['all.select']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[2]}px;\">{$_AL['template.varname']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[3]}px;\">{$_AL['template.vardesc']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[4]}px;\">{$_AL['all.control']}</div>" . "";
        for ($i = 0; $i < count($rows); $i++) {
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:template.php

示例9: array

\t<div class="smalltab_line"></div>
\t<div id="t1">
EOT;
        $dwidth = array(0, 35, 190, 130, 160, 160, 130, 100);
        $membername = $_GET['membername'];
        $cond .= empty($membername) ? "" : "membername like '%{$membername}%'";
        $orderby = $_GET['orderby'];
        $orderby = empty($orderby) ? "id" : $orderby;
        $orderbystr = '';
        if (in_array($orderby, array('id', 'signuptime', 'logintime'))) {
            $orderbystr = $orderby . ' desc';
        }
        $curPage = intval($_GET["page"]);
        $pager = new Pager();
        $pager->init(10, $curPage, "admin.php?inc=member&action=search&membername={$membername}&orderby={$orderby}&page={page}");
        $rows = $pager->queryRows($db, "members", $cond, "*", $orderbystr);
        $recstr = _LANG($_AL['all.totalrecords'], array($pager->recordNum));
        echo <<<EOT
\t<div class="div_clear" style="height:10px;"></div>
\t<div class="tips_1">
\t{$_AL['all.keyword']}: <input class="text_css" type="text" size="20" value="{$membername}" id="membername" /> <select id="orderby"><option value="id">{$_AL['all.orderby']}</option><option value="signuptime">{$_AL['member.signuptime']}</option><option value="logintime">{$_AL['member.lastlogin.time']}</option></select> <input class="button_css" type="button" value="  {$_AL['all.search']}  " onclick="searchmember()" />&nbsp;&nbsp;&nbsp;{$recstr}</div>
EOT;
        echo "<form id=\"membersform\" onsubmit=\"return false;\">";
        echo "<table class=\"table_1\" width=\"100%\">";
        echo "<tr style=\"font-weight:bold;color:#333333;\"><td class=\"row_0\"><div class=\"rowdiv_0\" style=\"width:{$dwidth[1]}px;\"><span class=\"warning\">{$_AL['all.delete']}</span></div><div class=\"rowdiv_0\" style=\"width:{$dwidth[2]}px;\">{$_AL['member.name']}/{$_AL['member.email']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[3]}px;\">{$_AL['member.realname']}/{$_AL['member.phone']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[4]}px;\">{$_AL['member.qq']}/{$_AL['member.msn']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[5]}px;\">{$_AL['member.signuptime']}/{$_AL['member.lastlogin.time']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[6]}px;\">{$_AL['member.signupip']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[7]}px;\">{$_AL['all.control']}</div></td></tr>";
        for ($i = 0; $i < count($rows); $i++) {
            $row = $rows[$i];
            $row['signuptime'] = getDateStr($row['signuptime']);
            $row['logintime'] = empty($row['logintime']) ? '--' : getDateStr($row['logintime']);
            $row['membername'] = htmlFilter($row['membername']);
            $row['realname'] = empty($row['realname']) ? '--' : htmlFilter($row['realname']);
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:member.php

示例10: intval

        $type = -1;
        if ($_GET['type'] == '') {
            $type = -1;
        } else {
            $type = intval($_GET['type']);
        }
        if ($type > -1) {
            $cond .= " and type={$type}";
        }
        if (in_array($orderby, array('ordernum,id', 'posttime', 'hits', 'price1', 'level'))) {
            $orderbystr = $orderby . ' desc';
        }
        $curPage = intval($_GET["page"]);
        $pager = new Pager();
        $pager->init(15, $curPage, "admin.php?inc=picture&action=list&k={$keyword}&cid={$cid}&type={$type}&orderby={$orderby}&page={page}");
        $rows = $pager->queryRows($db, "picture", $cond, "*", $orderbystr);
        $recstr = _LANG($_AL['all.totalrecords'], array($pager->recordNum));
        echo <<<EOT
\t<div class="div_clear" style="height:10px;"></div>
\t<div class="tips_1">
<select id="cid"><option value="0">{$_AL['picture.choosecate']}</option>{$cache_procates_option}</select>
{$_AL['all.keyword']}: <input class="text_css" type="text" size="20" value="{$keyword}" id="keyword" />
<select id="orderby"><option value="ordernum,id">{$_AL['all.orderby']}</option><option value="posttime">{$_AL['all.posttime']}</option><option value="hits">{$_AL['all.hits']}</option><option value="price1">{$_AL['picture.price']}</option><option value="level">{$_AL['picture.level']}</option></select>
<select id="type"><option value="-1">{$_AL['all.property']}</option><option value="1">{$_AL['picture.types'][1]}</option><option value="2">{$_AL['picture.types'][2]}</option></select>
<input class="button_css" type="button" value="  {$_AL['all.search']}  " onclick="searchpicture()" />
&nbsp;&nbsp;&nbsp;{$recstr}</div>
\t<table class="table_1" width="100%">
\t\t<tr><td class="td_6"><a class="td_5_1a" href="admin.php?inc=picture&action=add"><img src="images/ico_add.gif" border="0" /> {$_AL['picture.add']}</a></td></tr>
\t</table>

EOT;
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:picture.php

示例11: array

        /************************************** manager/search BEGIN ************************************************/
    /************************************** adduser END ************************************************/
    /************************************** manager/search BEGIN ************************************************/
    case "manager":
        require_once './../inc/pager.php';
        echo <<<EOT
\t<div id="smalltab_container"></div>
\t<div class="smalltab_line"></div>
\t<div id="t1">
EOT;
        $dwidth = array(0, 35, 120, 100, 140, 160, 160, 150);
        $curPage = intval($_GET["page"]);
        $pager = new Pager();
        $cond = "ishidden=0";
        $pager->init(10, $curPage, "admin.php?inc=user&action=search&username={$username}&userid={$userid}&groupid={$groupid}&page={page}");
        $rows = $pager->queryRows($db, "users", $cond, "*", "id desc");
        echo <<<EOT
\t<div class="div_clear" style="height:10px;"></div>
EOT;
        echo "<form id=\"usersform\" onsubmit=\"return false;\">";
        echo "<table class=\"table_1\" width=\"100%\">";
        echo "<tr style=\"font-weight:bold;color:#333333;\"><td class=\"row_0\"><div class=\"rowdiv_0\" style=\"width:{$dwidth[1]}px;\"><span class=\"warning\">{$_AL['all.delete']}</span></div><div class=\"rowdiv_0\" style=\"width:{$dwidth[2]}px;\">{$_AL['user.username']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[3]}px;\">{$_AL['user.realname']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[4]}px;\">{$_AL['user.lastip']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[5]}px;\">{$_AL['user.lastlogin']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[6]}px;\">{$_AL['user.addtime']}</div><div class=\"rowdiv_0\" style=\"width:{$dwidth[7]}px;\">{$_AL['all.control']}</div></td></tr>";
        for ($i = 0; $i < count($rows); $i++) {
            $row = $rows[$i];
            $row['lastip'] = empty($row['lastip']) ? '--' : $row['lastip'];
            $row['lasttime'] = empty($row['lasttime']) ? '--' : getDateStr($row['lasttime']);
            $row['addtime'] = empty($row['addtime']) ? '--' : getDateStr($row['addtime']);
            $row['username'] = htmlFilter($row['username']);
            $row['realname'] = htmlFilter($row['realname']);
            $checkboxstr = '';
            if ($row['id'] == $lg['userid']) {
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:user.php

示例12: Pager

        $pager = new Pager();
        $countrow = $db->row_select_one("orders", $cond, "count(1) as total");
        $pager->init(10, $curPage, "admin.php?inc=order&action=list&k={$keyword}&state={$state}&orderby={$orderby}&page={page}");
        /*
        $rows = $pager->queryRowsBySQL($db,"
        SELECT * FROM `{$db->pre}orders` OT,
        (SELECT orderid,
        GROUP_CONCAT(proid ORDER BY id DESC SEPARATOR '{$SPRT}') as proids, 
        GROUP_CONCAT(price ORDER BY id DESC SEPARATOR '{$SPRT}') as prices,
        GROUP_CONCAT(proname ORDER BY id DESC SEPARATOR '{$SPRT}') as pronames,
        GROUP_CONCAT(pronum ORDER BY id DESC SEPARATOR '{$SPRT}') as pronums 
        FROM `{$db->pre}orderdetails` WHERE langid={$_SYS['alangid']} GROUP BY orderid) ODT
        WHERE {$cond} AND OT.id=ODT.orderid ORDER BY {$orderbystr}",$countrow['total']);
        $recstr=_LANG($_AL['all.totalrecords'], array($pager->recordNum));
        */
        $rows = $pager->queryRows($db, "orders", "{$cond} AND langid={$_SYS['alangid']}", "*", "{$orderbystr}");
        echo <<<EOT
\t<div class="div_clear" style="height:10px;"></div>
\t<div class="tips_1">
{$_AL['all.keyword']}: <input class="text_css" type="text" size="20" value="{$keyword}" id="keyword" />
<select id="state"><option value="-1">{$_AL['all.state']}</option>{$options}</select> <select id="orderby"><option value="id">{$_AL['all.orderby']}</option><option value="createtime">{$_AL['order.createtime']}</option><option value="total">{$_AL['order.total.noexp']}</option></select>
<input class="button_css" type="button" value="  {$_AL['all.search']}  " onclick="searchorders()" />
&nbsp;&nbsp;&nbsp;{$recstr}</div>

EOT;
        echo "<form id=\"ordersform\" onsubmit=\"return false;\">";
        echo "<table class=\"table_1\" width=\"100%\">";
        echo "<tr style=\"font-weight:bold;color:#333333;\"><td class=\"row_0\">" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[1]}px;\">{$_AL['all.select']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[2]}px;\">{$_AL['order.number']}/{$_AL['order.createtime']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[3]}px; padding-right:8px;\">{$_AL['order.product.list']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[4]}px;\">{$_AL['order.total']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[5]}px;\">{$_AL['order.csg.details']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[6]}px;\">{$_AL['order.state']}</div>" . "<div class=\"rowdiv_0\" style=\"width:{$dwidth[7]}px;\">{$_AL['all.control']}</div>" . "";
        for ($i = 0; $i < count($rows); $i++) {
            $row = $rows[$i];
            $row['createtime'] = getDateStr($row['createtime']);
开发者ID:rust1989,项目名称:edit,代码行数:31,代码来源:order.php


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