<?php
	if (!defined('FLUX_ROOT')) exit;
	$title = null;

	// Get total count and feed back to the paginator.
	$sql = "SELECT COUNT(cl_id) AS total FROM {$server->charMapDatabase}.cp_changelogs";
	$sth = $server->connection->getStatement($sql);
	$sth->execute();

	$paginator = $this->getPaginator($sth->fetch()->total);
	$paginator->setSortableColumns(array(
		'timestamp' => 'text', 'subject', 'chatlink'
	));

	$col = 'timestamp, subject, text, chatlink';
	$sql = $paginator->getSQL("SELECT $col FROM {$server->charMapDatabase}.cp_changelogs");
	$sth = $server->connection->getStatement($sql);
	$sth->execute();
	$changelogs = $sth->fetchAll();

?>