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

$_GET['var1']=isset($_GET['var1'])?intval($_GET['var1']):null;

switch (true)
{
	case($_GET['action']=="add" && access('add')):
		$mode="add";
		include dirname(__FILE__)."/edit_post.php";
		addBreadcrumb("добавление сообщения");
	break;
	case($_GET['action']=="edit" && access('edit') && $_GET['var1']):
		$mode="edit";
		include dirname(__FILE__)."/edit_post.php";
		addBreadcrumb("редактирование сообщения");
	break;
	case($_GET['action']=="delete" && access('delete') && $_GET['var1']):
		$mode="delete";
		include dirname(__FILE__)."/edit_post.php";
	break;
	default:
		include dirname(__FILE__)."/show.php";
}
