本文整理匯總了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) {