$tp->assign('id', $array['id']); $tp->assign('title', $array['title']); $tp->assign('option', $option); $tp->assign('orderid', $array['orderid']); $tp->assign('editorid', $array['editorid']); $tp->assign('num', $array['num']); $moduleTemplate = $tp->result(); $moduleTitle = '编辑采集器分类'; } else { if (!$_GET['CID']) { $error('您要编辑什么分类?'); } if (!$_POST['title']) { $error('请您填写分类名称!'); } if (strlen($_POST['pid']) == 0) { $error('请您选择上级分类!'); } $data['title'] = $_POST['title']; $data['pid'] = intval($_POST['pid']); $data['orderid'] = intval($_POST['orderid']); $dataCon['id'] = intval($_GET['CID']); if (!$NC->updateCategory($data, $dataCon)) { error('不能把父级分类设置在该分类的子分类下!'); } $catearray = $NC->getCategory(); $getarray = $NC->getTree($catearray, 0, 0, 'category'); $NC->doCategoryCache($getarray); showloading('?module=listCategory', '分类编辑', '分类编辑完毕,现在返回分类列表', 1); $tpShowBody = false; }