app/admin/controller/Import.php
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 人人站CMS
* ============================================================================
* 版权所有 2015-2030 山东康程信息科技有限公司,并保留所有权利。
* 网站地址: http://www.rrzcms.com
* ----------------------------------------------------------------------------
* 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
* ============================================================================
*/
namespace app\admin\controller;
use app\BaseController;
use think\facade\Db;
class Import extends BaseController
{
function index() {
function_exists('set_time_limit') && set_time_limit(0);
@ini_set('memory_limit', '-1');
is_file('inport.lock') and exit('正在执行导入!');
file_put_contents('inport.lock', '');
$typeid = $_GET['typeid'];
$nodeid = $_GET['nodeid'];
if (!is_numeric($typeid) || !is_numeric($nodeid)) exit('参数错误');
$rows = Db::query('SELECT id,title,flag,click,keywords,description,litpic,channel FROM ey19.dede_archives WHERE arcrank=0 AND typeid=' . $typeid . ' ORDER BY id');
if (count($rows) <= 0) {
exit('没有数据!');
}
$list = [];
foreach ($rows as $item) {
$content = '';
if ($item['channel'] == 2) {
$body = Db::query('SELECT imgurls,body FROM ey19.dede_addonimages WHERE aid=' . $item['id']);
$imsg = $body[0]['imgurls'] ?? '';
preg_match_all('/\{dede:img.*ddimg=["|\'](.*)["|\'].*}/isU', $imsg, $matches);
foreach ($matches[1] as $value) {
$url = $this->impImg($value);
if (!$url) continue;
$content .= '<p style="text-align: center"><img src="' . $url . '"/></p>';
}
$content .= $body[0]['body'] ?? '';
} else {
$body = Db::query('SELECT body FROM ey19.dede_addonarticle WHERE aid=' . $item['id']);
if (!$body || !isset($body[0]['body'])) continue;
$content = $body[0]['body'];
$that = $this;
$content = preg_replace_callback('/<img.*src=["|\'](.*)["|\'].*>/isU', function ($matches) use ($that) {
$url = $that->impImg($matches[1]);
return str_replace($matches[1], $url, $matches[0]);
}, $content);
}
$content = str_replace(['“', '”', '…', '·', '—'], ['“', '”', '…', '·', '—'], $content);
$img = $this->impImg($item['litpic']);
$list[] = [
后面还有 51 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
