Beispiel #1
0
require_once dirname(__FILE__) . "/config.php";
CheckPurview('sys_MakeHtml');
require_once DEDEINC . "/arc.rssview.class.php";
$isremote = empty($isremote) ? 0 : $isremote;
$serviterm = empty($serviterm) ? "" : $serviterm;
if (empty($tid)) {
    $tid = 0;
}
if (empty($maxrecord)) {
    $maxrecord = 50;
}
if ($cfg_remote_site == 'Y' && $isremote == "1") {
    if ($serviterm != "") {
        list($servurl, $servuser, $servpwd) = explode(',', $serviterm);
        $config = array('hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd, 'debug' => 'TRUE');
    } else {
        $config = array();
    }
    if (!$ftp->connect($config)) {
        exit('Error:None FTP Connection!');
    }
}
$row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE id>'{$tid}' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;");
if (!is_array($row)) {
    echo "完成所有文件更新!";
} else {
    $rv = new RssView($row['id'], $maxrecord);
    $rssurl = $rv->MakeRss($isremote);
    $tid = $row['id'];
    ShowMsg("成功更新" . $rssurl . ",继续进行操作!", "makehtml_rss_action.php?tid={$tid}&maxrecord={$maxrecord}&isremote={$isremote}&serviterm={$serviterm}", 0, 100);
}
Beispiel #2
0
    /**
     * RssViewTest::testSerializeWithSpecialChars()
     *
     * @return void
     */
    public function testSerializeWithSpecialChars()
    {
        $Request = new CakeRequest();
        $Response = new CakeResponse();
        $Controller = new Controller($Request, $Response);
        $data = array('channel' => array('title' => 'Channel title with äöü umlauts and <!> special chars', 'link' => 'http://channel.example.org'), 'items' => array(array('title' => 'A <unsafe title', 'link' => array('controller' => 'foo', 'action' => 'bar'), 'description' => 'My content "&" and <other> stuff here should also be escaped safely')));
        $Controller->set(array('channel' => $data, '_serialize' => 'channel'));
        $View = new RssView($Controller);
        $result = $View->render(false);
        $expected = <<<RSS
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Channel title with äöü umlauts and &lt;!&gt; special chars</title>
    <link>http://channel.example.org</link>
    <description/>
    <item>
      <title>A &lt;unsafe title</title>
      <link>{$this->baseUrl}/foo/bar</link>
      <description>My content "&amp;" and &lt;other&gt; stuff here should also be escaped safely</description>
    </item>
  </channel>
</rss>

RSS;
        $this->assertTextEquals($expected, $result);
    }
<?php

require_once dirname(__FILE__) . "/config.php";
CheckPurview('sys_MakeHtml');
require_once DEDEINC . "/arc.rssview.class.php";
if (empty($tid)) {
    $tid = 0;
}
if (empty($maxrecord)) {
    $maxrecord = 50;
}
$row = $dsql->GetOne("Select id From `#@__arctype` where id>'{$tid}' And ispart<>2 order by id asc limit 0,1;");
if (!is_array($row)) {
    echo "完成所有文件更新!";
} else {
    $rv = new RssView($row['id'], $maxrecord);
    $rssurl = $rv->MakeRss();
    $tid = $row['id'];
    ShowMsg("成功更新" . $rssurl . ",继续进行操作!", "makehtml_rss_action.php?tid={$tid}&maxrecord={$maxrecord}", 0, 100);
}
Beispiel #4
0
<?php

require_once dirname(__FILE__) . '/../include/common.inc.php';
require_once DEDEINC . "/arc.rssview.class.php";
$tid = isset($tid) && is_numeric($tid) ? $tid : 0;
if ($tid == 0) {
    die(" Request Error! ");
}
$rv = new RssView($tid);
$rv->Display();
<?php 
require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_MakeHtml');
require_once(dirname(__FILE__)."/../include/inc_rss_view.php");
if(empty($tid)) $tid = 0;
if(empty($maxrecord)) $maxrecord = 50;

header("Content-Type: text/html; charset={$cfg_ver_lang}");

$dsql = new DedeSql(false);
$row = $dsql->GetOne("Select ID From #@__arctype where ID>'$tid' And ispart<2 order by ID asc limit 0,1;");
$dsql->Close();
if(!is_array($row)){
	echo "完成所有文件更新!";
	exit();
}
else{
	$rv = new RssView($row['ID'],$maxrecord);
	$rssurl = $rv->MakeRss();
	$rv->Close();
	$tid = $row['ID'];
	ShowMsg("成功更新".$rssurl.",继续进行操作!","makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord",0,100);
  exit();
}

ClearAllLink();
?>