Merge pull request #37 from kirilldemidov/master

Departments function introduced
Changes to menu and main page
Empty week message
create search form in menu.tpl
Merge github.com:bstrx/doorlog

Conflicts:
	protected/controllers/Users.php
	protected/views/index.tpl
	protected/views/menu.tpl
fixes index.tpl and menu.tpl
fixes
Merge pull request #38 from dupon21/master

create autocomplete search form in menu.tpl
new redirect method in Controller
login page update: style and errors
Minor style changes
Menu 'main' link fix
Several cosmetic changes + user add fix
Custom time format for Smarty
Added week days labels + separated main page
datetime functions moved to new Datetime class
Timer added to weeks and days
Complete refactor of time operations
Port settings added
Login with codekey