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


PHP Pages::getPagenav方法代码示例

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


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

示例1: implode

        $vals['expire_days'] = 10;
        $vals['expire_time'] = $time_stamp + 24 * 3600 * $vals['expire_days'];
        $conditions[] = "status='1'";
        $ids = implode(",", $_POST['tradeid']);
        $conditions[] = "id in (" . $ids . ")";
        $condition = implode(" AND ", $conditions);
        $sql = "update " . $trade->getTable() . " set submit_time=" . $time_stamp . ",expire_days=10,expire_time=" . $vals['expire_time'] . " where " . $condition;
        $result = $pdb->Execute($sql);
        if ($result) {
            flash("success");
        } else {
            flash("action_failed");
        }
    }
}
$amount = 0;
$amount = $trade->findCount(null, $conditions);
$page->setPagenav($amount);
$result = $trade->findAll("*", null, $conditions, "Trade.submit_time DESC,Trade.id DESC", $page->firstcount, $page->displaypg);
if (!empty($result)) {
    for ($i = 0; $i < count($result); $i++) {
        $result[$i]['expire_date'] = df($result[$i]['expire_time']);
    }
    setvar("Items", $result);
}
uaAssign(array("ByPages" => $page->getPagenav()));
setvar("OFFER_MODERATE_POINT", $_PB_CACHE['setting']['offer_moderate_point']);
setvar("CheckStatus", $typeoption->get_cache_type("check_status"));
setvar("Amount", $amount);
setvar("TimeStamp", $time_stamp);
template($tpl_file);
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:offer.php

示例2: template

        template($tpl_file);
        exit;
    }
    if ($do == "search" && !empty($_GET['q'])) {
        $conditions[] = "Tag.name like '%" . trim($_GET['q']) . "%'";
    }
    if ($do == "del" && !empty($id)) {
        $tag->del($id);
    }
}
if (isset($_POST['del']) && !empty($_POST['id'])) {
    $tag->del($_POST['id']);
}
if (isset($_POST['save']) && !empty($_POST['data']['tag'])) {
    if (isset($_POST['id'])) {
        $id = intval($_POST['id']);
    }
    if ($id) {
        $tag->save($_POST['data']['tag'], "update", $id);
    } else {
        $tag->save($_POST['data']['tag']);
    }
}
$amount = $tag->findCount(null, $conditions);
$page = new Pages();
$page->setPagenav($amount);
//$joins[] = "LEFT JOIN {$tb_prefix}members m ON m.id=Tag.member_id";
$result = $tag->findAll("Tag.*", $joins, $conditions, "Tag.id DESC ", $page->firstcount, $page->displaypg);
setvar("Items", $result);
setvar("ByPages", $page->getPagenav());
template($tpl_file);
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:tag.php

示例3: flash

        }
    }
    if (($do == "del" || $_GET['act'] == "del") && !empty($id)) {
        $res = $product->read("id", $id);
        if ($res) {
            if (!$product->del($_GET['id'], $conditions)) {
                flash();
            }
        } else {
            flash("data_not_exists");
        }
    }
}
if (isset($_GET['typeid']) && !empty($_GET['typeid'])) {
    $conditions[] = "producttype_id = " . $_GET['typeid'];
}
$amount = $product->findCount(null, $conditions, "Product.id");
$page->setPagenav($amount);
$result = $product->findAll("sort_id,id,name,picture,content,created,status,state", null, $conditions, "Product.id DESC", $page->firstcount, $page->displaypg);
if ($result) {
    $i_count = count($result);
    for ($i = 0; $i < $i_count; $i++) {
        $result[$i]['image'] = pb_get_attachmenturl($result[$i]['picture'], '../', 'small');
    }
}
setvar("Items", $result);
setvar("nlink", $page->nextpage_link);
setvar("plink", $page->previouspage_link);
setvar("CheckStatus", explode(",", L('product_status', 'tpl')));
uaAssign(array("pagenav" => $page->getPagenav()));
template($tpl_file);
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:product.php


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