本文整理匯總了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;
}
示例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());
示例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@#");