Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/bootstrap.php
<?php defined('SYSPATH') or die('No direct script access.');

// -- Environment setup --------------------------------------------------------

// Load the core Kohana class
require SYSPATH.'classes/Kohana/Core'.EXT;

if (is_file(APPPATH.'classes/Kohana'.EXT))
{
	// Application extends the core
	require APPPATH.'classes/Kohana'.EXT;
}
else
{
	// Load empty core extension
	require SYSPATH.'classes/Kohana'.EXT;
}

/**
 * Set the default time zone.
 *
 * @link http://kohanaframework.org/guide/using.configuration
 * @link http://www.php.net/manual/timezones
 */
date_default_timezone_set('Europe/Warsaw');

/**
 * Set the default locale.
 *
 * @link http://kohanaframework.org/guide/using.configuration
 * @link http://www.php.net/manual/function.setlocale
 */
setlocale(LC_ALL, 'en_US.utf-8');
//setlocale(LC_ALL, 'pl_PL.utf-8'); 

/**
 * Enable the Kohana auto-loader.
 *
 * @link http://kohanaframework.org/guide/using.autoloading
 * @link http://www.php.net/manual/function.spl-autoload-register
 */
spl_autoload_register(array('Kohana', 'auto_load'));

/**
 * Optionally, you can enable a compatibility auto-loader for use with
 * older modules that have not been updated for PSR-0.
 *
 * It is recommended to not enable this unless absolutely necessary.
 */
//spl_autoload_register(array('Kohana', 'auto_load_lowercase'));

/**
 * Enable the Kohana auto-loader for unserialization.
 *
 * @link http://www.php.net/manual/function.spl-autoload-call
 * @link http://www.php.net/manual/var.configuration#unserialize-callback-func
 */
ini_set('unserialize_callback_func', 'spl_autoload_call');

// -- Configuration and initialization -----------------------------------------

/**
 * Set the default language
 */
//I18n::lang('en-us');
I18n::lang('pl-pl');


/**
 * Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
 *
 * Note: If you supply an invalid environment name, a PHP warning will be thrown
 * saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
 */
if (isset($_SERVER['KOHANA_ENV']))
{
	Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}

/**
 * Initialize Kohana, setting the default options.
 *
 * The following options are available:
 *
 * - string   base_url    path, and optionally domain, of your application   NULL
 * - string   index_file  name of your index file, usually "index.php"       index.php
 * - string   charset     internal character set used for input and output   utf-8
 * - string   cache_dir   set the internal cache directory                   APPPATH/cache
 * - integer  cache_life  lifetime, in seconds, of items cached              60
 * - boolean  errors      enable or disable error handling                   TRUE
 * - boolean  profile     enable or disable internal profiling               TRUE
 * - boolean  caching     enable or disable internal caching                 FALSE
 * - boolean  expose      set the X-Powered-By header                        FALSE
 */
Kohana::init(array(
	'base_url'   => '/',
	'index_file'	=> ''
));


Cookie::$salt = 'cookie_salt';
/**
 * Attach the file write to logging. Multiple writers are supported.
 */
Kohana::$log->attach(new Log_File(APPPATH.'logs'));

/**
 * Attach a file reader to config. Multiple readers are supported.
 */
Kohana::$config->attach(new Config_File);

/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array(
	 'auth'       => MODPATH.'auth',       // Basic authentication
	 'category'       => MODPATH.'category',      
	 'news'       => MODPATH.'news',      
	 'banner'       => MODPATH.'banner',      
	 'sort'       => MODPATH.'sort',   
	 'page'       => MODPATH.'page',   	 
	 'manager'       => MODPATH.'manager',   	 
	// 'cache'      => MODPATH.'cache',      // Caching with multiple backends
	// 'codebench'  => MODPATH.'codebench',  // Benchmarking tool
 	// 'captcha'   => MODPATH.'captcha',   // Database access
	 'recaptcha'   => MODPATH.'recaptcha',   // Database access
	 'message'   => MODPATH.'message',   // Database access
	 'email'   => MODPATH.'email',   // Database access
	 'database'   => MODPATH.'database',   // Database access
	 'image'      => MODPATH.'image',      // Image manipulation
	 'pagination'      => MODPATH.'pagination',      // 
	// 'minion'     => MODPATH.'minion',     // CLI Tasks
	 'orm'        => MODPATH.'orm',        // Object Relationship Mapping
	// 'unittest'   => MODPATH.'unittest',   // Unit testing
	// 'userguide'  => MODPATH.'userguide',  // User guide and API documentation
	));

/**
 * Set the routes. Each route must have a minimum of a name, a URI and a set of
 * defaults for the URI.
 */
 
Route::set('Account_Gallery', '<format0>/<format1>/<act>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(gallery)',
	'act' => '([a-z]+)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'gallery',
));
Route::set('Account_Comment', '<format0>/<format1>/<act>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(comment)',
	'act' => '([a-z]+)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'comment',
));
Route::set('Account_Artist', '<format0>/<format1>/<act>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(artist)',
	'act' => '([a-z]+)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'artist',
));

Route::set('Account_Item', '<format0>/<format1>/<act>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(item)',
	'act' => '([a-z]+)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'item',
));
 Route::set('Account_Article', '<format0>/<format1>/<act>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(article)',
	'act' => '([a-z]+)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'article',
));
Route::set('Account_News', '<format0>/<format1>/<act>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(news)',
	'act' => '([a-z]+)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'news',
));

  Route::set('Article_Show', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Article)',
	'format1' => '(show)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Article',
    'action' => 'show',
));

  Route::set('Exposure_Show', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Exposure)',
	'format1' => '(show)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Exposure',
    'action' => 'show',
));

  Route::set('News_Show', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(News)',
	'format1' => '(show)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'News',
    'action' => 'show',
));

Route::set('Gallery_news', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Gallery)',
	'format1' => '(news)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Gallery',
    'action' => 'news',
));
Route::set('Gallery_artist', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Gallery)',
	'format1' => '(artist)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Gallery',
    'action' => 'artist',
));
Route::set('Gallery_exposure', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Gallery)',
	'format1' => '(exposure)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Gallery',
    'action' => 'exposure',
));
Route::set('Gallery_article', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Gallery)',
	'format1' => '(article)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Gallery',
    'action' => 'article',
));
Route::set('Gallery_photos', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Gallery)',
	'format1' => '(photos)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Gallery',
    'action' => 'photos',
));
  Route::set('Artist_Show', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Artist)',
	'format1' => '(show)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Artist',
    'action' => 'show',
));
 
   Route::set('Gallery_Show', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Gallery)',
	'format1' => '(show)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Gallery',
    'action' => 'show',
));

  Route::set('order_invoice', '<format0>/<format1>/<id>',
  array(
	'format0' => '(account)',
	'format1' => '(order_invoice)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'order_invoice',
));

 Route::set('logowanie', '<format0>',
  array(
	'format0' => '(logowanie)'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'login',
));

 Route::set('account_order_get_courier', '<format0>/<format2>(/<id>)',
  array(
	'format0' => '(Account)',
	'format2' => '(Order)',
	'id' => '(get_courier)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'Order',
));

 Route::set('account_licence_edit', '<format0>/<format2>/<id>',
  array(
	'format0' => '(account)',
	'format2' => '(licence_edit)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'licence_edit',
));
 Route::set('order_payment_succes', '<format0>/<format2>/<id>',
  array(
	'format0' => '(Order)',
	'format2' => '(payment_success)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Order',
    'action' => 'payment_success',
));

 Route::set('order_payment', '<format0>/<format2>/<id>',
  array(
	'format0' => '(Order)',
	'format2' => '(payment)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Order',
    'action' => 'payment',
));

 Route::set('invoice', '<format0>/<format2>/<id>',
  array(
	'format0' => '(account)',
	'format2' => '(invoice)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'invoice',
));
  Route::set('product_get', '<format0>/<format2>/<id>',
  array(
	'format0' => '(product)',
	'format2' => '(get)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'product',
    'action' => 'get',
));

Route::set('order_add_cart', '<format0>/<format2>/<id>',
  array(
	'format0' => '(Order)',
	'format2' => '(add_cart)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'order',
    'action' => 'add_cart',
));

Route::set('order_delete_cart', '<format0>/<format2>/<id>',
  array(
	'format0' => '(Order)',
	'format2' => '(delete_cart)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'order',
    'action' => 'delete_cart',
));
Route::set('order_show', '<format0>/<format2>/<id>',
  array(
	'format0' => '(account)',
	'format2' => '(order_show)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'order_show',
));
Route::set('product_detail', '<format0>/<format2>/<id>',
  array(
	'format0' => '(Product)',
	'format2' => '(detail)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'product',
    'action' => 'detail',
));
Route::set('product_favorite', '<format0>/<format2>/<id>',
  array(
	'format0' => '(Product)',
	'format2' => '(Add_to_favorite)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'product',
    'action' => 'add_to_favorite',
));

Route::set('product_delete_favorite', '<format0>/<format2>/<id>',
  array(
	'format0' => '(account)',
	'format2' => '(delete_favorite)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Account',
    'action' => 'delete_favorite',
));

 Route::set('order_cart', '<format0>/<format2>/<id>',
  array(
	'format0' => '(order)',
	'format2' => '(cart)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'order',
    'action' => 'cart',
));

 
 Route::set('licence_edit', '<format0>/<format2>/<id>',
  array(
	'format0' => '(admin)',
	'format2' => '(licence_edit)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'licence_edit',
));

 Route::set('licence_delete', '<format0>/<format2>/<id>',
  array(
	'format0' => '(admin)',
	'format2' => '(licence_delete)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'licence_delete',
));

 Route::set('discount_edit', '<format0>/<format2>/<id>',
  array(
	'format0' => '(admin)',
	'format2' => '(discount_edit)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'discount_edit',
));

 Route::set('discount_delete', '<format0>/<format2>/<id>',
  array(
	'format0' => '(admin)',
	'format2' => '(discount_delete)',
	'id' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'discount_delete',
));

Route::set('activate_email', '<format0>/<format2>/<email_old>/<id>/<email_new>',
  array(
	'format0' => '(Account)',
	'format2' => '(activate_email)',
	'email_old' => '(.*)',
	'id' => '(.*)',
	'email_new' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'activate_email',
));
 Route::set('detail_product', '<pre>/<seo>/<id>',
  array(
	'pre' => '(product)',
	'seo' => '(.*)',
	'id' => '([0-9]+)'
  ))
  ->defaults(array(
    'controller' => 'Product',
    'action' => 'detail',
));
 Route::set('auth_generuj', '<format0>/<format1>(/<op>)(/<op2>)',
  array(
	'format0' => '(auth)',
	'format1' => '(generate)',
	'op' => '([a-z0-9_-]+)',
	'op2' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Auth',
    'action' => 'generate',
));
 Route::set('auth_activate', '<format0>/<format1>(/<op>)(/<op2>)',
  array(
	'format0' => '(auth)',
	'format1' => '(activate)',
	'op' => '([a-z0-9_-]+)',
	'op2' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'Auth',
    'action' => 'activate',
));
Route::set('page_preview', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(Infosite)',
	'format1' => 'Preview',
	'id' => '.*'
  ))
  ->defaults(array(
    'controller' => 'Infosite',
    'action' => 'Preview',
));
Route::set('page_custom', '<format0>(/<url>)',
  array(
	'format0' => '(Infosite)',
	'url' => '.*'
  ))
  ->defaults(array(
    'controller' => 'Infosite',
    'action' => 'Page',
));

Route::set('trainer_manage', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(trainer)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'trainer_edit',
));


Route::set('category_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(category)',
	'format2' => '(delete)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'category',
));

Route::set('category_adminE', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(category)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'category_edit',
));
Route::set('file_delete', '<format0>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format2' => '(file_delete)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'file_delete',
));

Route::set('file_edit', '<format0>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format2' => '(file_edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'file_edit',
));

Route::set('order_detail', '<format0>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format2' => '(order_detail)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'order_detail',
));
Route::set('user_detail', '<format0>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format2' => '(user_detail)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'user_detail',
));

Route::set('category_admin2', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(category)',
	'format2' => '(delete2)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'category',
));

Route::set('przypomnij', '<format>',
  array(
	'format' => '(przypomnij)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'przypomnij',
));
Route::set('czat', '<format>',
  array(
	'format' => '(czat)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'czat',
));
Route::set('auction_show', '<format0>/<id>(/<format1>)',
  array(
	'format0' => '(auction)',
	'id' => '\d+',
	'format1' => 'buy'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'auction',
));


Route::set('login', '<format>',
  array(
	'format' => '(login)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'login',
));
Route::set('onas', '<format>',
  array(
	'format' => '(onas)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'onas',
));
Route::set('agencje', '<format>',
  array(
	'format' => '(agencje)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'agencje',
));
Route::set('osoby', '<format>',
  array(
	'format' => '(osoby)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'osoby',
));
Route::set('reklama', '<format>',
  array(
	'format' => '(reklama)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'reklama',
));
Route::set('autorzy', '<format>',
  array(
	'format' => '(autorzy)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'autorzy',
));
Route::set('praca', '<format>',
  array(
	'format' => '(praca)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'praca',
));
Route::set('ogloszenia', '<format>',
  array(
	'format' => '(ogloszenia)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'ogloszenia',
));

Route::set('group_lst', '<format>',
  array(
	'format' => '(group)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'group',
));

Route::set('prywatnosc', '<format>',
  array(
	'format' => '(prywatnosc)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'prywatnosc',
));
Route::set('regulamin', '<format>',
  array(
	'format' => '(regulamin)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'regulamin',
));
Route::set('pomoc', '<format>',
  array(
	'format' => '(pomoc)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'pomoc',
));
Route::set('kontakt', '<format>',
  array(
	'format' => '(kontakt)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'kontakt',
));
Route::set('6prostych_krokow', '<format>',
  array(
	'format' => '(6prostych_krokow)',
   
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => '6prostych_krokow',
));
Route::set('profile', '<format>/<id>',
  array(
   'id' => '\d+',
	'format' => '(profile)',
   
  ))
  ->defaults(array(
    'controller' => 'profile',
    'action' => 'index',
));

Route::set('news', '<format0>/<id>',
  array(
	'format0' => '(news)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'news',
    'action' => 'index',
));

Route::set('award', '<format0>/<id>(/<replace>)',
  array(
	'format0' => 'award',
	'id' => '(\d+)',
	'replace' => 'replace'
  ))
  ->defaults(array(
    'controller' => 'award',
    'action' => 'item',
));


Route::set('admin_advertisement', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(advertisement)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'advertisement_edit',
));

Route::set('admin_slider', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(slider)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'slider_edit',
));
Route::set('admin_advertisement55', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(advertisement)',
	'format2' => '(delete)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'advertisement',
));

Route::set('admin_hightlightde', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(user)',
	'format2' => '(dehighlight)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'user',
));

Route::set('admin_hightlight', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(user)',
	'format2' => '(highlight)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'user',
));

Route::set('admin_delete', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(user)',
	'format2' => '(delete)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'user',
));
Route::set('admin_advertisement3', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(advertisement)',
	'format2' => '(accept)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'advertisement',
));

Route::set('admin_user', '<format0>/<format1>(/<format2>)(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(user)',
	'format2' => '(accept)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'user',
));

Route::set('admin_advertisement4', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(advertisement)',
	'format2' => '(ban)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'advertisement',
));

Route::set('user_edit', '<format0>/<format1>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(user_edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'user_edit',
));

Route::set('user_ban', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(user)',
	'format2' => '(ban)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'user',
));

Route::set('group', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(group)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'group_edit',
));

Route::set('group_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(group)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'group_edit',
));

Route::set('blog', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(blog)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'blog_edit',
));

Route::set('blog_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(blog)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'blog_edit',
));

Route::set('jobs_item', '<format0>/<id>',
  array(
	'format0' => '(praca)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'praca',
));

Route::set('notice_item', '<format0>/<id>',
  array(
	'format0' => '(ogloszenia)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'ogloszenia',
));
Route::set('auction_list', '<format0>',
  array(
	'format0' => '(auction)'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'auction',
));

Route::set('blog_list', '<format0>',
  array(
	'format0' => '(blog)'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'blog',
));

Route::set('article_list_new', '<format0>',
  array(
	'format0' => '(article)'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'article',
));

Route::set('jobs', '<format0>',
  array(
	'format0' => '(praca)'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'jobs',
));

Route::set('jobs_szukaj', '<format0>/<szukaj>',
  array(
	'format0' => '(praca)',
	'format1' => '(szukaj)'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'jobs_search',
));
Route::set('zaawansowane_mini', '<wyszukiwanie_zaawansowane_okno>',
  array(
	'wyszukiwanie_zaawansowane_okno' => '(wyszukiwanie_zaawansowane_okno)'
  ))
  ->defaults(array(
    'controller' => 'szukaj',
    'action' => 'adv_mini',
));
Route::set('zaawansowane', '<wyszukiwanie_zaawansowane>(/<szukaj>)',
  array(
	'wyszukiwanie_zaawansowane' => '(wyszukiwanie_zaawansowane)',
	'szukaj' => '(.*)'
  ))
  ->defaults(array(
    'controller' => 'szukaj',
    'action' => 'adv',
));
Route::set('jobs_manage', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(job)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'job_edit',
));

Route::set('notice_szukaj', '<format0>/<szukaj>',
  array(
	'format0' => '(ogloszenia)',
	'format1' => '(szukaj)'
  ))
  ->defaults(array(
    'controller' => 'infosite',
    'action' => 'notice_search',
));

Route::set('notice_add', '<format0>/<format1>/<format2>',
  array(
	'format0' => '(account)',
	'format1' => '(notice)',
	'format2' => '(add)'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'notice_add',
));

Route::set('notice_promo', '<format0>/<format1>/<format2>/<id>',
  array(
	'format0' => '(account)',
	'format1' => '(notice)',
	'format2' => '(promo)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'notice_promo',
));
Route::set('notice_manage', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(notice)',
	'format2' => '(edit)',
	'id' => '(\d+)'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'notice_edit',
));

Route::set('word_Edit', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(word)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'word_edit',
));

Route::set('word_d', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(word)',
	'format2' => '(delete)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'word',
));

Route::set('word1', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(word)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'word',
));

Route::set('language_Edit', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(language)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'language_edit',
));

Route::set('language_del', '<format0>/<format1>/<format12>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(language)',
	'format12' => '(delete)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'language',
));

Route::set('article', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(article)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'article_edit',
));

Route::set('charity', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(charity)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'charity_edit',
));
Route::set('auction', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(auction)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'auction_edit',
));

Route::set('account', '<format>/<id>',
  array(
   'id' => '\d+',
	'format' => '(account)',
   
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'index',
));

Route::set('profile_info', '<format0>/<format1>/<id>',
  array(
  	'format0' => '(profile)',
	'format1' => '(info)',
   'id' => '\d+',
  ))
  ->defaults(array(
    'controller' => 'profile',
    'action' => 'info',
));
Route::set('member', '<format0>/<format1>/<format2>(/<op>)',
  array(
	'format0' => '(profile)',
	'format1' => '(member)',
	'format2' => '\d+',
	'op' => '.*'
  ))
  ->defaults(array(
    'controller' => 'profile',
    'action' => 'member',
));
Route::set('article_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(article)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'article_edit',
));
Route::set('auction_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(auction)',
	'format2' => '(delete)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'auction',
));

Route::set('job_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(job)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'job_edit',
));
Route::set('notice_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(notice)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'notice_edit',
));



Route::set('agency_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(agency)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'agency_edit',
));

Route::set('page_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(page)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'page_edit',
));

Route::set('award_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(award)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'award_edit',
));

Route::set('news_admin', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(news)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'news_edit',
));


Route::set('album', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(album)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'album_edit',
));
Route::set('admin_album', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(admin)',
	'format1' => '(album)',
	'format2' => '(edit)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'album_edit',
));
Route::set('album_image', '<format0>/<format1>/<format2>(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(album)',
	'format2' => '(image)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'album_image',
));
Route::set('album_image_profile', '<format0>/<format1>/<format2>(/<user_id>)(/<id>)',
  array(
	'format0' => '(profile)',
	'format1' => '(album)',
	'format2' => '(image)',
	'user_id' => '\d+',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'profile',
    'action' => 'album_image',
));
Route::set('admin_album_image', '<format0>/<format1>/<format2>(/<id>)(/<op>)(/<id_photo>)',
  array(
	'format0' => '(admin)',
	'format1' => '(album)',
	'format2' => '(image)',
	'id' => '\d+',
	'op' => '([a-z]+)',
	'id_photo' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'admin',
    'action' => 'album_image',
));

Route::set('account_album_image', '<format0>/<format1>/<format2>(/<id>)(/<op>)(/<id_photo>)',
  array(
	'format0' => '(account)',
	'format1' => '(album)',
	'format2' => '(image)',
	'id' => '\d+',
	'op' => '([a-z]+)',
	'id_photo' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'album_image',
));

Route::set('album_image_profile', '<format0>/<format1>/<format2>(/<user_id>)(/<id>)',
  array(
	'format0' => '(profile)',
	'format1' => '(album)',
	'format2' => '(image)',
	'user_id' => '\d+',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'profile',
    'action' => 'album_image',
));
Route::set('image_profile', '<format0>/<format1>/(/<user_id>)(/<id>)',
  array(
	'format0' => '(profile)',
	'format1' => '(image)',
	'user_id' => '\d+',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'profile',
    'action' => 'image',
));

Route::set('image_account', '<format0>/<format1>/(/<id>)',
  array(
	'format0' => '(account)',
	'format1' => '(image)',
	'id' => '\d+'
  ))
  ->defaults(array(
    'controller' => 'account',
    'action' => 'image',
));

Route::set('default', '(<controller>(/<action>(/<op>(/<id>))))')
	->defaults(array(
		'controller' => 'infosite',
		'action'     => 'index',
		'op' => '.*'
	));
	
Route::set('profile_selection', '<format0>/<format1>(/<id>)(/<type_id>)(/<op>)',
  array(
	'format0' => '(profile)',
	'format1' => '(selection)',	
	'id' => '\d+',
	'type_id' => '\d+',
	'op' => '.*'
  ))
  ->defaults(array(
    'controller' => 'profile',
    'action' => 'selection',
));	




/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/* GK: TUTAJ WSTAWIAM HELPER TO TLUMACZENIA, KTOS MA LEPSZY POMYSL?           /*

/**
 * Specjalnie tlumacznie stringow. Zawsze uzywa pliku tlumaczeniowego
 *
 * @param string $string
 * @param string $locale
 */
function __t($keyname=null, $locale = null)
{
	//$session = Session::instance();
	//$lang_session = $session->get('language');
	
		$lang = (empty( $lang_session ) ) ? 1 : $lang_session;
		
		if( $keyname == null ) return;
		
		$lang_value = DB::query(Database::SELECT, "SELECT * FROM `language_definitions` WHERE `definition_key` = '$keyname' AND `languages_id` = '$lang'")->execute();
		
		return !empty($lang_value[0]['definition_value']) ? strip_tags($lang_value[0]['definition_value']) : $keyname;
	
/*
    if ($locale == null) {
        $locale = I18n::lang();
    }
	$locale = 'pl-pl'; // @TODO
	
    return I18n::get($string, $locale);
*/
}