admin/co_get_corule.php

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/**
 * 导入采集规则
 *
 * @version        $Id: co_get_corule.php 1 17:13 2010年7月12日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require(dirname(__FILE__)."/config.php");
CheckPurview('co_AddNote');
if(empty($job))
{
    $job='';
}
if($job=='')
{
    require_once(DEDEINC."/../include/oxwindow.class.php");
    $wintitle = "导入采集规则";
    $wecome_info = "<a href='co_main.php'><u>采集点管理</u></a>::导入采集规则";
    $win = new OxWindow();
    $win->Init("co_get_corule.php","js/blank.js","POST");
    $win->AddHidden("job","yes");
    $win->AddTitle("请在下面输入你要导入的文本配置:(建议用base64编码[支持不编码的规则,但不兼容旧版规则])");
    $win->AddMsgItem("<textarea name='notes' style='width:100%;height:300px'></textarea>");
    $winform = $win->GetWindow("ok");
    $win->Display();
    exit();
}
else
{
    CheckPurview('co_AddNote');
    require_once(DEDEINC."/dedetag.class.php");
    $notes = trim($notes);

    //对Base64格式的规则进行解码
    if(ereg('^BASE64:',$notes))
    {
        if(!ereg(':END$',$notes))
        {
            ShowMsg('该规则不合法,Base64格式的采集规则为:BASE64:base64编码后的配置:END !','-1');
            exit();
        }
        $notess = explode(':',$notes);
        $notes = $notess[1];
        $notes = base64_decode(ereg_replace("[\r\n\t ]",'',$notes)) OR die('配置字符串有错误!');
    }
    else
    {
        $notes = stripslashes($notes);
    }
    $dtp = new DedeTagParse();
    $dtp->LoadString($notes);
    if(!is_array($dtp->CTags))
    {
        ShowMsg('该规则不合法,无法导入!','-1');
        exit();
    }
    $ctag1 = $dtp->GetTagByName('listconfig');
后面还有 41 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。