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

Hook::call('lang_editor_before');

LabCMS::i()->setAdminSkin();

switch (true)
{
	case(!empty($_GET['action']) && $_GET['action']=="del_lang" && isset($_GET['var1']) && access('admin')):
		$mode="delete";
		include dirname(__FILE__)."/edit_lang.php";
		break;
	case(!empty($_GET['action']) && $_GET['action']=="edit_lang" && isset($_GET['var1']) && access('admin')):
		$mode="edit";
		addBreadcrumb('Изменение языка');
		include dirname(__FILE__)."/edit_lang.php";
		break;
	case(!empty($_GET['action']) && $_GET['action']=="add_lang" && access('admin')):
		$mode="add";
		addBreadcrumb('Добавление языка');
		include dirname(__FILE__)."/edit_lang.php";
		break;
	case(!empty($_GET['action']) && $_GET['action']=="collect" && access('admin')):
		include dirname(__FILE__)."/collect.php";
		break;
	case(!empty($_GET['action']) && $_GET['action']=="edit" && access('admin')):
		include dirname(__FILE__)."/edit_text.php";
		break;
	case(access('admin')):
		include dirname(__FILE__)."/langs.php";
		break;
	default:
		LabCMS::i()->error403();
}

Hook::call('lang_editor_after');