PageRenderTime 38ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/app/config/bootstrap.php

https://github.com/ata/steak
PHP | 81 lines | 26 code | 8 blank | 47 comment | 0 complexity | 49ec5c076b8a82b7850de4447a00a8ed MD5 | raw file
  1. <?php
  2. /**
  3. * This file is loaded automatically by the app/webroot/index.php file after the core bootstrap.php
  4. *
  5. * This is an application wide file to load any function that is not used within a class
  6. * define. You can also use this to include or require any files in your application.
  7. *
  8. * PHP versions 4 and 5
  9. *
  10. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  11. * Copyright 2005-2008, Cake Software Foundation, Inc. (http://cakefoundation.org)
  12. *
  13. * Licensed under The MIT License
  14. * Redistributions of files must retain the above copyright notice.
  15. *
  16. * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://cakefoundation.org)
  17. * @link http://cakephp.org CakePHP(tm) Project
  18. * @package cake
  19. * @subpackage cake.app.config
  20. * @since CakePHP(tm) v 0.10.8.2117
  21. * @license http://www.opensource.org/licenses/mit-license.php The MIT License
  22. */
  23. /**
  24. * The settings below can be used to set additional paths to models, views and controllers.
  25. * This is related to Ticket #470 (https://trac.cakephp.org/ticket/470)
  26. *
  27. * App::build(array(
  28. * 'plugins' => array('/full/path/to/plugins/', '/next/full/path/to/plugins/'),
  29. * 'models' => array('/full/path/to/models/', '/next/full/path/to/models/'),
  30. * 'views' => array('/full/path/to/views/', '/next/full/path/to/views/'),
  31. * 'controllers' => array(/full/path/to/controllers/', '/next/full/path/to/controllers/'),
  32. * 'datasources' => array('/full/path/to/datasources/', '/next/full/path/to/datasources/'),
  33. * 'behaviors' => array('/full/path/to/behaviors/', '/next/full/path/to/behaviors/'),
  34. * 'components' => array('/full/path/to/components/', '/next/full/path/to/components/'),
  35. * 'helpers' => array('/full/path/to/helpers/', '/next/full/path/to/helpers/'),
  36. * 'vendors' => array('/full/path/to/vendors/', '/next/full/path/to/vendors/'),
  37. * 'shells' => array('/full/path/to/shells/', '/next/full/path/to/shells/'),
  38. * 'locales' => array('/full/path/to/locale/', '/next/full/path/to/locale/')
  39. * ));
  40. *
  41. */
  42. /**
  43. * As of 1.3, additional rules for the inflector are added below
  44. *
  45. * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  46. * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
  47. *
  48. */
  49. date_default_timezone_set('Asia/Jakarta');
  50. define('ADMIN','ADMIN');
  51. define('DOSEN','DOSEN');
  52. define('MAHASISWA','MAHASISWA');
  53. define('PEGAWAI','PEGAWAI');
  54. define('GROUP_ADMIN', 1);
  55. define('GROUP_PEGAWAI', 2);
  56. define('GROUP_DOSEN', 3);
  57. define('GROUP_MAHASISWA', 4);
  58. define('REQUEST_MISSING_ID', 11);
  59. define('REQUEST_INVALID_ID', 12);
  60. define('REQUEST_OK', 13);
  61. define('COLUMN_SELECTOR', 21);
  62. define('COLUMN_ACTION', 22);
  63. define('EPSBED_DIR',WWW_ROOT.'files'.DS.'epsbed'.DS);
  64. function rupiah(){
  65. return array(
  66. 'before'=>'', 'after' => '', 'zero' => 0, 'places' => 0, 'thousands' => '.',
  67. 'decimals' => ',', 'negative' => '()', 'escape' => false);
  68. }
  69. class Constant{
  70. public static $group = array('ADMIN'=>1,'PEGAWAI'=>2,'DOSEN'=>3,'MAHASISWA'=>4);
  71. public static $group_list = array("ADMIN"=>"ADMIN","MAHASISWA"=>"MAHASISWA","DOSEN"=>"DOSEN","PEGAWAI"=>"PEGAWAI");
  72. }
  73. ?>