本文整理匯總了PHP中PbModel::getIncludeIds方法的典型用法代碼示例。如果您正苦於以下問題:PHP PbModel::getIncludeIds方法的具體用法?PHP PbModel::getIncludeIds怎麽用?PHP PbModel::getIncludeIds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PbModel
的用法示例。
在下文中一共展示了PbModel::getIncludeIds方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: smarty_block_getdata
//.........這裏部分代碼省略.........
$conditions[] = "level_id='" . $params['level'] . "'";
} else {
$conditions[] = "level='" . $params['level'] . "'";
}
}
if (isset($params['type'])) {
$type = explode(",", $params['type']);
$type = array_unique($type);
foreach ($type as $val) {
switch ($val) {
case 'image':
if ($module == "friendlink") {
$image_col = "logo";
} else {
$image_col = "picture";
}
$conditions[] = "{$image_col}!=''";
break;
case 'hot':
$orderbys[] = "hits DESC";
break;
case 'commend':
$conditions[] = "if_commend='1'";
break;
default:
break;
}
}
}
if (isset($params['exclude'])) {
$conditions[] = $M->getExcludeIds($params['exclude']);
}
if (isset($params['include'])) {
$conditions[] = $M->getIncludeIds($params['include']);
}
if (isset($params['orderby'])) {
$orderbys[] = trim($params['orderby']);
}
if (!empty($row) && $row != 'all' && $row != -1) {
$M->setLimitOffset($offset, $limit);
$mysql_limit = $M->getLimitOffset();
}
if (!empty($params['limit'])) {
$mysql_limit = " " . trim($params['limit']);
}
if (!empty($_GET['producttypeid'])) {
$conditions[] = "type_id=" . intval($_GET['producttypeid']);
}
if (!empty($params['companyid'])) {
$conditions[] = "company_id=" . intval($params['companyid']);
}
if (!empty($params['industryid'])) {
$conditions[] = "industry_id=" . intval($params['industryid']);
}
if (!empty($params['typeid'])) {
if ($_table == 'adses') {
$conditions[] = "adzone_id=" . intval($params['typeid']);
} else {
$conditions[] = "type_id=" . intval($params['typeid']);
}
}
if (empty($sTemplate->block_data[$iTags])) {
# ************************************************************************
# Main content
$M->setCondition($conditions);
$M->setOrderby($orderbys);