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

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

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

// select all relevant data from site_content:
$this->query("select `name`, `id` from site_content where `depth`>0 and `startpage`=0 and `active`=1 order by `views` 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>";
}
?>
Return current item: chillyCMS