Base for a static organization website

environment_panel.ctp 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * Environment Panel Element
  4. *
  5. * Shows information about the current app environment
  6. *
  7. * PHP 5
  8. *
  9. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  10. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. *
  12. * Licensed under The MIT License
  13. * Redistributions of files must retain the above copyright notice.
  14. *
  15. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  16. * @link http://cakephp.org CakePHP(tm) Project
  17. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  18. */
  19. ?>
  20. <h2><?php echo __d('debug_kit', 'App Constants'); ?></h2>
  21. <?php
  22. if (!empty($content['app'])) {
  23. $cakeRows = array();
  24. foreach ($content['app'] as $key => $val) {
  25. $cakeRows[] = array(
  26. $key,
  27. $val
  28. );
  29. }
  30. $headers = array('Constant', 'Value');
  31. echo $this->Toolbar->table($cakeRows, $headers, array('title' => 'Application Environment Vars'));
  32. } else {
  33. echo "No application environment available.";
  34. } ?>
  35. <h2><?php echo __d('debug_kit', 'CakePHP Constants'); ?></h2>
  36. <?php
  37. if (!empty($content['cake'])) {
  38. $cakeRows = array();
  39. foreach ($content['cake'] as $key => $val) {
  40. $cakeRows[] = array(
  41. h($key),
  42. h($val)
  43. );
  44. }
  45. $headers = array('Constant', 'Value');
  46. echo $this->Toolbar->table($cakeRows, $headers, array('title' => 'CakePHP Environment Vars'));
  47. } else {
  48. echo "CakePHP environment unavailable.";
  49. } ?>
  50. <h2><?php echo __d('debug_kit', 'PHP Environment');?></h2>
  51. <?php
  52. $headers = array('Environment Variable', 'Value');
  53. if (!empty($content['php'])) {
  54. $phpRows = array();
  55. foreach ($content['php'] as $key => $val) {
  56. $phpRows[] = array(
  57. h(Inflector::humanize(strtolower($key))),
  58. h($val)
  59. );
  60. }
  61. echo $this->Toolbar->table($phpRows, $headers, array('title' => 'CakePHP Environment Vars'));
  62. } else {
  63. echo "PHP environment unavailable.";
  64. }
  65. if (isset($content['hidef'])) {
  66. echo '<h2>' . __d('debug_kit', 'Hidef Environment') . '</h2>';
  67. if (!empty($content['hidef'])) {
  68. $cakeRows = array();
  69. foreach ($content['hidef'] as $key => $val) {
  70. $cakeRows[] = array(
  71. h($key),
  72. h($val)
  73. );
  74. }
  75. $headers = array('Constant', 'Value');
  76. echo $this->Toolbar->table($cakeRows, $headers, array('title' => 'Hidef Environment Vars'));
  77. } else {
  78. echo "No Hidef environment available.";
  79. }
  80. }