} //保存远程缩略图 if ($rempic == 'true' && preg_match("#^http:\\/\\/#i", $picurl)) { $picurl = GetRemPic($picurl); } //自动缩略图处理 $r = $dosql->GetOne("SELECT `picwidth`,`picheight` FROM `#@__infoclass` WHERE `id`={$classid}"); if (!empty($r['picwidth']) && !empty($r['picheight'])) { ImageResize(PHPMYWIND_ROOT . '/' . $picurl, $r['picwidth'], $r['picheight']); } $posttime = GetMkTime($posttime); //自定义字段处理 $fieldname = ''; $fieldvalue = ''; $fieldstr = ''; $ids = GetDiyFieldCatePriv($modelid, $classid); if (!empty($ids)) { $dosql->Execute("SELECT * FROM `#@__diyfield` WHERE infotype={$modelid} AND `id` IN ({$ids}) AND checkinfo=true ORDER BY orderid ASC"); while ($row = $dosql->GetArray()) { $k = $row['fieldname']; if (isset($_POST[$row['fieldname']])) { if (is_array($_POST[$row['fieldname']])) { foreach ($_POST[$row['fieldname']] as $post_value) { $v[] = addslashes($post_value); } } else { $v = addslashes($_POST[$row['fieldname']]); } } else { $v = ''; }
if (empty($autodescsize) or !intval($autodescsize)) { $autodescsize = 200; } $descstr = ClearHtml($content); $description = ReStrLen($descstr, $autodescsize); } //自动分页 if ($autopage == 'true') { $content = ContAutoPage($content, $autopagesize * 1024); } $posttime = GetMkTime($posttime); //自定义字段处理 $fieldname = ''; $fieldvalue = ''; $fieldstr = ''; $ids = GetDiyFieldCatePriv('1', $classid); if (!empty($ids)) { $dosql->Execute("SELECT * FROM `#@__diyfield` WHERE infotype=1 AND `id` IN ({$ids}) AND checkinfo=true ORDER BY orderid ASC"); while ($row = $dosql->GetArray()) { $k = $row['fieldname']; $v = ''; if (isset($_POST[$row['fieldname']])) { if (is_array($_POST[$row['fieldname']])) { foreach ($_POST[$row['fieldname']] as $post_value) { if (@(!get_magic_quotes_gpc())) { $v[] = addslashes($post_value); } else { $v[] = $post_value; } } } else {