Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
12345 anikendra 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
 
36
<h2><?php echo __d('debug_kit', 'CakePHP Constants'); ?></h2>
37
<?php
38
	if (!empty($content['cake'])) {
39
		$cakeRows = array();
40
		foreach ($content['cake'] as $key => $val) {
41
			$cakeRows[] = array(
42
				h($key),
43
				h($val)
44
			);
45
		}
46
		$headers = array('Constant', 'Value');
47
		echo $this->Toolbar->table($cakeRows, $headers, array('title' => 'CakePHP Environment Vars'));
48
	} else {
49
		echo "CakePHP environment unavailable.";
50
	} ?>
51
 
52
<h2><?php echo __d('debug_kit', 'PHP Environment');?></h2>
53
<?php
54
	$headers = array('Environment Variable', 'Value');
55
 
56
	if (!empty($content['php'])) {
57
		$phpRows = array();
58
		foreach ($content['php'] as $key => $val) {
59
			$phpRows[] = array(
60
				h(Inflector::humanize(strtolower($key))),
61
				h($val)
62
			);
63
		}
64
		echo $this->Toolbar->table($phpRows, $headers, array('title' => 'CakePHP Environment Vars'));
65
	} else {
66
		echo "PHP environment unavailable.";
67
	}
68
 
69
	if (isset($content['hidef'])) {
70
		echo '<h2>' . __d('debug_kit', 'Hidef Environment') . '</h2>';
71
		if (!empty($content['hidef'])) {
72
			$cakeRows = array();
73
			foreach ($content['hidef'] as $key => $val) {
74
				$cakeRows[] = array(
75
					h($key),
76
					h($val)
77
				);
78
			}
79
			$headers = array('Constant', 'Value');
80
			echo $this->Toolbar->table($cakeRows, $headers, array('title' => 'Hidef Environment Vars'));
81
		} else {
82
			echo "No Hidef environment available.";
83
		}
84
	}