Subversion-Projekte lars-tiefland.cakephp

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
$output = "<h2>Sweet, \"".Inflector::humanize($app)."\" got Baked by CakePHP!</h2>\n";
3
$output .="
4
<?php
5
if (Configure::read() > 0):
6
	Debugger::checkSessionKey();
7
endif;
8
?>
9
<p>
10
<?php
11
	if (is_writable(TMP)):
12
		echo '<span class=\"notice success\">';
13
			__('Your tmp directory is writable.');
14
		echo '</span>';
15
	else:
16
		echo '<span class=\"notice\">';
17
			__('Your tmp directory is NOT writable.');
18
		echo '</span>';
19
	endif;
20
?>
21
</p>
22
<p>
23
<?php
24
	\$settings = Cache::settings();
25
	if (!empty(\$settings)):
26
		echo '<span class=\"notice success\">';
27
				echo sprintf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. \$settings['engine'] . 'Engine</em>');
28
		echo '</span>';
29
	else:
30
		echo '<span class=\"notice\">';
31
				__('Your cache is NOT working. Please check the settings in APP/config/core.php');
32
		echo '</span>';
33
	endif;
34
?>
35
</p>
36
<p>
37
<?php
38
	\$filePresent = null;
39
	if (file_exists(CONFIGS . 'database.php')):
40
		echo '<span class=\"notice success\">';
41
			__('Your database configuration file is present.');
42
			\$filePresent = true;
43
		echo '</span>';
44
	else:
45
		echo '<span class=\"notice\">';
46
			__('Your database configuration file is NOT present.');
47
			echo '<br/>';
48
			__('Rename config/database.php.default to config/database.php');
49
		echo '</span>';
50
	endif;
51
?>
52
</p>
53
<?php
54
if (!empty(\$filePresent)):
55
 	uses('model' . DS . 'connection_manager');
56
	\$db = ConnectionManager::getInstance();
57
 	\$connected = \$db->getDataSource('default');
58
?>
59
<p>
60
<?php
61
	if (\$connected->isConnected()):
62
		echo '<span class=\"notice success\">';
63
 			__('Cake is able to connect to the database.');
64
		echo '</span>';
65
	else:
66
		echo '<span class=\"notice\">';
67
			__('Cake is NOT able to connect to the database.');
68
		echo '</span>';
69
	endif;
70
?>
71
</p>\n";
72
$output .= "<?php endif;?>\n";
73
$output .= "<h3><?php __('Editing this Page') ?></h3>\n";
74
$output .= "<p>\n";
75
$output .= "<?php\n";
76
$output .= "\techo sprintf(__('To change the content of this page, edit: %s\n";
77
$output .= "\t\tTo change its layout, edit: %s\n";
78
$output .= "\t\tYou can also add some CSS styles for your pages at: %s', true),\n";
79
$output .= "\t\tAPP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />',  APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');\n";
80
$output .= "?>\n";
81
$output .= "</p>\n";
82
?>