admin/baidunews.php

(开头部分) 3KB

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

<?php
/**
 * 百度新闻
 *
 * @version        $Id: baidunews.php 1 14:31 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_once(dirname(__FILE__)."/config.php");

if(empty($do))
{
    include DEDEADMIN.'/templets/baidunews.htm';
} else {
    $baidunews = "<?xml version=\"1.0\" encoding=\"".$cfg_soft_lang."\" ?>\n";
    $baidunews .= "<document>\n";
    $baidunews .= "<webSite>$cfg_webname </webSite>\n";
    $baidunews .= "<webMaster>$cfg_adminemail </webMaster>\n";
    $baidunews .= "<updatePeri>$cfg_updateperi </updatePeri>\n";

    $limit = $cfg_baidunews_limit;
    if($limit > 100 || $limit < 1)
    {
        $limit = 100;
    }

    $query = "SELECT maintable.*, addtable.body, arctype.typename
    FROM #@__archives maintable
    LEFT JOIN #@__addonarticle addtable ON addtable.aid=maintable.id
    LEFT JOIN #@__arctype arctype ON arctype.ID=maintable.typeid
    WHERE maintable.channel=1 and maintable.arcrank!=-1 ORDER BY maintable.pubdate DESC LIMIT $limit
    ";
    $dsql->SetQuery($query);
    $dsql->Execute();
    while($row = $dsql->GetArray())
    {
        $title = htmlspecialchars($row['title']);
        $row1 = GetOneArchive($row['id']);
        if(strpos($row1['arcurl'],'http://') === false)
        {
            $link = ($cfg_basehost=='' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$row1['arcurl'];
        }else
        {
            $link = $row1['arcurl'];
        }
        $link = htmlspecialchars($link);
        $description = htmlspecialchars(strip_tags($row['description']));
        $text = htmlspecialchars(strip_tags($row['body']));
        $image = $row['litpic'] =='' ? '' :$row['litpic'];
        if($image != '' && strpos($image, 'http://') === false)
        {
            $image = ($cfg_basehost=='' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$image;

        }
        //$headlineimg = '';
        $keywords = htmlspecialchars($row['keywords']);
        $category = htmlspecialchars($row['typename']);
        $author = htmlspecialchars($row['writer']);
后面还有 24 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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