<?php
@version @since @author @copyright @package
require_once '../config/ApplicationCfg.php';
require_once PD_WEB_INCLUDES_ROOT. 'common.inc.php';
define('PAGE_ID' , 'project'. PD_WEB_FILE_EXT);
define('PAGE_TR_ID' , 'project');
define('_FILE_', basename(__FILE__));
define('DEFAULT_ACTION', 'GET_PROJECT_SUMMARY');
$Dbg->setAction(DEFAULT_ACTION);
require_once('XML/RSS.php');
require_once('Cache/Lite.php');
$options = array(
'cacheDir' => PD_WEB_TEMP,
'lifeTime' => 36000
);
$Cache_Lite = new Cache_Lite($options);
$rssSummaryUrl = 'http://sourceforge.net/export/rss2_projsummary.php?group_id=95715';
if ($data = $Cache_Lite->get('summary')) {
$Dbg->add('Getting $summary from cache');
$summary = unserialize($data);
} else {
$rssSummary =& new XML_RSS($rssSummaryUrl);
$rssSummary->parse();
foreach ($rssSummary->getItems() as $lkey => $lvalue) {
$summary[] = $lvalue;
}
$Dbg->add('Saving $summary to the cache');
$Cache_Lite->save(serialize($summary));
}
$smarty->assign('summary', $summary);
$smarty->assign('file', PD_WEB_PHP_DEBUG_ROOT. DIRECTORY_SEPARATOR. PAGE_ID);
$smarty->assign('bodyTpl', PAGE_TR_ID);
$smarty->assign('debugBuffer', $Dbg->getOutput());
$smarty->display('index.tpl');
?> |