本文整理汇总了PHP中PbModel类的典型用法代码示例。如果您正苦于以下问题:PHP PbModel类的具体用法?PHP PbModel怎么用?PHP PbModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PbModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInstance
public function getInstance()
{
if (self::$instance == NULL) {
// If instance is not created yet, will create it.
self::$instance = new PbModel();
}
return self::$instance;
}
示例2: PbController
$condition[] = 'status=1';
if (!empty($search_word)) {
$condition[] = "title LIKE '%{$search_word}%'";
}
break;
}
$search_controller = new PbController();
$model_name = htmlspecialchars($do, ENT_QUOTES);
$model_name = strtolower($search_controller->pluralize(ucwords($model_name)));
if (!empty($_GET['id'])) {
$id = intval($_GET['id']);
$result = $pdb->GetRow("SELECT *" . $extra . " FROM " . $tb_prefix . $model_name . " WHERE id=" . $id);
setvar("item", $result);
$tpl_file = "wap/detail";
} else {
$model_common = new PbModel();
$model_common->setCondition($condition);
//pager
$pagesize = 10;
$page = isset($_GET["page"]) ? intval($_GET["page"]) : 1;
$total = $pdb->GetOne("SELECT count(id) FROM " . $tb_prefix . $model_name . $model_common->getCondition());
$pagecount = ceil($total / $pagesize);
if ($page > $pagecount) {
$page = $pagecount;
}
if ($page <= 0) {
$page = 1;
}
$offset = ($page - 1) * $pagesize;
$pre = $page - 1;
$next = $page + 1;
示例3: Productcategories
function Productcategories()
{
parent::__construct();
}
示例4: Productprices
function Productprices()
{
parent::__construct();
}
示例5: Countries
function Countries()
{
parent::__construct();
}
示例7: Keywords
function Keywords()
{
parent::__construct();
}
示例8: Settings
function Settings()
{
$class_name = $this->name;
$this->Setting =& new $class_name();
parent::__construct();
}
示例9: Companies
function Companies()
{
parent::__construct();
$this->validate['name']['message'] = L("please_input_companyname");
$this->validate['description']['message'] = L("please_input_companydesc");
}
示例10: PromotionCustomers
function PromotionCustomers()
{
parent::__construct();
}
示例11: Expotypes
function Expotypes()
{
parent::__construct();
}
示例12: Membergroups
function Membergroups()
{
parent::__construct();
}
示例13: Promotions
function Promotions()
{
parent::__construct();
}
示例14: Friendlinks
function Friendlinks()
{
parent::__construct();
}
示例15: Spaces
function Spaces()
{
parent::__construct();
}