本文整理汇总了PHP中Model_Category::updData方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Category::updData方法的具体用法?PHP Model_Category::updData怎么用?PHP Model_Category::updData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_Category
的用法示例。
在下文中一共展示了Model_Category::updData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editAction
public function editAction()
{
$aParam['iID'] = intval($this->getParam('id'));
$aParam['iID1'] = intval($this->getParam('iID'));
$aParam['sName'] = $this->getParam('sName');
$aParam['iParentID'] = intval($this->getParam('iParentID'));
if ($this->isPost()) {
if ($aParam['iID'] != $aParam['iID1']) {
$this->showMsg('非法操作', false);
}
unset($aParam['iID1']);
$aParam['iUpdateUser'] = $this->aCurrUser['iUserID'];
$aCategory = $this->_checkData($aParam);
if (empty($aCategory)) {
return null;
}
$aData = Model_Category::exsistCategory($aParam['sName'], $aParam['iParentID']);
if (!empty($aData)) {
return $this->showMsg('已存在该分类', false);
}
if (Model_Category::updData($aCategory)) {
return $this->showMsg('分类修改成功', true);
}
} else {
$aCategory = Model_Category::getDetail($aParam['iID']);
if (empty($aCategory)) {
$this->showMsg('该分类不存在', false);
}
$aData = Model_Category::getMenu();
$this->assign('aCategory', $aCategory);
$this->assign('aTree', $aData);
}
}