<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

if (LabConfig::$mcfg['use_album_comments'] || LabConfig::$mcfg['use_image_comments'])
{
	if (access('comment_moderator, comment_admin'))
	{
		if ($count=LabComments::getAbusedCounter())
			LabCMS::i()->setMessage(sprintf(_m('<a href="%s">Жалоб на комментарии: %s</a>'), _url(false, 'comment_moderate'), $count), true, true);
	}
	
	if (substr($_GET['action'], 0, 8)=='comment_')
	{
		if (is_callable('CommentTools::'.$_GET['action'])) call_user_func('CommentTools::'.$_GET['action']);
		return;
	}
}

include dirname(__FILE__).'/class.main.php';
include dirname(__FILE__).'/class.album.php';
include dirname(__FILE__).'/class.albums.php';
include dirname(__FILE__).'/class.image.php';
include dirname(__FILE__).'/class.images.php';

$lcam=new lc_album_main();

if (method_exists($lcam, 'lc_'.$_GET['action'])) call_user_func(array($lcam, 'lc_'.$_GET['action']));
else call_user_func(array($lcam, 'lc_list'));

