phpDocumentor base
[ class tree: base ] [ index: base ] [ all elements ]

Source for file Initialize.php

Documentation is available at Initialize.php

  1. <?
  2. /**
  3. * The Initialize resource file.
  4. * Initialize the system constants from the POST/GET request
  5. * or from the default values
  6. *
  7. * @package base
  8. * @filesource
  9. * @see HTML_BASE_RESOURCE_PATH/Initialize.php
  10. * @copyright (c) http://Finn-Rasmussen.com
  11. * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
  12. * @author http://Finn-Rasmussen.com
  13. * @version 1.9
  14. * @since 21-oct-2005
  15. */
  16.  
  17. /**
  18. * @global DEBUG_LEVEL The Debug Level to use
  19. */
  20. if (!defined('DEBUG_LEVEL')) {
  21. if (empty($_GET[REQUEST_DEBUG_LEVEL])) {
  22. if (empty($_POST[REQUEST_DEBUG_LEVEL])) {
  23. // define Debug Level to use later
  24. } else {
  25. /**
  26. * @ignore
  27. */
  28. define('DEBUG_LEVEL' ,$_POST[REQUEST_DEBUG_LEVEL]);
  29. }
  30. } else {
  31. /**
  32. * @ignore
  33. */
  34. define('DEBUG_LEVEL' ,$_GET[REQUEST_DEBUG_LEVEL]);
  35. }
  36. }
  37.  
  38. /**
  39. * @global LANGUAGE The Language to use
  40. */
  41. if (!defined('LANGUAGE')) {
  42. if (empty($_GET[REQUEST_LANGUAGE])) {
  43. if (empty($_POST[REQUEST_LANGUAGE])) {
  44. if (defined('DEFAULT_LANGUAGE') && DEFAULT_LANGUAGE!='') {
  45. define('LANGUAGE', DEFAULT_LANGUAGE);
  46. } else {
  47. if (!empty($_SERVER['ACCEPT_LANGUAGE'])) {
  48. /**
  49. * @ignore
  50. */
  51. define('LANGUAGE', $_SERVER['ACCEPT_LANGUAGE']); // Naitive Language
  52. } else {
  53. /**
  54. * @ignore
  55. */
  56. define('LANGUAGE', DEFAULT_LANGUAGE); // MUST be initialized here !
  57. }
  58. }
  59. } else {
  60. /**
  61. * @ignore
  62. */
  63. define('LANGUAGE' ,$_POST[REQUEST_LANGUAGE]);
  64. }
  65. } else {
  66. /**
  67. * @ignore
  68. */
  69. define('LANGUAGE' ,$_GET[REQUEST_LANGUAGE]);
  70. }
  71. }
  72. ?>

Documentation generated on Thu, 22 Dec 2005 17:12:03 +0100 by phpDocumentor 1.3.0RC3