'; foreach($cats AS $k=>$v) { $selected = ''; if($v['child'] == 1) continue; if($v['child'] == 0 && $catid == $k) $selected = 'selected'; $categorys .= ""; } $categorys .= ''; } else { $categorys = form::select_category('phpcms', 0, 'catid', 'catid', '请选择栏目', $catid, 'size="2" style="height:260px;width:350px;"', 1, 1); } include template($mod, 'contribute_category'); } else { if($catid == '') showmessage('请选择栏目',$forward); if($CATEGORY[$catid]['child']) showmessage('请选择的栏目不允许发布信息,请重新选择',$forward); if(!isset($CATEGORY[$catid]) || $CATEGORY[$catid]['type'] != 0) showmessage('非法参数!'); $category = cache_read("category_$catid.php"); extract($category); require_once 'attachment.class.php'; $attachment = new attachment($mod, $catid); if($dosubmit) { checkcode($checkcodestr,1,'goback'); $contentid = $c->add($info); showmessage('发布成功!', $forward); } else { require CACHE_MODEL_PATH.'content_form.class.php'; $content_form = new content_form($modelid); $data['catid'] = $catid; $forminfos = $content_form->get($data); include template($mod, 'contribute'); } } ?>