/
index.php.default
executable file
·108 lines (68 loc) · 3.31 KB
/
index.php.default
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
<?php
// ============
// ! DojoList - An open source Dojo listing system created by Lance Wicks.
// Copyright (C) 2009-2010 Lance Wicks
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// ============
// Specify location of translation tables
//bindtextdomain ("messages", "./locale");
// Choose domain
//textdomain ("messages");
require_once 'lib/limonade.php';
function configure()
{
#option('base_uri', '/'); # '/' or same as the RewriteBase in your .htaccess
# comment out the above line if you don't have the .htaccess file and rewrite setup.
option('version', '0.8.0'); #DojoList version.
option('GoogleKey',''); # This field must be completed for maps to work. See the project Wiki for details
option('recaptcha_public_key', ''); # This field must be filled in.
option('recaptcha_private_key', ''); # This field must be filled in.
option('limonade_dir', file_path('lib'));
option('limonade_views_dir', file_path('lib', 'limonade', 'views'));
option('limonade_public_dir',file_path('lib', 'limonade','public'));
option('public_dir', file_path('public'));
option('views_dir', file_path('views'));
option('controllers_dir', file_path('controllers'));
option('lib_dir', file_path('lib'));
option('css_dir', file_path('css'));
option('js_dir', file_path('js'));
option('images_dir', file_path('images'));
option('data_dir', file_path('data'));
option('site_url', 'http://'.$_SERVER['SERVER_NAME']);
option('password', 'passw0rd');
}
layout('default_layout.php');
// main controller
dispatch ('/', 'Main_page');
dispatch_get ('/dojo/', 'Html_list');
dispatch_get ('/dojo/create', 'Dojo_create');
dispatch_post ('/dojo/create', 'Dojo_Create_add');
// The dojo/create paths have to be above the view path to work.
dispatch ('/dojo/:dojo', 'Dojo_view');
dispatch_get ('/dojo/:dojo/delete', 'Dojo_Delete');
dispatch_post ('/dojo/:dojo/delete', 'Dojo_Delete_end');
dispatch ('/dojo/:dojo/edit', 'Dojo_editform');
dispatch_post ('/dojo/:dojo/edit', 'Dojo_Editform_end');
dispatch_get ('/admin/createkml', 'Admin_Create_kml');
dispatch_get ('/admin/createhtml', 'Admin_Create_html');
dispatch_get ('/admin/importjwm', 'Admin_importjwm');
dispatch_get ('/admin/sortxml', 'Admin_Sort_xml');
dispatch ('/dojo/:dojo/image', 'DojoLogo');
dispatch ('/judoka/create', 'Judoka_Create');
dispatch ('/judoka/:judoka/edit', 'Judoka_Edit');
dispatch ('/judoka/:judoka/delete', 'Judoka_Delete');
dispatch ('/judoka/:judoka/', 'Judoka_View');
dispatch_get ('/html', 'Html_list');
run();