-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.php
More file actions
141 lines (137 loc) · 4.65 KB
/
routes.php
File metadata and controls
141 lines (137 loc) · 4.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
/*
* ROUTES
*/
$routes = [
"" => "Page:home",
"/" => "Page:home",
"/domu" => "Page:home",
"/3d" => "Page:offers_3d",
"/zpravy" => "Chat:index",
"/send-message" => "Chat:send_message",
"/send-message-contact-form" => "Chat:send_message_contact_form",
"/create-new-chat" => "Chat:create_new_chat",
// ADMIN
"/admin" => "Admin:dashboard",
"/admin/panel" => "Admin:dashboard",
"/admin/get-auctions" => "Admin:get_auctions",
// ADMIN MAINTENANCE
"/admin/sprava-uzivatelu" => "Admin:user_maintenance",
"/admin/sprava-nabidek" => "Admin:offer_maintenance",
"/admin/sprava-aukci" => "Admin:auction_maintenance",
"/admin/sprava-trid" => "Admin:class_maintenance",
"/admin/sprava-knih" => "Admin:book_maintenance",
"/admin/sprava-sesitu" => "Admin:notebook_maintenance",
"/admin/sprava-umisteni-trid" => "Admin:cr_maintenance",
"/admin/sprava-zablokovanych-ip" => "Admin:banned_ip_maintenance",
"/admin/sprava-api-klicu" => "Admin:api_key_maintenance",
// ADMIN EDIT
"/admin/upravit-uzivatele" => "Admin:user_edit",
"/admin/upravit-nabidku" => "Admin:offer_edit",
"/admin/upravit-aukci" => "Admin:auction_edit",
"/admin/upravit-umisteni-tridy" => "Admin:cr_edit",
"/admin/upravit-tridu" => "Admin:class_edit",
"/admin/upravit-knihu" => "Admin:book_edit",
"/admin/upravit-sesit" => "Admin:notebook_edit",
"/admin/upravit-api-klic" => "Admin:api_key_edit",
"/admin/upravit-zablokovanou-ip" => "Admin:banned_ip_edit",
// AJAX
"/ajax/process-list" => "Ajax:process_list",
"/ajax/send-email" => "Ajax:send_email",
"/ajax/get-socketio-shell-output" => "Ajax:socketio_shell_output",
"/ajax/start-socketio-server" => "Ajax:start_socketio_server",
// CRON
"/cron/delete-old-offers" => "Cron:delete_old_offers",
"/cron/close-old-auctions" => "Cron:close_old_auctions",
"/cron/delete-old-tokens" => "Cron:delete_old_tokens",
// AUTH
"/prihlaseni" => "Auth:login",
"/registrace" => "Auth:register",
"/odhlaseni" => "Auth:logout",
"/obnovit-heslo" => "Auth:reset_password",
// AUCTION
"/get-auction-current-state" => "Auction:current_state",
"/rise-auction-price" => "Auction:rise_price",
"/can-user-bid" => "Auction:can_user_bid_ajax",
// ACCOUNT + WISHLIST
"/muj-ucet" => "Account:my_account",
"/muj-ucet/my-offers" => "Account:tab_my_offers",
"/muj-ucet/my-won-auction" => "Account:tab_my_won_auctions",
"/muj-ucet/wishlist" => "Wishlist:tab_wishlist",
"/add-or-delete-from-wishlist" => "Wishlist:add_or_delete",
"/change-password" => "Account:change_password",
// OFFERS
"/nabidky" => "Offer:offers",
"/nova-nabidka" => "Offer:new_offer",
"/post-offer" => "Offer:post_offer",
"/detail-nabidky" => "Offer:offer_detail",
// API
"/api/nabidky" => "Api:offers",
"/api/tridy" => "Api:classes",
// ERROR
"/ip-adresa-zablokovana" => "Error:blocked_ip",
"/polozka-neexistuje" => "Error:edit_item_doesnt_exist",
];
/*
* FILTERS
*/
$filters = [
"is_admin" => [
"/admin",
"/admin/panel",
"/admin/sprava-uzivatelu",
"/admin/sprava-nabidek",
"/admin/sprava-aukci",
"/admin/sprava-trid",
"/admin/sprava-knih",
"/admin/sprava-umisteni-trid",
"/admin/sprava-zablokovanych-ip",
"/admin/sprava-api-klicu",
// AJAX + ADMIN
"/ajax/process-list",
"/admin/get-auctions",
"/ajax/get-socketio-shell-output",
"/ajax/start-socketio-server",
],
"!is_logged_in" => [
"/prihlaseni",
"/registrace",
],
"is_logged_in" => [
"/odhlaseni",
"/muj-ucet",
"/nova-nabidka",
"/change-password" => "Account:change_password",
// AJAX + LOGGED IN
"/get-auction-current-state",
"/rise-auction-price",
"/can-user-bid",
"/zpravy",
"/send-message",
"/send-message-contact-form",
"/create-new-chat",
"/muj-ucet/my-offers",
"/muj-ucet/my-won-auction",
],
"is_ajax_request" => [
"/ajax",
"/ajax/process-list",
"/add-or-delete-from-wishlist",
"/ajax/get-socketio-shell-output",
"/ajax/start-socketio-server",
// AJAX + LOGGED IN
"/get-auction-current-state",
"/rise-auction-price",
"/can-user-bid",
"/admin/get-auctions",
"/send-message-contact-form",
"/create-new-chat",
"/muj-ucet/my-offers",
"/muj-ucet/my-won-auction",
],
"is_cron" => [
"/cron/delete-old-offers",
"/cron/close-old-auctions",
"/cron/delete-old-tokens",
],
];