<?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 ($_GET['action']=='add_place' && access('edit'))
	{
		$mode='add';
		addBreadcrumb('Добавление места');
		include dirname(__FILE__)."/place_edit.php";
	}
	elseif ($_GET['action']=='edit_place' && access('edit'))
	{
		$mode='edit';
		addBreadcrumb('Изменение места');
		include dirname(__FILE__)."/place_edit.php";
	}
	elseif ($_GET['action']=='delete_place' && access('edit'))
	{
		$mode='delete';
		include dirname(__FILE__)."/place_edit.php";
	}
	elseif ($_GET['action']=='toggle_place' && access('edit'))
	{
		$mode='toggle';
		include dirname(__FILE__)."/place_edit.php";
	}
	elseif ($_GET['action']=='add_value' && access('edit'))
	{
		$mode="add";
		addBreadcrumb('Добавление блока');
		include dirname(__FILE__)."/value_edit.php";
	}
	elseif ($_GET['action']=='edit_value' && access('edit'))
	{
		$mode="edit";
		addBreadcrumb('Изменение блока');
		include dirname(__FILE__)."/value_edit.php";
	}
	elseif ($_GET['action']=='toggle_value' && access('edit'))
	{
		$mode="toggle";
		include dirname(__FILE__)."/value_edit.php";
	}
	elseif ($_GET['action']=='delete_value' && access('edit'))
	{
		$mode="delete";
		include dirname(__FILE__)."/value_edit.php";
	}
	elseif (access('read'))
	{
		include dirname(__FILE__)."/places_list.php";
	}
	else LabCMS::i()->error403();