if ($itemid) { $condition .= " AND itemid={$itemid}"; } $timetype = strpos($dorder[$order], 'edit') === false ? 'add' : ''; } switch ($action) { case 'add': if ($submit) { if ($do->pass($post)) { if ($FD) { fields_check($post_fields); } if ($CP) { property_check($post_ppt); } $do->add($post); if ($FD) { fields_update($post_fields, $table, $do->itemid); } if ($CP) { property_update($post_ppt, $moduleid, $post['catid'], $do->itemid); } if ($MOD['show_html'] && $post['status'] > 2) { $do->tohtml($do->itemid); } dmsg('添加成功', '?moduleid=' . $moduleid . '&id=' . $do->itemid . '&tm=' . ($DT_TIME + 5)); } else { msg($do->errmsg); } } else { foreach ($do->fields as $v) {