//允许修改统计的情况 if ($allowmodify) { $statary = array('dayvisit', 'weekvisit', 'monthvisit', 'allvisit', 'dayvote', 'weekvote', 'monthvote', 'allvote'); foreach ($statary as $v) { if (isset($_POST[$v])) { $article->setVar($v, intval($_POST[$v])); } } } if (!$article_handler->insert($article)) { jieqi_printfail($jieqiLang['article']['article_edit_failure']); } else { $id = $article->getVar('articleid'); include_once $jieqiModules['article']['path'] . '/class/package.php'; $package = new JieqiPackage($id); $package->editPackage(array('id' => $article->getVar('articleid', 'n'), 'title' => $article->getVar('articlename', 'n'), 'creatorid' => $article->getVar('authorid', 'n'), 'creator' => $article->getVar('author', 'n'), 'subject' => $article->getVar('keywords', 'n'), 'description' => $article->getVar('intro', 'n'), 'publisher' => JIEQI_SITE_NAME, 'contributorid' => $article->getVar('posterid', 'n'), 'contributor' => $article->getVar('poster', 'n'), 'sortid' => $article->getVar('sortid', 'n'), 'typeid' => $article->getVar('typeid', 'n'), 'articletype' => $article->getVar('articletype', 'n'), 'permission' => $article->getVar('permission', 'n'), 'firstflag' => $article->getVar('firstflag', 'n'), 'fullflag' => $article->getVar('fullflag', 'n'), 'imgflag' => $article->getVar('imgflag', 'n'), 'power' => $article->getVar('power', 'n'), 'display' => $article->getVar('display', 'n'))); //删除老封面 if ($old_imgflag != $imgflag) { $tmpvar = $old_imgflag >> 2 & 7; if (isset($imgtary[$tmpvar])) { if (is_file($package->getDir('imagedir') . '/' . $id . 's' . $imgtary[$tmpvar])) { jieqi_delfile($package->getDir('imagedir') . '/' . $id . 's' . $imgtary[$tmpvar]); } } $tmpvar = $old_imgflag >> 5; if (isset($imgtary[$tmpvar])) { if (is_file($package->getDir('imagedir') . '/' . $id . 'l' . $imgtary[$tmpvar])) { jieqi_delfile($package->getDir('imagedir') . '/' . $id . 'l' . $imgtary[$tmpvar]); } } }