<?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
*/
switch(true)
{
	case($_GET['action']=='edit' && $_GET['var1'] && access('edit')):
		$mode="edit";
		addBreadcrumb('Редактирование блока');
		include dirname(__FILE__)."/edit.php";
	break;
	case($_GET['action']=='toggle' && $_GET['var1'] && access('edit')):
		$mode="toggle";
		include dirname(__FILE__)."/edit.php";
	break;
	case($_GET['action']=='delete' && $_GET['var1'] && access('admin')):
		$mode="delete";
		include dirname(__FILE__)."/edit.php";
	break;
	case($_GET['action']=='add' && access('admin')):
		$mode="add";
		addBreadcrumb('Добавление блока');
		include dirname(__FILE__)."/edit.php";
	break;
	case(access('read')):
		include dirname(__FILE__)."/list.php";
	break;
	default:
		LabCMS::i()->error403();
}
