Example #1
0
     if ($arrTemp['COUNT_ROWS'] != 0) {
         check::AlertExit("错误:相同的信息请不要重复发布!需要刷新排列的话,请使用列表下方“提前”选项!", -1);
     }
 }
 if ($_FILES['Filedata']['name'] != "") {
     $strOldFile = $arrGPic['FileSavePath'] . 's/' . $_POST['savefilename'];
     if (is_file($strOldFile)) {
         // 缩略图删除
         unlink($strOldFile);
     }
     $strOldFile = $arrGPic['FileSavePath'] . 'b/' . $_POST['savefilename'];
     if (is_file($strOldFile)) {
         // 原文件删除
         unlink($strOldFile);
     }
     $_POST['photo'] = $objWebInit->uploadInfoImage($_FILES['Filedata'], '', $_POST['FileListPicSize'], $_POST['csize0'], $_POST['id']);
 } else {
     $_POST['photo'] = $_POST['savefilename'];
 }
 if ($_POST['summary'] == '') {
     $_POST['summary'] = check::csubstr(trim(str_replace(" ", " ", str_replace("\r\n", "", strip_tags($_POST['intro'])))), 0, $arrGWeb['db_summary_len']);
 }
 $_POST = array_merge($arrInfo, $_POST);
 $objWebInit->saveInfo($_POST, 1);
 if ($arrGWeb['file_static']) {
     //生成静态页面
     $intID = $_POST['id'];
     $strDir = ceil($intID / $arrGCache['cache_filenum']);
     $objCache = new cache($arrGCache['cache_root'] . '-' . $strDir . '/' . $intID . $arrGWeb['file_suffix'], $arrGCache['cache_time']);
     $objCache->cache_start();
     $strContents = @file_get_contents('http://' . $_SERVER["HTTP_HOST"] . '/' . $arrGWeb['module_id'] . '/detail.php?id=' . $intID);