本文整理汇总了PHP中iaCore::errorPage方法的典型用法代码示例。如果您正苦于以下问题:PHP iaCore::errorPage方法的具体用法?PHP iaCore::errorPage怎么用?PHP iaCore::errorPage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iaCore
的用法示例。
在下文中一共展示了iaCore::errorPage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
<?php
//##copyright##
define('INTELLI_REALM', 'recipecat_view');
if (isset($vals[0])) {
$recipecat_alias = $vals[0];
// TODO: perform param validation
}
$iaRecipecat = $iaCore->factoryPackages(IA_CURRENT_PACKAGE, 'front', 'recipecat');
$recipecat = isset($recipecat_alias) ? $iaRecipecat->getRecipecatByAlias($recipecat_alias) : false;
if (empty($recipecat)) {
iaCore::errorPage('404');
}
$iaCore->startHook('phpViewRecipecatBeforeStart', array('listing' => $recipecat['id'], 'item' => 'recipecats'));
$recipecat['@view'] = true;
// get sections
$sections = $iaCore->getAcoGroupsFields(false, false, "`f`.`type`<>'pictures'", $recipecat);
$pictures_sections = $iaCore->getAcoGroupsFields(false, false, "`f`.`type`='pictures'", $recipecat);
if ($pictures_sections) {
foreach ($pictures_sections as $onesection) {
if (isset($onesection['fields']) && !empty($onesection['fields']) && is_array($onesection['fields'])) {
foreach ($onesection['fields'] as $onefield) {
if (isset($recipecat[$onefield['name']]) && !empty($recipecat[$onefield['name']])) {
$iaCore->assign_by_ref('pictures_sections', $pictures_sections);
break 2;
}
}
}
}
}
$recipecat['item'] = 'recipecats';
示例2: array
$error_fields = array();
if (isset($_GET['id'])) {
$id = (int) $_GET['id'];
} else {
$id = false;
}
$recipe = $id ? $iaDb->row('*, \'recipes\' as `item`', "`id`={$id}") : array();
// plans
$iaPlan = $iaCore->factory('front', 'plan');
$plans = $iaPlan->getPlans('recipes');
$iaCore->assign('plans', $plans);
if (isset($_GET['id'])) {
if (empty($recipe)) {
iaCore::errorPage(404);
} elseif ($_SESSION['user']['id'] != $recipe['account_id']) {
iaCore::errorPage(403);
}
}
if ($id) {
$sections = $iaCore->getAcoGroupsFields(false, 'recipes', "`f`.`type` <> 'pictures'");
$iaCore->assign_by_ref('sections', $sections);
$pictures_sections = $iaCore->getAcoGroupsFields(false, 'recipes', "`f`.`type`='pictures'", false);
$iaCore->assign_by_ref('pictures_sections', $pictures_sections);
} else {
$sections = $iaCore->getAcoGroupsFields(false, 'recipes');
$iaCore->assign_by_ref('sections', $sections);
}
if (SMARTY) {
if (!empty($_POST)) {
$fields = $iaCore->getAcoFieldsList(false, 'recipes', false, true);
if ($fields) {