From da8fc94404367b142d3509263ea4566fbfc23b3a Mon Sep 17 00:00:00 2001 From: llgoer Date: Mon, 4 Jan 2021 10:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=89=E8=A3=85=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/include/common.inc.php | 2 +- src/include/dedecollection.class.php | 1019 ----------------------- src/include/dedehtml2.class.php | 672 --------------- src/install/images/ajax-loader.gif | Bin 847 -> 0 bytes src/install/images/boxtitle_bg.gif | Bin 236 -> 0 bytes src/install/images/but_back.gif | Bin 1381 -> 0 bytes src/install/images/but_next.gif | Bin 1503 -> 0 bytes src/install/images/ico-step-now.png | Bin 326 -> 0 bytes src/install/images/ico-step-succeed.png | Bin 324 -> 0 bytes src/install/images/leftbox-tbg.png | Bin 3016 -> 0 bytes src/install/images/loading1.gif | Bin 3398 -> 0 bytes src/install/images/step-ico-bg.png | Bin 3122 -> 0 bytes src/install/images/top-bg.png | Bin 2844 -> 0 bytes src/install/images/top-logo.png | Bin 6724 -> 0 bytes src/install/index.php | 44 +- src/install/templates/step-1.html | 37 +- src/templets/templet-dirlist.inc | 1 - src/templets/templet-filelist.inc | 1 - 18 files changed, 71 insertions(+), 1705 deletions(-) delete mode 100755 src/include/dedecollection.class.php delete mode 100755 src/include/dedehtml2.class.php delete mode 100755 src/install/images/ajax-loader.gif delete mode 100755 src/install/images/boxtitle_bg.gif delete mode 100755 src/install/images/but_back.gif delete mode 100755 src/install/images/but_next.gif delete mode 100755 src/install/images/ico-step-now.png delete mode 100755 src/install/images/ico-step-succeed.png delete mode 100755 src/install/images/leftbox-tbg.png delete mode 100755 src/install/images/loading1.gif delete mode 100755 src/install/images/step-ico-bg.png delete mode 100755 src/install/images/top-bg.png delete mode 100644 src/install/images/top-logo.png diff --git a/src/include/common.inc.php b/src/include/common.inc.php index 7a7ed8fa..c0dc414a 100755 --- a/src/include/common.inc.php +++ b/src/include/common.inc.php @@ -237,7 +237,7 @@ $cfg_other_medias = $cfg_medias_dir . '/media'; //软件摘要信息,****请不要删除本项**** 否则系统无法正确接收系统漏洞或升级信息 $cfg_version = 'V6'; -$cfg_version_detail = '6.0.1'; // 详细版本号 +$cfg_version_detail = '6.0.3'; // 详细版本号 $cfg_soft_lang = 'utf-8'; $cfg_soft_public = 'base'; diff --git a/src/include/dedecollection.class.php b/src/include/dedecollection.class.php deleted file mode 100755 index d1f15a18..00000000 --- a/src/include/dedecollection.class.php +++ /dev/null @@ -1,1019 +0,0 @@ -dsql = $GLOBALS['dsql']; - $this->cHttpDown = new DedeHttpDown(); - $this->cDedeHtml = new DedeHtml2(); - } - - function DedeCollection() - { - $this->__construct(); - } - - //析放资源 - function Close() - { - } - - /** - * 从数据库里载入某个节点 - * - * @access public - * @param int $nid 采集节点ID - * @return void - */ - function LoadNote($nid) - { - $this->noteId = $nid; - $row = $this->dsql->GetOne("SELECT * FROM `#@__co_note` WHERE nid='$nid'"); - $this->LoadListConfig($row['listconfig']); - $this->LoadItemConfig($row['itemconfig']); - } - - /** - * 分析基本节点的及索引配置信息 - * - * @access public - * @param string $configString 配置字符串 - * @return void - */ - function LoadListConfig($configString) - { - $dtp = new DedeTagParse(); - $dtp2 = new DedeTagParse(); - $dtp->LoadString($configString); - for ($i = 0; $i <= $dtp->Count; $i++) { - $ctag = $dtp->CTags[$i]; - - //item 配置 - //节点基本信息 - if ($ctag->GetName() == "noteinfo") { - $this->noteInfos['notename'] = $ctag->GetAtt('notename'); - $this->noteInfos['matchtype'] = $ctag->GetAtt('matchtype'); - $this->noteInfos['channelid'] = $ctag->GetAtt('channelid'); - $this->noteInfos['refurl'] = $ctag->GetAtt('refurl'); - $this->noteInfos['sourcelang'] = $ctag->GetAtt('sourcelang'); - $this->noteInfos['cosort'] = $ctag->GetAtt('cosort'); - $this->noteInfos['isref'] = $ctag->GetAtt('isref'); - $this->noteInfos['exptime'] = $ctag->GetAtt('exptime'); - } - - //list 配置 - //要采集的列表页的信息 - else if ($ctag->GetName() == "listrule") { - $this->lists['sourcetype'] = $ctag->GetAtt('sourcetype'); - $this->lists['rssurl'] = $ctag->GetAtt('rssurl'); - $this->lists['regxurl'] = $ctag->GetAtt('regxurl'); - $this->lists['startid'] = $ctag->GetAtt('startid'); - $this->lists['endid'] = $ctag->GetAtt('endid'); - $this->lists['addv'] = $ctag->GetAtt('addv'); - $this->lists['urlrule'] = $ctag->GetAtt('urlrule'); - $this->lists['musthas'] = $ctag->GetAtt('musthas'); - $this->lists['nothas'] = $ctag->GetAtt('nothas'); - $this->lists['listpic'] = $ctag->GetAtt('listpic'); - $this->lists['usemore'] = $ctag->GetAtt('usemore'); - $dtp2->LoadString($ctag->GetInnerText()); - for ($j = 0; $j <= $dtp2->Count; $j++) { - $ctag2 = $dtp2->CTags[$j]; - $tname = $ctag2->GetName(); - if ($tname == 'addurls') { - $this->lists['addurls'] = trim($ctag2->GetInnerText()); - } else if ($tname == 'regxrule') { - $this->lists['regxrule'] = trim($ctag2->GetInnerText()); - } else if ($tname == 'areastart') { - $this->lists['areastart'] = trim($ctag2->GetInnerText()); - } else if ($tname == 'areaend') { - $this->lists['areaend'] = trim($ctag2->GetInnerText()); - } else if ($tname == 'batchrule') { - $this->lists['batchrule'] = trim($ctag2->GetInnerText()); - } - } - - //分析列表网址 - if ($this->lists['sourcetype'] != 'rss') { - $this->lists['url'] = GetUrlFromListRule( - $this->lists['regxurl'], - $this->lists['addurls'], - $this->lists['startid'], - $this->lists['endid'], - $this->lists['addv'], - $this->lists['usemore'], - $this->lists['batchrule'] - ); - } else { - $this->lists['url'] = $this->lists['rssurl']; - } - } - } //End Loop - - $dtp->Clear(); - $dtp2->Clear(); - } - - /** - * 分析采集文章页的字段的设置 - * - * @access public - * @param string $configString 配置字符串 - * @return void - */ - function LoadItemConfig($configString) - { - $dtp = new DedeTagParse(); - $dtp2 = new DedeTagParse(); - $dtp->LoadString($configString); - for ($i = 0; $i <= $dtp->Count; $i++) { - $ctag = $dtp->CTags[$i]; - if ($ctag->GetName() == 'sppage') { - $this->artNotes['sppage'] = $ctag->GetInnerText(); - $this->artNotes['sptype'] = $ctag->GetAtt('sptype'); - $this->spNotes['srul'] = $ctag->GetAtt('srul'); - $this->spNotes['erul'] = $ctag->GetAtt('erul'); - } else if ($ctag->GetName() == 'previewurl') { - $this->artNotes['previewurl'] = $ctag->GetInnerText(); - } else if ($ctag->GetName() == 'keywordtrim') { - $this->artNotes['keywordtrim'] = $ctag->GetInnerText(); - } else if ($ctag->GetName() == 'descriptiontrim') { - $this->artNotes['descriptiontrim'] = $ctag->GetInnerText(); - } else if ($ctag->GetName() == 'item') { - $field = $ctag->GetAtt('field'); - if ($field == '') { - continue; - } - $this->artNotes[$field]['value'] = $ctag->GetAtt('value'); - $this->artNotes[$field]['isunit'] = $ctag->GetAtt('isunit'); - $this->artNotes[$field]['isdown'] = $ctag->GetAtt('isdown'); - $this->artNotes[$field]['trim'] = array(); - $this->artNotes[$field]['match'] = ''; - $this->artNotes[$field]['function'] = ''; - $t = 0; - $dtp2->LoadString($ctag->GetInnerText()); - for ($k = 0; $k <= $dtp2->Count; $k++) { - $ctag2 = $dtp2->CTags[$k]; - if ($ctag2->GetName() == 'trim') { - $this->artNotes[$field]['trim'][$t][0] = str_replace('#n#', ' ', $ctag2->GetInnerText()); - $this->artNotes[$field]['trim'][$t][1] = $ctag2->GetAtt('replace'); - $t++; - } else if ($ctag2->GetName() == 'match') { - $this->artNotes[$field]['match'] = str_replace('#n#', ' ', $ctag2->GetInnerText()); - } else if ($ctag2->GetName() == 'function') { - $this->artNotes[$field]['function'] = $ctag2->GetInnerText(); - } - } - } - } //End Loop - - $dtp->Clear(); - $dtp2->Clear(); - } - - /** - * 下载其中一个网址,并保存 - * - * @access public - * @param int $aid 文档ID - * @param string $dourl 操作地址 - * @param string $litpic 缩略图 - * @param bool $issave 是否保存 - * @return string - */ - function DownUrl($aid, $dourl, $litpic = '', $issave = TRUE) - { - $this->tmpLinks = array(); - $this->tmpUnitValue = ''; - $this->breImage = ''; - $this->tmpHtml = $this->DownOnePage($dourl); - - //检测是否有分页字段,并预先处理 - if (!empty($this->artNotes['sppage'])) { - $noteid = ''; - foreach ($this->artNotes as $k => $sarr) { - if (isset($sarr['isunit']) && $sarr['isunit'] == 1) { - $noteid = $k; - break; - } - } - - $this->GetSpPage($dourl, $noteid, $this->tmpHtml); - - if (preg_match("/#p#/i", $this->tmpUnitValue)) { - if ($this->artNotes["sptype"] != 'diyrule') { - $this->tmpUnitValue = '副标题#e#' . $this->tmpUnitValue; - } - } - } - - //处理字段 - $body = $this->GetPageFields($dourl, $issave, $litpic); - - //保存资料到数据库 - if ($issave) { - $query = " UPDATE `#@__co_htmls` SET dtime='" . time() . "',result='" . addslashes($body) . "',isdown='1' WHERE aid='$aid' "; - if (!$this->dsql->ExecuteNoneQuery($query)) { - echo $this->dsql->GetError(); - } - return $body; - } - return $body; - } - - // 解析地址 - function GetUrl($uri) - { - $arr = $tmp = array(); - - // query - $x = array_pad(explode('?', $uri), 2, false); - $arr['query'] = ($x[1]) ? $x[1] : ''; - - // resource - $x = array_pad(explode('/', $x[0]), 2, false); - $x_last = array_pop($x); - if (strpos($x_last, '.') === false) { - $arr['resource'] = ''; - $x[] = $x_last; - } else { - $arr['resource'] = $x_last; - $tmp = @explode('.', $arr['resource']); - $arr['file'] = @$tmp[0]; - $arr['ext'] = '.' . @$tmp[1]; - } - - // path - $arr['path'] = implode('/', $x); - if (substr($arr['path'], -1) !== '/') $arr['path'] .= '/'; - - // url - $arr['url'] = $uri; - - return $arr; - } - - /** - * 获取分页区域的内容 - * - * @access public - * @param string $dourl 操作地址 - * @param string $noteid 节点ID - * @param string $html html内容 - * @param int $step 步骤 - * @return string - */ - function GetSpPage($dourl, $noteid, $html, $step = 0) - { - $sarr = $this->artNotes[$noteid]; - - $linkareaHtml = $this->GetHtmlArea('[内容]', $this->artNotes['sppage'], $html); - if ($linkareaHtml == '') { - if ($this->tmpUnitValue == '') { - $this->tmpUnitValue .= $this->GetHtmlArea('[内容]', $sarr['match'], $html); - } else { - $this->tmpUnitValue .= "#p#副标题#e#" . $this->GetHtmlArea('[内容]', $sarr['match'], $html); - } - if ($this->artNotes["sptype"] != 'diyrule') return; - } - - - //完整的分页列表 - if ($this->artNotes["sptype"] == 'full' || $this->artNotes["sptype"] == '') { - $this->tmpUnitValue .= $this->GetHtmlArea('[内容]', $sarr['match'], $html); - $this->cDedeHtml->GetLinkType = "link"; - $this->cDedeHtml->SetSource($linkareaHtml, $dourl, 'link'); - foreach ($this->cDedeHtml->Links as $k => $t) { - $k = $this->cDedeHtml->FillUrl($k); - if ($k == $dourl) { - continue; - } - $nhtml = $this->DownOnePage($k); - if ($nhtml != '') { - $ct = trim($this->GetHtmlArea('[内容]', $sarr['match'], $nhtml)); - if ($ct != '') { - $this->tmpUnitValue .= "#p#副标题#e#" . $ct; - } - } - } - } else if ($this->artNotes["sptype"] == 'diyrule') { - $maxpage = 10; - $urlinfo = $this->GetUrl($dourl); - $testurl = str_replace(array_keys($urlinfo), array_values($urlinfo), $this->artNotes['sppage']); - $testurl = str_ireplace('{p}', '~p~', $testurl); - $testurl = str_replace(array('{', '}'), '', $testurl); - $lastchash = md5($html); - for ($i = $this->spNotes['srul']; $i <= $this->spNotes['erul']; $i++) { - $tempurl = str_replace('~p~', $i, $testurl); - $tempurl = $this->cDedeHtml->FillUrl($tempurl); - - $nhtml = $this->DownOnePage($tempurl); - $newchash = md5($nhtml); - if ($newchash == $lastchash) continue; - $lastchash = $newchash; - - if ($nhtml != '') { - $ct = trim($this->GetHtmlArea('[内容]', $sarr['match'], $nhtml)); - if ($ct != '') { - $this->tmpUnitValue .= "#p#副标题#e#" . $ct; - // echo $this->tmpUnitValue;exit; - } - } - } - } - //上下页形式或不完整的分页列表 - else { - if ($step > 50) { - return; - } - if ($step == 0) { - $this->tmpUnitValue .= $this->GetHtmlArea('[内容]', $sarr['match'], $html); - } - $this->cDedeHtml->GetLinkType = "link"; - $this->cDedeHtml->SetSource($linkareaHtml, $dourl, 'link'); - $hasLink = FALSE; - foreach ($this->cDedeHtml->Links as $k => $t) { - $k = $this->cDedeHtml->FillUrl($k); - if (in_array($k, $this->tmpLinks)) { - continue; - } else { - $nhtml = $this->DownOnePage($k); - if ($nhtml != '') { - $ct = trim($this->GetHtmlArea('[内容]', $sarr['match'], $nhtml)); - if ($ct != '') { - $this->tmpUnitValue .= "#p#副标题#e#" . $ct; - } - } - $hasLink = TRUE; - $this->tmpLinks[] = $k; - $dourl = $k; - $step++; - } - } - if ($hasLink) { - $this->GetSpPage($dourl, $noteid, $nhtml, $step); - } - } - } - - /** - * 获取特定区域的HTML - * - * @access public - * @param string $sptag 区域标记 - * @param string $areaRule 地址规则 - * @param string $html html代码 - * @return string - */ - function GetHtmlArea($sptag, &$areaRule, &$html) - { - //用正则表达式的模式匹配 - if ($this->noteInfos['matchtype'] == 'regex') { - $areaRule = str_replace("/", "\\/", $areaRule); - $areaRules = explode($sptag, $areaRule); - $arr = array(); - if ($html == '' || $areaRules[0] == '') { - return ''; - } - preg_match('#' . $areaRules[0] . "(.*)" . $areaRules[1] . "#isU", $html, $arr); - return empty($arr[1]) ? '' : trim($arr[1]); - } - - //用字符串模式匹配 - else { - $areaRules = explode($sptag, $areaRule); - if ($html == '' || $areaRules[0] == '') { - return ''; - } - $posstart = @strpos($html, $areaRules[0]); - if ($posstart === FALSE) { - return ''; - } - $posstart = $posstart + strlen($areaRules[0]); - $posend = @strpos($html, $areaRules[1], $posstart); - if ($posend > $posstart && $posend !== FALSE) { - //return substr($html,$posstart+strlen($areaRules[0]),$posend-$posstart-strlen($areaRules[0])); - return substr($html, $posstart, $posend - $posstart); - } else { - return ''; - } - } - } - - /** - * 下载指定网址 - * - * @access public - * @param string $dourl 下载地址 - */ - function DownOnePage($dourl) - { - $this->cHttpDown->OpenUrl($dourl); - $html = $this->cHttpDown->GetHtml(); - $this->cHttpDown->Close(); - $this->ChangeCode($html); - return $html; - } - - /** - * 下载特定资源,并保存为指定文件 - * - * @access public - * @param string $dourl 操作地址 - * @param string $mtype 附件类型 - * @param string $islitpic 是否缩略图 - * @return string - */ - function DownMedia($dourl, $mtype = 'img', $islitpic = FALSE) - { - global $notckpic; - if (empty($notckpic)) { - $notckpic = 0; - } - - //检测是否已经下载此文件 - $wi = FALSE; - $tofile = $filename = ''; - if ($notckpic == 0) { - $row = $this->dsql->GetOne("SELECT hash,tofile FROM `#@__co_mediaurls` WHERE nid='{$this->noteId}' AND hash='" . md5($dourl) . "' "); - if (isset($row['tofile'])) { - $tofile = $filename = $row['tofile']; - } - } - - //如果不存在,下载文件 - if ($tofile == '' || !file_exists($GLOBALS['cfg_basedir'] . $filename)) { - $filename = $this->GetRndName($dourl, $mtype); - if (!preg_match("#^\/#", $filename)) { - $filename = "/" . $filename; - } - - //防盗链模式 - if ($this->noteInfos['isref'] == 'yes' && $this->noteInfos['refurl'] != '') { - if ($this->noteInfos['exptime'] == '') { - $this->noteInfos['exptime'] = 10; - } - DownImageKeep($dourl, $this->noteInfos['refurl'], $GLOBALS['cfg_basedir'] . $filename, '', 0, $this->Item['exptime']); - } - - //普通模式 - else { - $this->cHttpDown->OpenUrl($dourl); - $this->cHttpDown->SaveToBin($GLOBALS['cfg_basedir'] . $filename); - $this->cHttpDown->Close(); - } - - //下载文件成功,保存记录 - if (file_exists($GLOBALS['cfg_basedir'] . $filename)) { - if ($tofile == '') { - $query = "INSERT INTO `#@__co_mediaurls`(nid,hash,tofile) VALUES ('" . $this->noteId . "', '" . md5($dourl) . "', '" . addslashes($filename) . "');"; - } else { - $query = "UPDATE `#@__co_mediaurls` SET tofile='" . addslashes($filename) . "' WHERE hash='" . md5($dourl) . "' "; - } - $this->dsql->ExecuteNoneQuery($query); - } - } - - //如果下载图片失败或图片不存在,返回网址 - if (!file_exists($GLOBALS['cfg_basedir'] . $filename)) { - return $dourl; - } - - //生成缩略图 - if ($mtype == 'img' && !$islitpic && $this->breImage == '') { - $this->breImage = $filename; - if (!preg_match("#^http:\/\/#", $this->breImage) && file_exists($GLOBALS['cfg_basedir'] . $filename)) { - $filenames = explode('/', $filename); - $filenamed = $filenames[count($filenames) - 1]; - $nfilename = str_replace('.', '_lit.', $filenamed); - $nfilename = str_replace($filenamed, $nfilename, $filename); - if (@copy($GLOBALS['cfg_basedir'] . $filename, $GLOBALS['cfg_basedir'] . $nfilename)) { - ImageResize($GLOBALS['cfg_basedir'] . $nfilename, $GLOBALS['cfg_ddimg_width'], $GLOBALS['cfg_ddimg_height']); - $this->breImage = $nfilename; - } - } - } - if ($mtype == 'img' && !$islitpic) { - @WaterImg($GLOBALS['cfg_basedir'] . $filename, 'collect'); - } - return $filename; - } - - /** - * 获得下载媒体的随机名称 - * - * @access public - * @param string $url 地址 - * @param string $v 值 - * @return string - */ - function GetRndName($url, $v) - { - global $cfg_image_dir, $cfg_dir_purview; - $this->mediaCount++; - $mnum = $this->mediaCount; - $timedir = "c" . MyDate("ymd", time()); - //存放路径 - $fullurl = preg_replace("#\/{1,}#", "/", $cfg_image_dir . "/"); - if (!is_dir($GLOBALS['cfg_basedir'] . "/$fullurl")) { - MkdirAll($GLOBALS['cfg_basedir'] . "/$fullurl", $cfg_dir_purview); - } - - $fullurl = $fullurl . $timedir . "/"; - if (!is_dir($GLOBALS['cfg_basedir'] . "/$fullurl")) { - MkdirAll($GLOBALS['cfg_basedir'] . "/$fullurl", $cfg_dir_purview); - } - - //文件名称 - $timename = str_replace('.', '', ExecTime()); - $threadnum = 0; - if (isset($_GET['threadnum'])) { - $threadnum = intval($_GET['threadnum']); - } - $filename = dd2char($timename . $threadnum . '-' . $mnum . mt_rand(1000, 9999)); - - //分配扩展名 - $urls = explode('.', $url); - if ($v == 'img') { - $shortname = '.jpg'; - if (preg_match("#\.gif$#i", $url)) { - $shortname = '.gif'; - } else if (preg_match("#\.png$#i", $url)) { - $shortname = '.png'; - } - } else if ($v == 'embed') { - $shortname = '.swf'; - } else { - $shortname = ''; - } - $fullname = $fullurl . $filename . $shortname; - return preg_replace("#\/{1,}#", "/", $fullname); - } - - /** - * 按载入的网页内容获取规则,从一个HTML文件中获取内容 - * - * @access public - * @param string $dourl 操作地址 - * @param string $needDown 需要下载 - * @param string $litpic 缩略图 - * @return string - */ - function GetPageFields($dourl, $needDown, $litpic = '') - { - global $cfg_auot_description; - if ($this->tmpHtml == '') { - return ''; - } - $artitem = ''; - $isPutUnit = FALSE; - $tmpLtKeys = array(); - $inarr = array(); - - //自动分析关键字和摘要 - preg_match("#tmpHtml, $inarr); - preg_match("#tmpHtml, $inarr2); - if (!isset($inarr[1]) && isset($inarr2[1])) { - $inarr[1] = $inarr2[1]; - } - if (isset($inarr[1])) { - $keywords = trim(cn_substr(html2text($inarr[1]), 30)); - $keywords = preg_replace("#" . $this->artNotes['keywordtrim'] . "#isU", '', $keywords); - if (!preg_match("#,#", $keywords)) { - $keywords = str_replace(' ', ',', $keywords); - } - $artitem .= "{dede:field name='keywords'}" . $keywords . "{/dede:field}\r\n"; - } else { - $artitem .= "{dede:field name='keywords'}{/dede:field}\r\n"; - } - // preg_match("#tmpHtml, $inarr); - // preg_match("#tmpHtml, $inarr2); - preg_match("#]*?)['\"]#iU", $this->tmpHtml, $inarr); - preg_match("#]*?)['\"][\s]+name=['\"]description['\"]#iU", $this->tmpHtml, $inarr2); - if (!isset($inarr[1]) && isset($inarr2[1])) { - $inarr[1] = $inarr2[1]; - } - if (isset($inarr[1])) { - $description = trim(cn_substr(html2text($inarr[1]), $cfg_auot_description)); - $description = preg_replace("/" . $this->artNotes['descriptiontrim'] . "/isU", '', $description); - $artitem .= "{dede:field name='description'}" . $description . "{/dede:field}\r\n"; - } else { - $artitem .= "{dede:field name='description'}{/dede:field}\r\n"; - } - - foreach ($this->artNotes as $k => $sarr) { - //可能出现意外的情况 - if ($k == 'sppage' || $k == 'sptype') { - continue; - } - if (!is_array($sarr)) { - continue; - } - - //特殊的规则或没匹配选项 - if ($sarr['match'] == '' || trim($sarr['match']) == '[内容]') { - if ($sarr['value'] != '[内容]') { - $v = trim($sarr['value']); - } else { - $v = ''; - } - } else { - //分多页的内容 - if ($this->tmpUnitValue != '' && !$isPutUnit && $sarr['isunit'] == 1) { - $v = $this->tmpUnitValue; - $isPutUnit = TRUE; - } else { - $v = $this->GetHtmlArea('[内容]', $sarr['match'], $this->tmpHtml); - } - - //过滤内容规则 - if (isset($sarr['trim']) && $v != '') { - foreach ($sarr['trim'] as $nv) { - if ($nv[0] == '') { - continue; - } - $nvs = str_replace("/", "\\/", $nv[0]); - $v = preg_replace("#" . $nvs . "#isU", $nv[1], $v); - } - } - - //是否下载远程资源 - if ($needDown) { - if ($sarr['isdown'] == '1') { - $v = $this->DownMedias($v, $dourl); - } - } else { - if ($sarr['isdown'] == '1') { - $v = $this->MediasReplace($v, $dourl); - } - } - } - $v = trim($v); - - //用户自行对内容进行处理的接口 - if ($sarr['function'] != '') { - $tmpLtKeys[$k]['v'] = $v; - $tmpLtKeys[$k]['f'] = $sarr['function']; - } else { - $v = preg_replace("#( )$#", '', $v); - $v = preg_replace("#[\r\n\t ]{1,}$#", '', $v); - $artitem .= "{dede:field name='$k'}$v{/dede:field}\r\n"; - } - } //End Foreach - - //处理带函数的项目 - foreach ($tmpLtKeys as $k => $sarr) { - $v = $this->RunPHP($sarr['v'], $sarr['f']); - $v = preg_replace("#( )$#", '', $v); - $v = preg_replace("#[\r\n\t ]{1,}$#", '', $v); - $artitem .= "{dede:field name='$k'}$v{/dede:field}\r\n"; - } - if ($litpic != '' && $this->lists['listpic'] == 1) { - $artitem .= "{dede:field name='litpic'}" . $this->DownMedia($litpic, 'img', TRUE) . "{/dede:field}\r\n"; - } else { - $artitem .= "{dede:field name='litpic'}" . $this->breImage . "{/dede:field}\r\n"; - } - return $artitem; - } - - /** - * 下载内容里的资源 - * - * @access public - * @param string $html html内容 - * @param string $url 地址 - * @return string - */ - function DownMedias(&$html, $url) - { - $this->cDedeHtml->SetSource($html, $url, 'media'); - - //下载标记里的图片和flash - foreach ($this->cDedeHtml->Medias as $k => $v) { - $furl = $this->cDedeHtml->FillUrl($k); - if ($v == 'embed' && !preg_match("#\.(swf)\?(.*)$#i", $k) && !preg_match("#\.(swf)$#i", $k)) { - continue; - } - $okurl = $this->DownMedia($furl, $v); - $html = str_replace($k, $okurl, $html); - } - - //下载超链接里的图片 - foreach ($this->cDedeHtml->Links as $v => $k) { - if (preg_match("#\.(jpg|gif|png)\?(.*)$#i", $v) || preg_match("#\.(jpg|gif|png)$#i", $v)) { - $m = "img"; - } else if (preg_match("#\.(swf)\?(.*)$#i", $v) || preg_match("#\.(swf)$#i", $v)) { - $m = "embed"; - } else { - continue; - } - $furl = $this->cDedeHtml->FillUrl($v); - $okurl = $this->DownMedia($furl, $m); - $html = str_replace($v, $okurl, $html); - } - return $html; - } - - /** - * 仅替换内容里的资源为绝对网址 - * - * @access public - * @param string $html html内容 - * @param string $dourl 操作地址 - * @return string - */ - function MediasReplace(&$html, $dourl) - { - $this->cDedeHtml->SetSource($html, $dourl, 'media'); - foreach ($this->cDedeHtml->Medias as $k => $v) { - $k = trim($k); - $okurl = $this->cDedeHtml->FillUrl($k); - $html = str_replace($k, $okurl, $html); - } - return $html; - } - - //测试列表 - function Testlists(&$dourl) - { - $links = array(); - - //从RSS中获取网址 - if ($this->lists['sourcetype'] == 'rss') { - $dourl = $this->lists['rssurl']; - $links = GetRssLinks($dourl); - return $links; - } - - //正常情况 - if (isset($this->lists['url'][0][0])) { - $dourl = $this->lists['url'][0][0]; - } else { - $dourl = ''; - $this->errString = "配置中指定列表的网址错误!\r\n"; - return $links; - } - $dhtml = new DedeHtml2(); - $html = $this->DownOnePage($dourl); - if ($html == '') { - $this->errString = "读取网址: $dourl 时失败!\r\n"; - return $links; - } - if (trim($this->lists['areastart']) != '' && trim($this->lists['areaend']) != '') { - $areabody = $this->lists['areastart'] . '[var:区域]' . $this->lists['areaend']; - $html = $this->GetHtmlArea('[var:区域]', $areabody, $html); - } - $t1 = ExecTime(); - $dhtml->SetSource($html, $dourl, 'link'); - $this->lists['musthas'] = str_replace('/', '\/', $this->lists['musthas']); - foreach ($dhtml->Links as $s) { - if ($this->lists['nothas'] != '') { - if (preg_match("#" . $this->lists['nothas'] . "#i", $s['link'])) { - continue; - } - } - if ($this->lists['musthas'] != '') { - if (!preg_match("#" . $this->lists['musthas'] . "#i", $s['link'])) { - continue; - } - } - $links[] = $s; - } - return $links; - } - - /** - * 测试文章规则 - * - * @access public - * @param $dourl 操作地址 - * @return string - */ - function TestArt($dourl) - { - return $this->DownUrl(0, $dourl, '', FALSE); - } - - /** - * 采集种子网址 - * - * @access public - * @param int $islisten 是否监听 - * @param int $glstart 采集开始 - * @param int $pagesize 分页尺寸 - * @return string - */ - function GetSourceUrl($islisten = 0, $glstart = 0, $pagesize = 10) - { - //在第一页中进行预处理 - //“下载种子网址的未下载内容”的模式不需要经过采集种子网址的步骤 - if ($glstart == 0) { - //重新采集所有内容模式 - if ($islisten == -1) { - $this->dsql->ExecuteNoneQuery("DELETE FROM `#@__co_urls` WHERE nid='" . $this->noteId . "'"); - $this->dsql->ExecuteNoneQuery("DELETE FROM `#@__co_htmls` WHERE nid='" . $this->noteId . "' "); - } - //监听模式(保留未导出的内容、保留节点的历史网址记录) - else { - $this->dsql->ExecuteNoneQuery("DELETE FROM `#@__co_htmls` WHERE nid='" . $this->noteId . "' AND isexport=1 "); - } - } - - //从RSS中获取种子 - if ($this->lists['sourcetype'] == 'rss') { - $links = GetRssLinks($this->lists['rssurl']); - //if($this->noteInfos['cosort']!='asc') - $tmplink = krsort($links); - $lk = 0; - foreach ($links as $v) { - if ($islisten == 1) { - $lrow = $this->dsql->GetOne("SELECT * FROM `#@__co_urls` WHERE nid='{$this->noteId}' AND hash='" . md5($v['link']) . "' "); - if (is_array($lrow)) { - continue; - } - } - $lk++; - if ($mytotal > 0 && $lk >= $mytotal) break; - $inquery = "INSERT INTO `#@__co_htmls` (`nid` ,`typeid`, `title` , `litpic` , `url` , `dtime` , `isdown` , `isexport` , `result`) - VALUES ('{$this->noteId}' , '0', '" . addslashes($v['title']) . "' , '" . addslashes($v['image']) . "' , '" . addslashes($v['link']) . "' , 'dtime' , '0' , '0' , ''); "; - $this->dsql->ExecuteNoneQuery($inquery); - - $inquery = "INSERT INTO `#@__co_urls`(hash,nid) VALUES ('" . md5($v['link']) . "','{$this->noteId}');"; - $this->dsql->ExecuteNoneQuery($inquery); - } - return 0; - } else { - $tmplink = array(); - $arrStart = 0; - $moviePostion = 0; - $endpos = $glstart + $pagesize; - $totallen = count($this->lists['url']); - //dump($this->lists['url']);exit; - foreach ($this->lists['url'] as $k => $cururls) { - //$status = FALSE; - $urlnum = 0; - $cururl = $cururls[0]; - $typeid = (empty($cururls[1]) ? 0 : $cururls[1]); - $moviePostion++; - - if ($moviePostion > $endpos) { - break; - } - if ($moviePostion > $glstart) { - $html = $this->DownOnePage($cururl); - if (trim($this->lists['areastart']) != '' && trim($this->lists['areaend']) != '') { - $areabody = $this->lists['areastart'] . '[var:区域]' . $this->lists['areaend']; - $html = $this->GetHtmlArea('[var:区域]', $areabody, $html); - } - $this->cDedeHtml->SetSource($html, $cururl, 'link'); - $lk = 0; - foreach ($this->cDedeHtml->Links as $k => $v) { - if ($this->lists['nothas'] != '') { - if (preg_match("#" . $this->lists['nothas'] . "#", $v['link'])) { - continue; - } - } - if ($this->lists['musthas'] != '') { - if (!preg_match("#" . $this->lists['musthas'] . "#i", $v['link'])) { - continue; - } - } - $tmplink[$arrStart][0] = $v; - $tmplink[$arrStart][1] = $typeid; - $arrStart++; - $lk++; - } - $this->cDedeHtml->Clear(); - } - } //foreach - //if($this->noteInfos['cosort']!='asc') - - krsort($tmplink); - $unum = count($tmplink); - if ($unum > 0) { - //echo "完成本次种子网址抓取,共找到:{$unum} 个记录!
\r\n"; - foreach ($tmplink as $vs) { - $v = $vs[0]; - $typeid = $vs[1]; - if ($islisten == 1) { - $lrow = $this->dsql->GetOne("SELECT * FROM `#@__co_urls` WHERE nid='{$this->noteId}' AND hash='" . md5($v['link']) . "' "); - if (is_array($lrow)) { - continue; - } - } - $inquery = "INSERT INTO `#@__co_htmls` (`nid` ,`typeid`, `title` , `litpic` , `url` , `dtime` , `isdown` , `isexport` , `result`) - VALUES ('{$this->noteId}' ,'$typeid', '" . addslashes($v['title']) . "' , '" . addslashes($v['image']) . "' , '" . addslashes($v['link']) . "' , '" . time() . "' , '0' , '0' , ''); "; - $this->dsql->ExecuteNoneQuery($inquery); - - $inquery = "INSERT INTO `#@__co_urls`(hash,nid) VALUES ('" . md5($v['link']) . "','{$this->noteId}');"; - $this->dsql->ExecuteNoneQuery($inquery); - } - if ($endpos >= $totallen) { - return 0; - } else { - return ($totallen - $endpos); - } - } else { - //仅在第一批采集时出错才返回 - if ($glstart == 0) { - return -1; - } - - //在其它页出错照常采集后面内容 - if ($endpos >= $totallen) { - return 0; - } else { - return ($totallen - $endpos); - } - } - } - } - - /** - * 用扩展函数处理采集到的原始数据 - * - * @access public - * @param string $fvalue 值 - * @param string $phpcode PHP代码 - * @return string - */ - function RunPHP($fvalue, $phpcode) - { - $DedeMeValue = $fvalue; - $phpcode = preg_replace("#'@me'|\"@me\"|@me#isU", '$DedeMeValue', $phpcode); - if (preg_match("#@body#i", $phpcode)) { - $DedeBodyValue = $this->tmpHtml; - $phpcode = preg_replace("#'@body'|\"@body\"|@body#isU", '$DedeBodyValue', $phpcode); - } - if (preg_match("#@litpic#i", $phpcode)) { - $DedeLitPicValue = $this->breImage; - $phpcode = preg_replace("#'@litpic'|\"@litpic\"|@litpic#isU", '$DedeLitPicValue', $phpcode); - } - eval($phpcode . ";"); - return $DedeMeValue; - } - - /** - * 编码转换 - * - * @access public - * @param string $str 字符串 - * @return string - */ - function ChangeCode(&$str) - { - global $cfg_soft_lang; - if ($cfg_soft_lang == 'utf-8') { - if ($this->noteInfos["sourcelang"] == "gb2312") { - $str = gb2utf8($str); - } - if ($this->noteInfos["sourcelang"] == "big5") { - $str = gb2utf8(big52gb($str)); - } - } else { - if ($this->noteInfos["sourcelang"] == "utf-8") { - $str = utf82gb($str); - } - if ($this->noteInfos["sourcelang"] == "big5") { - $str = big52gb($str); - } - } - } -}//End Class \ No newline at end of file diff --git a/src/include/dedehtml2.class.php b/src/include/dedehtml2.class.php deleted file mode 100755 index 67fb8672..00000000 --- a/src/include/dedehtml2.class.php +++ /dev/null @@ -1,672 +0,0 @@ -CAtt = ''; - $this->SourceHtml = ''; - $this->Title = ''; - $this->Medias = Array(); - $this->MediaInfos = Array(); - $this->Links = Array(); - $this->BaseUrl = ''; - $this->BaseUrlPath = ''; - $this->HomeUrl = ''; - $this->IsHead = false; - $this->ImgHeight = 30; - $this->ImgWidth = 50; - $this->GetLinkType = 'link'; - } - - function DedeHtml2() - { - $this->__construct(); - } - - /** - * 设置HTML的内容和来源网址 - * - * @access public - * @param string $html html资源 - * @param string $url 地址 - * @param string $linktype 连接类型 - * @return void - */ - function SetSource(&$html, $url = '', $linktype='') - { - $this->__construct(); - $this->CAtt = new DedeAttribute2(); - $url = trim($url); - $this->SourceHtml = $html; - $this->BaseUrl = $url; - //判断文档相对于当前的路径 - $urls = @parse_url($url); - $this->HomeUrl = $urls['host']; - $this->BaseUrlPath = $this->HomeUrl.$urls['path']; - $this->BaseUrlPath = preg_replace("/\/([^\/]*)\.(.*)$/","/",$this->BaseUrlPath); - $this->BaseUrlPath = preg_replace("/\/$/",'',$this->BaseUrlPath); - if($linktype!='') - { - $this->GetLinkType = $linktype; - } - if($html != '') - { - $this->Analyser(); - } - } - - /** - * 解析HTML - * - * @access private - * @return void - */ - function Analyser() - { - $cAtt = new DedeAttribute2(); - $cAtt->IsTagName = false; - $c = ''; - $i = 0; - $startPos = 0; - $endPos = 0; - $wt = 0; - $ht = 0; - $scriptdd = 0; - $attStr = ''; - $tmpValue = ''; - $tmpValue2 = ''; - $tagName = ''; - $hashead = 0; - $slen = strlen($this->SourceHtml); - if($this->GetLinkType=='link' || $this->GetLinkType=='') - { - $needTags = array('a'); - } - if($this->GetLinkType=='media') - { - $needTags = array('img','embed','a'); - $this->IsHead = true; - } - $tagbreaks = array(' ','<','>',"\r","\n","\t"); - for(;isset($this->SourceHtml[$i]);$i++) - { - if($this->SourceHtml[$i]=='<') - { - $tagName = ''; - $j = 0; - for($i=$i+1; isset($this->SourceHtml[$i]); $i++) - { - if($j>10) - { - break; - } - $j++; - if( in_array($this->SourceHtml[$i],$tagbreaks) ) - { - break; - } - else - { - $tagName .= $this->SourceHtml[$i]; - } - } - $tagName = strtolower($tagName); - - //标记为注解 - if($tagName=='!--') - { - $endPos = strpos($this->SourceHtml,'-->',$i); - if($endPos !== false) - { - $i=$endPos+3; - } - continue; - } - - //标记在指定集合内 - else if( in_array($tagName,$needTags) ) - { - $startPos = $i; - $endPos = strpos($this->SourceHtml,'>',$i+1); - if($endPos===false) - { - break; - } - $attStr = substr($this->SourceHtml,$i+1,$endPos-$startPos-1); - $cAtt->SetSource($attStr); - if($tagName=='img') - { - $this->InsertMedia($cAtt->GetAtt('src'),'img'); - } - else if($tagName=='embed') - { - $rurl = $this->InsertMedia($cAtt->GetAtt('src'),'embed'); - if($rurl != '') - { - $this->MediaInfos[$rurl][0] = $cAtt->GetAtt('width'); - $this->MediaInfos[$rurl][1] = $cAtt->GetAtt('height'); - } - } - else if($tagName=='a') - { - $this->InsertLink($this->FillUrl($cAtt->GetAtt('href')),$this->GetInnerText($i,'a')); - } - } - else - { - continue; - } - $i--; - }//End if char - - }//End for - - if($this->Title == '') - { - $this->Title = $this->BaseUrl; - } - } - - /** - * 重置资源 - * - * @access private - * @return void - */ - function Clear() - { - $this->CAtt = ''; - $this->SourceHtml = ''; - $this->Title = ''; - $this->Links = ''; - $this->Medias = ''; - $this->BaseUrl = ''; - $this->BaseUrlPath = ''; - } - - /** - * 分析链接 - * - * @access public - * @param string $url 地址 - * @param string $mtype 媒体类型 - * @return string - */ - function InsertMedia($url, $mtype) - { - if( preg_match("/^(javascript:|#|'|\")/", $url) ) - { - return ''; - } - if($url == '') - { - return ''; - } - $this->Medias[$url]=$mtype; - return $url; - } - - /** - * 分析链接 - * - * @access public - * @param string $url 地址 - * @param string $atitle 文档 - * @return string - */ - function InsertLink($url, $atitle) - { - if( preg_match("/^(javascript:|#|'|\")/", $url) ) - { - return ''; - } - if($url == '') - { - return ''; - } - if( preg_match('/^img:/', $atitle) ) - { - list($aimg, $atitle) = explode(':txt:', $atitle); - if(!isset($this->Links[$url])) - { - if($atitle != '') - { - $this->Links[$url]['title'] = cn_substr($atitle,50); - } - else - { - $this->Links[$url]['title'] = preg_replace('/img:/', '', $aimg); - } - $this->Links[$url]['link'] = $url; - } - $this->Links[$url]['image'] = preg_replace('/img:/', '', $aimg); - $this->InsertMedia($this->Links[$url]['image'], 'img'); - } - else - { - if(!isset($this->Links[$url])) - { - $this->Links[$url]['image'] = ''; - $this->Links[$url]['title'] = $atitle; - $this->Links[$url]['link'] = $url; - } - else - { - if(strlen($this->Links[$url]['title']) < strlen($atitle)) $this->Links[$url]['title'] = $atitle; - } - } - return $url; - } - - /** - * 分析content-type中的字符类型 - * - * @access public - * @param string $att 属性字符串 - * @return string - */ - function ParCharSet($att) - { - $startdd=0; - $taglen=0; - $startdd = strpos($att,'='); - if($startdd===false) - { - return ''; - } - else - { - $taglen = strlen($att)-$startdd-1; - if($taglen<=0) - { - return ''; - } - return trim(substr($att, $startdd+1, $taglen)); - } - } - - /** - * 补全相对网址 - * - * @access public - * @param string $surl 地址 - * @return string - */ - function FillUrl($surl) - { - $i = $pathStep = 0; - $dstr = $pstr = $okurl = ''; - - $surl = trim($surl); - if($surl == '') - { - return ''; - } - $pos = strpos($surl,'#'); - if($pos>0) - { - $surl = substr($surl,0,$pos); - } - if($surl[0]=='/') - { - $okurl = $this->HomeUrl.'/'.$surl; - } - else if($surl[0]=='.') - { - if(!isset($surl[2])) - { - return ''; - } - else if($surl[0]=='/') - { - $okurl = $this->BaseUrlPath."/".substr($surl,2,strlen($surl)-2); - } - else - { - $urls = explode('/',$surl); - foreach($urls as $u) - { - if($u=='..') - { - $pathStep++; - } - else if($iBaseUrlPath); - if(count($urls) <= $pathStep) - { - return ''; - } - else - { - $pstr = ''; - for($i=0;$iBaseUrlPath.'/'.$surl; - } - else if( strtolower(substr($surl,0,7))=='http://' ) - { - $okurl = preg_replace('/^http:\/\//i', '', $surl); - } - else - { - $okurl = $this->BaseUrlPath.'/'.$surl; - } - } - $okurl = preg_replace('/\/{1,}/i', '/', $okurl); - return 'http://'.$okurl; - } - - /** - * 获得和下一个标记之间的文本内容 - * - * @access public - * @param string $pos 位置地址 - * @param string $tagname 标签名称 - * @return string - */ - function GetInnerText(&$pos,$tagname) - { - $startPos=0; - $endPos=0; - $textLen=0; - $str = ''; - $startPos = strpos($this->SourceHtml,'>',$pos); - - if($tagname=='title') - { - $endPos = strpos($this->SourceHtml,'<',$startPos); - } - else - { - $endPos1 = strpos($this->SourceHtml,'SourceHtml,' $startPos) - { - $textLen = $endPos-$startPos; - $str = substr($this->SourceHtml,$startPos+1,$textLen-1); - } - $pos = $startPos + $textLen + strlen(" \r\n\t]{1,}/isU",$str,$imgs); - if(isset($imgs[2][0])) - { - $txt = trim(Html2Text($str)); - $imgs[2][0] = preg_replace("/[\"']/",'',$imgs[2][0]); - return "img:".$this->FillUrl($imgs[2][0]).':txt:'.$txt; - } - else - { - $str = strip_tags($str); - //$str = preg_replace('/<\/(.*)$/i', '', $str); - //$str = trim(preg_replace('/^(.*)>/i','',$str)); - return $str; - } - } - } -}//End class - -/******************************* -//属性解析器 -function c____DedeAttribute2(); -********************************/ -class DedeAttribute2 -{ - var $SourceString = ''; - var $SourceMaxSize = 1024; - var $CharToLow = FALSE; //属性值是否不分大小写(属性名统一为小写) - var $IsTagName = TRUE; //是否解析标记名称 - var $Count = -1; - var $Items = array(); //属性元素的集合 - - //设置属性解析器源字符串 - function SetSource($str = '') - { - $this->Count = -1; - $this->Items =array(); - $strLen = 0; - $this->SourceString = trim(preg_replace("/[ \t\r\n]{1,}/"," ",$str)); - $strLen = strlen($this->SourceString); - $this->SourceString .= " "; //增加一个空格结尾,以方便处理没有属性的标记 - if($strLen>0&&$strLen<=$this->SourceMaxSize) - { - $this->PrivateAttParse(); - } - } - - //获得某个属性 - function GetAtt($str) - { - if($str == '') - { - return ''; - } - $str = strtolower($str); - if(isset($this->Items[$str])) - { - return $this->Items[$str]; - } - else - { - return ''; - } - } - - //判断属性是否存在 - function IsAtt($str) - { - if($str == '') - { - return false; - } - $str = strtolower($str); - if(isset($this->Items[$str])) - { - return true; - } - else - { - return false; - } - } - - //获得标记名称 - function GetTagName() - { - return $this->GetAtt("tagname"); - } - - // 获得属性个数 - function GetCount() - { - return $this->Count+1; - } - - //解析属性(仅给SetSource调用) - function PrivateAttParse() - { - $d = ''; - $tmpatt = ''; - $tmpvalue = ''; - $startdd = -1; - $ddtag = ''; - $strLen = strlen($this->SourceString); - $j = 0; - - //这里是获得标记的名称 - if($this->IsTagName) - { - //如果属性是注解,不再解析里面的内容,直接返回 - if(isset($this->SourceString[2])) - { - if($this->SourceString[0].$this->SourceString[1].$this->SourceString[2]=='!--') - { - $this->Items['tagname'] = '!--'; - return ; - } - } - for($i=0;$i<$strLen;$i++) - { - $d = $this->SourceString[$i]; - $j++; - if(preg_match("/[ '\"\r\n\t]/i", $d)) - { - $this->Count++; - $this->Items["tagname"]=strtolower(trim($tmpvalue)); - $tmpvalue = ''; break; - } - else - { - $tmpvalue .= $d; - } - } - if($j>0) - { - $j = $j-1; - } - } - - //遍历源字符串,获得各属性 - for($i=$j;$i<$strLen;$i++) - { - $d = $this->SourceString[$i]; - //获得属性的键 - if($startdd==-1) - { - if($d!='=') - { - $tmpatt .= $d; - } - else - { - $tmpatt = strtolower(trim($tmpatt)); - $startdd=0; - } - } - - //检测属性值是用什么包围的,允许使用 '' '' 或空白 - else if($startdd==0) - { - switch($d) - { - case ' ': - // continue; - break; - case '\'': - $ddtag='\''; - $startdd=1; - break; - case '"': - $ddtag='"'; - $startdd=1; - break; - default: - $tmpvalue.=$d; - $ddtag=' '; - $startdd=1; - break; - } - } - - //获得属性的值 - else if($startdd==1) - { - if($d==$ddtag) - { - $this->Count++; - if($this->CharToLow) - { - $this->Items[$tmpatt] = strtolower(trim($tmpvalue)); - } - else - { - $this->Items[$tmpatt] = trim($tmpvalue); - } - $tmpatt = ''; - $tmpvalue = ''; - $startdd=-1; - } - else - { - $tmpvalue.=$d; - } - } - }//End for - - //处理没有值的属性(必须放在结尾才有效)如:"input type=radio name=t1 value=aaa checked" - if($tmpatt != '') - { - $this->Items[$tmpatt] = ''; - } - }//End Function PrivateAttParse - -}//End Class DedeAttribute2 diff --git a/src/install/images/ajax-loader.gif b/src/install/images/ajax-loader.gif deleted file mode 100755 index f227c0f01dd979252933b9d0cf29ed4bd201fbb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 847 zcmZ?wbhEHb6krfw_`<;O|NsAzMUuaM|CqGRd-uf&qSkOCC{NjVp#CYGe8D3oWGWGEzNC069*C#L9S=B4E` zDE?$&-~t+__@CR)H6+;CF~HSG&w!Z`D5L|j1>{Hu)&K>CzLd;)OASPF6t!9sR;`^O za%`fMX~PG$n;i|&y(~6NnXLg61zH(9TNm}M(bQ@1jQX)iCF#R1k4Y0OT2`2<$yRil zW-HhTi+rk-J^H@i32HARvLzV`3SI7(dNQ=6jy_ni!a>Eg_P~LI*N!rA^h{|;%@7gd zIe0+9L6FPmK*NXRK=)=Qr!7yn1(?oIuvujqni9B8`-RfJ#pzQFR*0=zw6NbXTj0F1 zBLlZhfVly?4JS*30beAWg%&SoyRstGawcTU6M#Nc{yahBmWYQI*O34bPTeK#hVP9V zxvZQ|8+vc?XlZ)L=Ak!3<>tmp1`dIJ7tgTX$l}&(40mz3!xzc0$iRbBtX0RL&*=(R zU$%hPv$s5<_NL{`EHx_GyfK>mJl!x$nUO6Gf&^=W!W1S$k)sYPnw{m?)`%a=?rxgH zsOa=0!JeUUJJY@i%C1coRZf8s4avK67nN}fDJ@iZd1!G$V?rBmsM|8hqC1j&OAB6W zeop(}0JDY#*&2}FfU&p2fydQQ;Lu5l+*pa@J0(1NF0|dyU>E3OF=0}8uAw8b%uO-T zgCQb#21jGA>5{FCNiH5+*cevrOia?@>QikfFcwQbqP#)<2k#ptb`vx605z=${RWMm zUKN<7tjLzeLoM|HdW>V4g9*c-O~)LSJSTE&n6)s0!!ECt)zd(wL!wvC+k6wRhYtI} zPTi7bt)^yIDG`AshjlL|tmsHM!1PnVu#-b#!*qv!K4;LWP|LNxc=HdV5 zM)j$~<`CsjnFanmPoqwipKly1D>Ax4#%GEvLZ15db?IEPST` diff --git a/src/install/images/but_back.gif b/src/install/images/but_back.gif deleted file mode 100755 index 4b0bad0a41bb54ab0f20adb2dba1fcef25f67c36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1381 zcmV-r1)BOtNk%w1VQ2s$0OkMyRcAeyu5hK|Rh-^Z!0d8(i&@a~kEhFX_4o0#=vriW zNww#4kE>(A?0dE7WU9f5!0Uyh;Z&yMS*_26nZRbf?OeR-b6ROW%kX@DnOm&hXQIP$ zui1BWic`DlYpmsD!tHj-?}oS6fWGR3t>#jUt!uBxg0tm(napNhYDbBqWTN3$lDA|3 z|Npb+Yqigdtj%_?+kma*TF38+wBU4lky~wnPMx-Ol&xdX@s)&|V$<}Hr`KwxzInsv zgS+cyU2sCR&xO0`e6QweQforG*M((sO_Z%{$M1ry%zKNSYM;Vy#qN7(c}uk0d9B5Y zgq3Bw-G;H-YPIHse2ies?~I$Tc!sB2m9lBN(U7pQWjB}Jyz3XhI++nB7d4{24nyz(idsMT}e_wG#n!0UkfKbQgjlAD~t=4<9-hhFc zUaj71ptg98q->(eYybcN000000000000000000000000000000A^8LV2LS&7EC2ui z0B8Uq000O7fGr4OPY;HNh>41ejE#7+xCp4HyTK zC(+TtgKf^VXULdNy}I@5*l`y)!l1kN@7*;dz@7jMZx1qXt7%}NedOlY^0AOJOc;JCSqJ0MdU?7W0IAKE)4Kxsi4nTOJqJ1Ymkm8W>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2~A$l%5TG^krH4NpEPL#E{gti}fV7HlxN1}BW}28Vi31`l^qVTBL#GC)KBt`ZbX zgAXz=a6k?o)cJ%QXS5mzoj&BN@X7)p%(B57P@o0|0AS$6olp2cF#u1no3Xwx6ks0! zHW;yi4@cNw0}%yaP=*gbznn0o7Dx><1x}O^vYlrPTf!VEl;EioFGP(l2T|m3L7fa7 z;RXO|B*CzFcrakL)#+MbNY!{3jIjg~1PkNfEE;k5xqokvL7zOx0JsDj9DqRv1oy43 z-Vs;;!RDNI?)m4Sdw#Ueq?ZnO=$=b}!W%MdfJ5gS7_o;0sMj7k=9=5C`|iB=?)&c$ z;12xo#20To<|YiF{PN5<@BH)7M=$;K)K?$935MKphxOcd@BR1Rn?OW71QSePLh|6J zum1YgpI^rW2*6MW5$D%$|NZ#qumAr1_wWDz_#;9c>R<^3OrQ{wNT322$Up_cuLXes F06W!z)3*Qs diff --git a/src/install/images/ico-step-now.png b/src/install/images/ico-step-now.png deleted file mode 100755 index f6d2560d977255d484cda76601ffa903710e9864..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 326 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1SGu;4zvI%=3*z$5DpHG+YkL80J)q69+AZi z3|t>Tn9*sC$qb;NScz*yiE~kEVo7Fxo8J8-6O6PdGIEHY{)IGOQ@Q{HB+k^kA zneU4#l%jf>!dvyZH!xU-Tx899!KcH(c3pA>qe$QGSxJ^B0zV0{=zO^AuK#^Ptnl3I zO|=)E8Ead_YTPs}j82Mj@c1ON{VBr)`!kuFoVGV#DiC{V6tlf4hhK4_iCeM;uj0vX zN*T=O3&hS_&uM+WfOl{H?;kt>$j+1SGu;4zvI%=3*z$5DpHG+YkL80J)q69+AZi z3|t>Tn9*sC$qb;NScz*yiE~kEVo7Fxo8J8-6N@sbxIEHY{G(Bg?cd$T&{lWeH zKW)AFABYI;N-&kM>P(i1=n?Wy65-sf9O5JEvc{LkwTiQP@#*U3ljTkNCUMW7{)&^m zJNL;7WB|1DYJG(%Bagd?%+(USdDbs;QiFSdUDbi?hPUJJ(~2_=Px?*u)I zXFUAfDtX4yD5d}D*R8YpLZS=~@4Qf0E-AJCbI|*%59=eAbpB(QXyN>7idf4^peq?X MUHx3vIVCg!04H&Fq5uE@ diff --git a/src/install/images/leftbox-tbg.png b/src/install/images/leftbox-tbg.png deleted file mode 100755 index 4dd54288aae808a9496949aaca2d25d981eb5795..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3016 zcmV;(3pezMP)X0ssI2J)L6u00009a7bBm000XT z000XT0n*)m`~Uz7O=&|zP*7-ZbZ>KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%P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bH8olyl&XeJ%vZoWz%6?Y=dFykl=imL}`%BMQ{Mhgd`HRoLu6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(`>RI+y?e7jKeZ#YO-C z0QE^kK~#9!?3h80!axiJi(qjG93uYzzeNa$ltdho(B8u?pYU`&p+=sm@gbi-nCb+F zKnD^j^evK(=O zHI-nyoM2_y<(+mr)9fu+1F;=QkWR45r7Z>P#{Oa5?4#)0{9)aKWv0Kd%ob9U{=zZ` z%_+cHA{0000< KMNUMnLSTX!pu{-< diff --git a/src/install/images/loading1.gif b/src/install/images/loading1.gif deleted file mode 100755 index 5f10394c76def3e72040d06c82b6c6194162faeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3398 zcmbuBX*3(?8h|4tLM+izwUo3>ZK0Gw%P6X-R?9HfR&6EL(&?ZZf?6VCi6!q007|V=!iz6aY^35;c#ed+V2m4hd)~TIh~;##n8>93tIQ`sG`=_*CD^4Pb250 z11C%hI3ATNPW7CiVNM|R_}$aQu;RzIlk3Kzn*P51Up27|s5#NQ^FRyBu&F+fa!kDt zKQlEoCE+{%VuWRsvoC7?yI0jp8G-Ps=pPa7Iyu~F*Q+4JuLJ280S{?f@Ts+Cu1#$ zycU|?ZIMj>Eqkk`ruIhmylhDSN#{2j_whl!8&|UF_sW*;S8qj?jwDdFcr@Z5m%^WR z9^PqQH!hqEr+o9RXP-TS-nwRMbJfV|+C?>WZm#1?oIT{>5k20B;{p72CIIhIBv({) z%!}B#_~Tz=lCa4sscE?MjLa;2c1~_yenDYTaY-qmth^!xK&q;)sjVZ|H#9cAY;I|7 zYwvi~+0{+y>81Ad4-5{`hDS!n#$QjonS49-?)``9k29ZU=jJ~zEG{jttkTyQ>&%VK zE!H-BXZOq3z5RnhAnDtW+8;mwSHmPPyvQ)35kmj9Rd`W3R#0xK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Jg{dGkBznXYUa|W@-u@bcXP$0u4~X03?Lgg5 Ji$DN+{{-a^$|?W= diff --git a/src/install/images/step-ico-bg.png b/src/install/images/step-ico-bg.png deleted file mode 100755 index c982e5fbb7efe9182be5573edf94cf95493c414e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3122 zcmV-249)Y2P)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%Pw-h?Xh~i8Mq9jtJloCocWk2Nv zrJpiFnV_ms&8eQ$2&#xWpIS+6pmtC%Q-`S&GF4Q#^mhymh7E(qNMa}%YZ-ePrx>>xFPTiH1=E+A$W$=bG8>s^ zm=Bn5Rah$aDtr}@$`X}2l~$F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php @@ -12,6 +12,7 @@ error_reporting(E_ALL || ~E_NOTICE); $verMsg = 'V6'; $dfDbname = 'dedecmsv6'; +$cfg_version_detail = '6.0.3'; // 详细版本号 $errmsg = ''; define('INSLOCKFILE', dirname(__FILE__).'/install_lock.txt'); @@ -92,6 +93,28 @@ function _2_Setup() ------------------------*/ else if($step==2) { + $dbtype = empty($dbtype)? "mysql" : $dbtype; + $dblang = "utf8"; + if (!in_array($dbtype,array("mysql", "sqlite"))) { + die("当前数据库类型不支持"); + } + if(!empty($_SERVER['HTTP_HOST'])) + $dfbaseurl = 'http://'.$_SERVER['HTTP_HOST']; + else + $dfbaseurl = "http://".$_SERVER['SERVER_NAME']; + $dfbasepath = preg_replace("#\/install(.*)$#i", '', $scriptName); + + $dbhost = empty($dbhost)? "localhost" : $dbhost; + $dbuser = empty($dbuser)? "root" : $dbuser; + $dbuser = empty($dbuser)? "root" : $dbuser; + $dbprefix = empty($dbprefix)? "dede_" : $dbprefix; + $dbname = empty($dbname)? $dfDbname : $dbname; + $adminuser = empty($adminuser)? "admin" : $adminuser; + $adminpwd = empty($adminpwd)? "admin" : $adminpwd; + $webname = empty($webname)? "我的网站" : $webname; + $baseurl = empty($baseurl)? $dfbaseurl : $baseurl; + $cmspath = empty($cmspath)? $dfbasepath : $cmspath; + if ( $dbtype == 'sqlite' ) { $db = new SQLite3(DEDEDATA.'/'.$dbname.'.db'); @@ -288,7 +311,7 @@ else if($step==2) $fp = fopen($insLockfile,'w'); fwrite($fp,'ok'); fclose($fp); - header('Location:dede/index.php'); + header('Location:../dede/index.php'); exit(); } /*------------------------ @@ -301,18 +324,27 @@ else if($step==10) header("Cache-Control:no-cache\r\n"); header("Expires:0\r\n"); $conn = @mysql_connect($dbhost,$dbuser,$dbpwd); + $info = ""; if($conn) { if(empty($dbname)){ - echo "信息正确"; + $info = "信息正确"; }else{ - $info = mysql_select_db($dbname,$conn)?"数据库已经存在,系统将覆盖数据库":"数据库不存在,系统将自动创建"; - echo $info; - } + $info = mysql_select_db($dbname,$conn)? "数据库已经存在,系统将覆盖数据库": "数据库不存在,系统将自动创建"; + } + $result = array( + "code" => 200, + "data" => $info, + ); + echo json_encode($result); } else { - echo "数据库连接失败!"; + $result = array( + "code" => -1, + "data" => "数据库连接失败!", + ); + echo json_encode($result); } @mysql_close($conn); exit(); diff --git a/src/install/templates/step-1.html b/src/install/templates/step-1.html index c702b724..382fffde 100755 --- a/src/install/templates/step-1.html +++ b/src/install/templates/step-1.html @@ -39,11 +39,12 @@ ?>
-
-

首次运行安装包

+
+
首次运行安装程序(v
-
+ + 数据库设置 @@ -74,8 +75,14 @@
- +
+ +
+ +
+
+
站点设置
@@ -86,7 +93,6 @@
-
@@ -117,7 +123,28 @@ + diff --git a/src/templets/templet-dirlist.inc b/src/templets/templet-dirlist.inc index 2c30eaf9..68fd3991 100755 --- a/src/templets/templet-dirlist.inc +++ b/src/templets/templet-dirlist.inc @@ -1,4 +1,3 @@ -start,默认模板目录说明 default,默认模板文件目录 plus,附加插件模板目录 system,默认底层模板目录 \ No newline at end of file diff --git a/src/templets/templet-filelist.inc b/src/templets/templet-filelist.inc index faa4f7ff..9f6948a4 100755 --- a/src/templets/templet-filelist.inc +++ b/src/templets/templet-filelist.inc @@ -1,4 +1,3 @@ -start,系统默认模板文件说明 head.htm,列表页头部模板 head_nocatalog.htm,内容页\主页等无子栏目页面头部模板 index.htm,主页模板