lancew/DojoList

View on GitHub
index.php.default

Summary

Maintainability
Test Coverage
<?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();