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


PHP iaUtil::updateItemPOSTFields方法代码示例

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


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

示例1: elseif

 $iaCore->set_cfg('body', 'none');
 if ($mod == 'manage_recipecats') {
     $iaCore->grid('_IA_URL_packages/recipes/js/admin/recipecats');
     $iaCore->display('none');
 } elseif ($mod == 'edit_recipecat' || $mod == 'add_recipecat') {
     $iaCore->set_breadcrumb(_t('manage_recipecats'), IA_ADMIN_URL . 'manage/recipecats/');
     $iaCore->set_cfg('body', 'edit_recipecat');
     if (isset($vals[0])) {
         $_GET['id'] = (int) $_GET['id'];
     }
     $recipecat = $mod == 'add_recipecat' || empty($_GET['id']) ? array() : $iaDb->row('*', sprintf("`id`=%d", $_GET['id']));
     $fields = $iaCore->getAllFields(true, "", "recipecats");
     if (!empty($_POST)) {
         if ($fields) {
             $iaUtil = $iaCore->factory('core', 'util');
             list($data, $error, $msg, $error_fields) = iaUtil::updateItemPOSTFields($fields, $recipecat, true);
         }
         if (!$error) {
             $iaCore->startHook("phpAdminBeforeRecipecatSubmit");
             $data['locked'] = (int) $_POST['locked'];
             $data['status'] = $_POST['status'];
             $data['title_alias'] = !empty($_POST['title_alias']) ? $_POST['title_alias'] : $_POST['title'];
             // transliterate title alias
             if ($iaCore->get('recipes_auto_alias')) {
                 $iaUtil = $iaCore->factory('core', 'util');
                 if (!defined('IA_NOUTF')) {
                     iaUtf8::loadUTF8Core();
                     iaUtf8::loadUTF8Util('ascii', 'utf8_to_ascii');
                 }
                 if (!utf8_is_ascii($data['title_alias'])) {
                     $data['title_alias'] = utf8_to_ascii($data['title_alias']);
开发者ID:nicefirework,项目名称:subrion-recipes,代码行数:31,代码来源:manage_recipecats.php

示例2: elseif

 } elseif ($mod == 'edit_cookbook' || $mod == 'add_cookbook') {
     $iaCore->set_breadcrumb(_t('manage_cookbooks'), IA_ADMIN_URL . 'manage/cookbooks/');
     $iaCore->set_cfg('body', 'edit_cookbook');
     if (isset($vals[0])) {
         $_GET['id'] = (int) $_GET['id'];
     }
     if ($mod == 'add_cookbook' || empty($_GET['id'])) {
         $cookbook = array();
     } else {
         $cookbook = $iaCookbook->getCookbookById($_GET['id']);
     }
     $fields = $iaCore->getAllFields(true, "", "cookbooks");
     if (!empty($_POST)) {
         if ($fields) {
             $iaUtil = $iaCore->factory('core', 'util');
             list($data, $error, $msg, $error_fields) = iaUtil::updateItemPOSTFields($fields, $cookbook, true);
         }
         if (!$error) {
             $iaCore->startHook("phpAdminBeforeCookbookSubmit");
             $data['status'] = $_POST['status'];
             $data['title_alias'] = !empty($_POST['title_alias']) ? $_POST['title_alias'] : $_POST['title'];
             // transliterate title alias
             if ($iaCore->get('recipes_auto_alias')) {
                 $iaUtil = $iaCore->factory('core', 'util');
                 if (!defined('IA_NOUTF')) {
                     iaUtf8::loadUTF8Core();
                     iaUtf8::loadUTF8Util('ascii', 'utf8_to_ascii');
                 }
                 if (!utf8_is_ascii($data['title_alias'])) {
                     $data['title_alias'] = utf8_to_ascii($data['title_alias']);
                 }
开发者ID:nicefirework,项目名称:subrion-recipes,代码行数:31,代码来源:manage_cookbooks.php

示例3: list

if ($id) {
    $sections = $iaCore->getAcoGroupsFields(false, 'lyrics', "`f`.`type` <> 'pictures'");
    $iaCore->assign_by_ref('sections', $sections);
    $pictures_sections = $iaCore->getAcoGroupsFields(false, 'lyrics', "`f`.`type`='pictures'", false);
    $iaCore->assign_by_ref('pictures_sections', $pictures_sections);
} else {
    $sections = $iaCore->getAcoGroupsFields(false, 'lyrics');
    $iaCore->assign_by_ref('sections', $sections);
}
if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
    if (!empty($_POST)) {
        $fields = $iaCore->getAcoFieldsList(false, 'lyrics', false, true);
        if ($fields) {
            $data = '';
            iaCore::util();
            list($data, $error, $messages, $errorFields) = iaUtil::updateItemPOSTFields($fields, $lyric);
        }
        if (!$error) {
            $iaCore->startHook("beforeEstateSubmit");
            $dmsg = '';
            if ($iaCore->get('lyrics_auto_approval') || $action == 'deleted') {
                $data['status'] = 'active';
            } else {
                $data['status'] = 'approval';
                $dmsg = '_apporval';
            }
            if (empty($lyric)) {
                $action = 'added';
                $data['id'] = $iaLyric->add($data);
                if ($data['id'] == 0) {
                    $error = true;
开发者ID:nicefirework,项目名称:subrion-lyrics,代码行数:31,代码来源:lyricrequest.php


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