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


PHP DedeTagParse::GetResultNP方法代码示例

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


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

示例1: ShowMsg

        $gerr = $dsql->GetError();
        ShowMsg("增加字段失败,错误提示为:" . $gerr, "javascript:;");
        exit;
    }
    $ok = false;
    //检测旧配置信息,并替换为新配置
    if (is_array($dtp->CTags)) {
        //遍历旧配置
        foreach ($dtp->CTags as $tagid => $ctag) {
            if ($fieldname == strtolower($ctag->GetName())) {
                $dtp->Assign($tagid, stripslashes($fieldstring), false);
                $ok = true;
                break;
            }
        }
        $oksetting = $ok ? $dtp->GetResultNP() : $fieldset . "\n" . stripslashes($fieldstring);
    } else {
        //原来的配置为空
        $oksetting = $fieldset . "\n" . stripslashes($fieldstring);
    }
    $addlist = GetAddFieldList($dtp, $oksetting);
    $oksetting = addslashes($oksetting);
    $rs = $dsql->ExecuteNoneQuery("UPDATE #@__member_model SET `info`='{$oksetting}' WHERE id='{$id}' ");
    if (!$rs) {
        $grr = $dsql->GetError();
        ShowMsg("保存节点配置出错!" . $grr, "javascript:;");
        exit;
    }
    ShowMsg("成功增加一个字段!", "member_model_edit.php?id={$id}");
    exit;
}
开发者ID:stonelf,项目名称:mcgmh,代码行数:31,代码来源:member_model_field_add.php

示例2: stripslashes

            if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) {
                $tabsql = "ALTER TABLE `{$trueTable}` CHANGE `{$fieldname}` " . $ntabsql;
                $dsql->ExecuteNoneQuery($tabsql);
            } else {
                if (!isset($fields[$fieldname])) {
                    $tabsql = "ALTER TABLE `{$trueTable}` ADD " . $ntabsql;
                    $dsql->ExecuteNoneQuery($tabsql);
                } else {
                    $tabsql = '';
                }
            }
            $dtp->Assign($tagid, stripslashes($fieldstring), false);
            break;
        }
    }
    $oksetting = $dtp->GetResultNP();
    $oksetting = addslashes($oksetting);
    $dsql->ExecuteNoneQuery("UPDATE #@__member_model SET info='{$oksetting}' WHERE id='{$id}' ");
    ShowMsg("成功更改一个字段的配置!", "member_model_edit.php?id={$id}");
    exit;
} else {
    if ($action == "disabled") {
        foreach ($dtp->CTags as $tagid => $ctag) {
            if (strtolower($ctag->GetName()) == strtolower($fname)) {
                $statenum = $ctag->GetAtt('state') == 1 ? 0 : 1;
                $fieldstring = "<field:{$ctag->GetName()} itemname=\"{$ctag->GetAtt('itemname')}\" autofield=\"{$ctag->GetAtt('autofield')}\" type=\"{$ctag->GetAtt('type')}\" isnull=\"{$ctag->GetAtt('isnull')}\" default=\"{$ctag->GetAtt('default')}\"  maxlength=\"{$ctag->GetAtt('maxlength')}\" issearch=\"{$ctag->GetAtt('issearch')}\" isshow=\"{$ctag->GetAtt('isshow')}\" state=\"{$statenum}\">\r\n";
                $fieldstring .= "</field:{$ctag->GetName()}>";
                $dtp->Assign($tagid, stripslashes($fieldstring), false);
            }
        }
        $oksetting = addslashes($dtp->GetResultNP());
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:member_model_field_edit.php

示例3: stripslashes

            if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) {
                $tabsql = "ALTER TABLE `{$trueTable}` CHANGE `{$fieldname}` " . $ntabsql;
                $dsql->ExecuteNoneQuery($tabsql);
            } else {
                if (!isset($fields[$fieldname])) {
                    $tabsql = "ALTER TABLE `{$trueTable}` ADD " . $ntabsql;
                    $dsql->ExecuteNoneQuery($tabsql);
                } else {
                    $tabsql = '';
                }
            }
            $dtp->Assign($tagid, stripslashes($fieldstring), false);
            break;
        }
    }
    $oksetting = $dtp->GetResultNP();
    $addlist = GetAddFieldList($dtp, $oksetting);
    $oksetting = addslashes($oksetting);
    $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='{$oksetting}',listfields='{$addlist}' WHERE id='{$id}' ");
    ShowMsg("成功更改一个字段的配置!", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1");
    exit;
} else {
    if ($action == "delete") {
        if ($row['issystem'] == 1) {
            ShowMsg("对不起,系统模型的字段不允许删除!", "-1");
            exit;
        }
        //检测旧数据类型,并替换为新配置
        foreach ($dtp->CTags as $tagid => $ctag) {
            if (strtolower($ctag->GetName()) == strtolower($fname)) {
                $dtp->Assign($tagid, "#@Delete@#");
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:mychannel_field_edit.php


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