<?php 

// General
App::addRoute("GET|POST", "/",															"Main");
App::addRoute("GET|POST", '/404?/?',													"Noting");
App::addRoute("GET|POST", "/ajax/[*:ajax]/[*:action]?/?",								"Ajax"); 
App::addRoute("GET|POST", "/api/[*:api]/[*:action]?/?",									"Api");
App::addRoute("GET|POST", "/modal/[*:modal]?/?",										"Modal"); 
App::addRoute("GET|POST", "/tab/[*:tab]?/?",											"Tab"); 
App::addRoute("GET|POST", "/comments?/?",												"Comments");
App::addRoute("GET|POST", '/'.App::translate('search').'/[*:q]?/?',						"Search");
App::addRoute("GET|POST", '/'.App::translate('login').'?/?',							"Login"); 
App::addRoute("GET|POST", '/'.App::translate('reset-password').'?/?',					"Reset"); 
App::addRoute("GET|POST", '/'.App::translate('recovery').'/[*:hash]?/?',				"Recovery"); 
App::addRoute("GET|POST", '/'.App::translate('register').'?/?',							"Register"); 
App::addRoute("GET|POST", '/'.App::translate('random').'?/?',							"Random"); 
App::addRoute("GET|POST", '/'.App::translate('play').'/[*:self]?/?',					"Play"); 
App::addRoute("GET|POST", '/'.App::translate('user').'/[*:username]/[*:tab]?/?',		"Profile"); 
App::addRoute("GET|POST", '/'.App::translate('collection').'/[*:self]-[i:id]?/?',		"Collection"); 
App::addRoute("GET|POST", '/'.App::translate('games').'/[*:order]?/?',					"Games"); 
App::addRoute("GET|POST", '/'.App::translate('category').'/[*:self]?/?',				"Games"); 
App::addRoute("GET|POST", '/'.App::translate('tag').'/[*:self]?/?',						"Tag"); 
App::addRoute("GET|POST", '/'.App::translate('page').'/[*:self]?/?',					"Page"); 
App::addRoute("GET|POST", '/'.App::translate('leaderboard').'?/?',						"Leaderboard");  
App::addRoute("GET|POST", '/'.App::translate('logout').'?/?',							"Logout");  

// Dashboard 
App::addRoute("GET|POST", "/dashboard/settings?/?",										["dashboard","Settings"]);

// Admin 
App::addRoute("GET|POST", "/admin/modal/[*:modal]?/?",									["admin","Modal"]);
App::addRoute("GET|POST", "/admin/ajax/[*:ajax]/[*:action]/?/?",						["admin","Ajax"]);
App::addRoute("GET|POST", "/admin/delete/[*:page]/[i:id]/?/?",							["admin","Delete"]);
App::addRoute("GET|POST", "/admin/ajax/[*:ajax]/?/?",									["admin","Ajax"]);
App::addRoute("GET|POST", "/admin?/?",													["admin","Main"]);

App::addRoute("GET|POST", "/admin/game/[i:id]?/?",										["admin","Game"]);
App::addRoute("GET|POST", "/admin/games?/?",											["admin","Games"]);

App::addRoute("GET|POST", "/admin/category/[i:id]?/?",									["admin","Category"]);
App::addRoute("GET|POST", "/admin/categories?/?",										["admin","Categories"]);

App::addRoute("GET|POST", "/admin/user/[i:id]?/?",										["admin","User"]);
App::addRoute("GET|POST", "/admin/users?/?",											["admin","Users"]);

App::addRoute("GET|POST", "/admin/collection/[i:id]?/?",								["admin","Collection"]);
App::addRoute("GET|POST", "/admin/collections?/?",										["admin","Collections"]);

App::addRoute("GET|POST", "/admin/config/[*:self]?/?",									["admin","Toolconfig"]);
App::addRoute("GET|POST", "/admin/tool/[*:self]?/?",									["admin","Tool"]);
App::addRoute("GET|POST", "/admin/tools?/?",											["admin","Tools"]);

App::addRoute("GET|POST", "/admin/report/[i:id]?/?",									["admin","Report"]);
App::addRoute("GET|POST", "/admin/reports?/?",											["admin","Reports"]);

App::addRoute("GET|POST", "/admin/comment/[i:id]?/?",									["admin","Comment"]);
App::addRoute("GET|POST", "/admin/comments?/?",											["admin","Comments"]);

App::addRoute("GET|POST", "/admin/country/[i:id]?/?",									["admin","Country"]);
App::addRoute("GET|POST", "/admin/countries?/?",										["admin","Countries"]);

App::addRoute("GET|POST", "/admin/language/[i:id]?/?",									["admin","Language"]);
App::addRoute("GET|POST", "/admin/languages?/?",										["admin","Languages"]);

App::addRoute("GET|POST", "/admin/ad/[i:id]?/?",										["admin","Ad"]);
App::addRoute("GET|POST", "/admin/ads?/?",												["admin","Ads"]);

App::addRoute("GET|POST", "/admin/page/[i:id]?/?",										["admin","Page"]);
App::addRoute("GET|POST", "/admin/pages?/?",											["admin","Pages"]);
App::addRoute("GET|POST", "/admin/clear-cache?/?",										["admin","Clear"]);

App::addRoute("GET|POST", "/admin/settings?/?",											["admin","Settings"]);


App::addRoute("GET|POST", "/sitemap.game_[i:page].xml?/?",								"SitemapGame");
App::addRoute("GET|POST", "/sitemap.category_[i:page].xml?/?",							"SitemapCategory");
App::addRoute("GET|POST", "/sitemap.xml?/?", 											"Sitemap"); 