You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
507 B

8 years ago
8 years ago
  1. <?php
  2. date_default_timezone_set('UTC');
  3. if(array_key_exists('ENV', $_ENV)) {
  4. require(dirname(__FILE__).'/../config.'.$_ENV['ENV'].'.php');
  5. } else {
  6. require(dirname(__FILE__).'/../config.php');
  7. }
  8. ORM::configure('mysql:host=' . Config::$db['host'] . ';dbname=' . Config::$db['database']);
  9. ORM::configure('username', Config::$db['username']);
  10. ORM::configure('password', Config::$db['password']);
  11. function view($template, $data=[]) {
  12. global $templates;
  13. return $templates->render($template, $data);
  14. }