<?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
*/

config::set('table_images', '?_lc_album_images');
config::set('table_albums', '?_lc_album_albums');

config::set('basepath', '/storage/Image/lc_album');
config::set('logo_path', '/logo');
config::set(
	'tn',
	array(
		'small'=>array('path'=>'/small', 'width'=>160, 'height'=>160, 'crop'=>true, 'type'=>false),
		'middle'=>array('path'=>'/middle', 'width'=>500, 'height'=>500, 'crop'=>false, 'type'=>false),
		'original'=>array('path'=>'/original', 'width'=>1024, 'height'=>1024, 'crop'=>false, 'type'=>false)
	)
);

Hook::call('lc_album_before');

$lcam=Factory::create('lc_album.main');

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

Hook::call('lc_album_after');