Location: PHPKode > projects > chillyCMS > chillyCMS/modules/newestarticles/newestarticles.php
<?php
defined('DOIT') or die('Restricted access');

$modsettings=explode(",",$modsettings);

echo "\t<div class='newestarticles'>\n".
"\t\t<h3>$modinstancename</h3>\n";

// select all relevant data from site_content:
$this->query("select `name`, `id` from site_content where `active`=1 and `depth`>0 order by `date_new` desc limit $modsettings[0]");
$result = $this->db->getdata_array();

// create output:
if (!empty($result)) {
	echo "\t\t<ul>\n";
	foreach ($result as $row) {
		$row=array_map("escape_html",$row);
		echo "\t\t\t<li><a href='".URL."/index.php?id=$row[id]'>$row[name]</a></li>\n";
	}
	echo "\t\t</ul>\n".
	"\t</div>\n";
}
?>
Return current item: chillyCMS