2
I have deleted a part of code and now i can display at least newslist.php file but without any content. This is the part which cause the blank screen. Please Help.
//Get number of downloads the last week
$one_week_ago = time() - 3600*24*7; //@TODO: Change to strtotime (TODAY-1week);
$download_handler = xoops_getmodulehandler('download');
$allowed_cats = $gperm_handler->getItemIds("WFDownCatPerm", $groups, $module_id);
$criteria = new Criteria("published", $one_week_ago, ">=");
$allweekdownloads = $download_handler->getActiveCount($criteria);
//Get number of downloads the last month
$one_month_ago = time() - 3600*24*7; //@TODO: Change to strtotime (TODAY-1month);
$criteria = new Criteria("published", $one_month_ago, ">=");
$allmonthdownloads = $download_handler->getActiveCount($criteria);
$xoopsTpl->assign('allweekdownloads', $allweekdownloads);
$xoopsTpl->assign('allmonthdownloads', $allmonthdownloads);
//Get latest downloads
$criteria = new CriteriaCompo(new Criteria("offline", 0));
if(isset($_GET['newdownloadshowdays'])) {
$days = intval($_GET['newdownloadshowdays']);
$days_limit = array(7, 14, 30);
if(in_array($days, $days_limit)) {
$downloadshowdays = time() - (3600 * 24 * $days);
$criteria->add(new Criteria("published",$downloadshowdays, '>='), 'AND');
}
}
$criteria->setSort("published");
$criteria->setOrder("DESC");
$criteria->setLimit($xoopsModuleConfig['perpage']);
$criteria->setStart(0);
$downloads = $download_handler->getActiveDownloads($criteria);
foreach (array_keys($downloads) as $i)
{
$down = $downloads[$i]->getDownloadInfo();
$xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $down['hits']));
$xoopsTpl->assign('lang_subdate' , $down['is_updated']);
$xoopsTpl->append('file', $down);
}