From 9f86ac47f7c5f1290f4d00c0f22f5e242cb8a1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?= <93301500+xushubieli@users.noreply.github.com> Date: Fri, 25 Nov 2022 16:00:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E9=87=87=E9=9B=86=E5=8D=95=E4=B8=AA=E7=BD=91?= =?UTF-8?q?=E9=A1=B5=EF=BC=8C=E6=8A=A5=E9=94=99=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/article_add.php | 6 -- src/admin/inc/inc_coonepage.php | 102 -------------------------------- src/admin/js/main.js | 8 ++- 3 files changed, 5 insertions(+), 111 deletions(-) delete mode 100644 src/admin/inc/inc_coonepage.php diff --git a/src/admin/article_add.php b/src/admin/article_add.php index 9ab485c7..1fc5a147 100644 --- a/src/admin/article_add.php +++ b/src/admin/article_add.php @@ -24,12 +24,6 @@ if ($dopost != 'save') { $cid = empty($cid) ? 0 : intval($cid); if (empty($geturl)) $geturl = ''; $keywords = $writer = $source = $body = $description = $title = ''; - //采集单个网页 - if (preg_match("#^(http|https):\/\/#", $geturl)) { - require_once(DEDEADMIN."/inc/inc_coonepage.php"); - $redatas = CoOnePage($geturl); - extract((array)$redatas); - } //获得栏目模型id if ($cid > 0 && $channelid == 0) { $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); diff --git a/src/admin/inc/inc_coonepage.php b/src/admin/inc/inc_coonepage.php deleted file mode 100644 index 0be39b93..00000000 --- a/src/admin/inc/inc_coonepage.php +++ /dev/null @@ -1,102 +0,0 @@ - '', 'body' => '', 'source' => '', 'writer' => '', 'description' => '', 'keywords' => ''); - $redatas['source'] = preg_replace("/(http|https):\/\//i", "", $gurl); - $redatas['source'] = preg_replace("/\/(.*)$/i", "", $redatas['source']); - $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '".$redatas['source']."' "); - $s = $e = ''; - if (is_array($row)) { - list($s, $e) = explode('{@body}', $row['rule']); - $s = trim($s); - $e = trim($e); - if ($row['issource'] == 1) { - $redatas['source'] = $row['title']; - } - } - $htd = new DedeHttpDown(); - $htd->OpenUrl($gurl); - $body = $htd->GetHtml(); - if ($body != '') { - //编码自动转换 - if ($cfg_soft_lang == 'utf-8') { - if ($row['lang'] == 'gb2312') { - $body = gb2utf8($body); - } - } else if ($cfg_soft_lang == 'gb2312') { - if ($row['lang'] == 'utf-8') { - $body = utf82gb($body); - } - } - //获取标题 - $inarr = array(); - preg_match("/