adding example apps, fixing powerup issues
[feisty_meow.git] / production / example_apps / zippy_maps / src / Template / Pages / home.ctp
1 <?php
2 /**
3  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
5  *
6  * Licensed under The MIT License
7  * For full copyright and license information, please see the LICENSE.txt
8  * Redistributions of files must retain the above copyright notice.
9  *
10  * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11  * @link          http://cakephp.org CakePHP(tm) Project
12  * @since         0.10.0
13  * @license       http://www.opensource.org/licenses/mit-license.php MIT License
14  */
15 use Cake\Cache\Cache;
16 use Cake\Core\Configure;
17 use Cake\Core\Plugin;
18 use Cake\Datasource\ConnectionManager;
19 use Cake\Error\Debugger;
20 use Cake\Network\Exception\NotFoundException;
21
22 $this->layout = false;
23
24 if (!Configure::read('debug')):
25     throw new NotFoundException('Please replace src/Template/Pages/home.ctp with your own version.');
26 endif;
27
28 $cakeDescription = 'Maps Demo - showing what we can do to google maps';
29 ?>
30 <!DOCTYPE html>
31 <html>
32 <head>
33     <?= $this->Html->charset() ?>
34     <meta name="viewport" content="width=device-width, initial-scale=1.0">
35     <title>
36         <?= $cakeDescription ?>
37     </title>
38
39     <?= $this->Html->meta('icon') ?>
40     <?= $this->Html->css('base.css') ?>
41     <?= $this->Html->css('cake.css') ?>
42     <?= $this->Html->css('home.css') ?>
43     <link href="https://fonts.googleapis.com/css?family=Raleway:500i|Roboto:300,400,700|Roboto+Mono" rel="stylesheet">
44 </head>
45 <body class="home">
46
47         <header class="row">
48                 <div class="header-image"><?= $this->Html->image('/img/charlottesville_minimap.png') ?></div>
49                 <div class="header-title">
50                         <h1>Maps are not the territory.</h1>
51                 </div>
52         </header>
53
54         <div class="fredmenu">
55                 <ul>
56                         <li>Locations Manager: <a target="_blank" href="/locations">Map
57                                         Locations</a>
58                         </li>
59                         <li>Categories Manager: <a target="_blank" href="/categories">Map
60                                         Categories</a>
61                         </li>
62                 </ul>
63         </div>
64
65         <div class="row">
66     <div class="columns large-12">
67     <div class="header-title">
68             <h3>Based on CakePHP <?= Configure::version() ?> Red Velvet.</h3>
69     </div>
70         <div class="ctp-warning alert text-center">
71             <p>Please be aware that this page will not be shown if you turn off debug mode unless you replace src/Template/Pages/home.ctp with your own version.</p>
72         </div>
73         <div id="url-rewriting-warning" class="alert url-rewriting">
74             <ul>
75                 <li class="bullet problem">
76                     URL rewriting is not properly configured on your server.<br />
77                     1) <a target="_blank" href="http://book.cakephp.org/3.0/en/installation.html#url-rewriting">Help me configure it</a><br />
78                     2) <a target="_blank" href="http://book.cakephp.org/3.0/en/development/configuration.html#general-configuration">I don't / can't use URL rewriting</a>
79                 </li>
80             </ul>
81         </div>
82         <?php Debugger::checkSecurityKeys(); ?>
83     </div>
84 </div>
85
86 <div class="row">
87     <div class="columns large-6">
88         <h4>Environment</h4>
89         <ul>
90         <?php if (version_compare(PHP_VERSION, '5.6.0', '>=')): ?>
91             <li class="bullet success">Your version of PHP is 5.6.0 or higher (detected <?= PHP_VERSION ?>).</li>
92         <?php else: ?>
93             <li class="bullet problem">Your version of PHP is too low. You need PHP 5.6.0 or higher to use CakePHP (detected <?= PHP_VERSION ?>).</li>
94         <?php endif; ?>
95
96         <?php if (extension_loaded('mbstring')): ?>
97             <li class="bullet success">Your version of PHP has the mbstring extension loaded.</li>
98         <?php else: ?>
99             <li class="bullet problem">Your version of PHP does NOT have the mbstring extension loaded.</li>;
100         <?php endif; ?>
101
102         <?php if (extension_loaded('openssl')): ?>
103             <li class="bullet success">Your version of PHP has the openssl extension loaded.</li>
104         <?php elseif (extension_loaded('mcrypt')): ?>
105             <li class="bullet success">Your version of PHP has the mcrypt extension loaded.</li>
106         <?php else: ?>
107             <li class="bullet problem">Your version of PHP does NOT have the openssl or mcrypt extension loaded.</li>
108         <?php endif; ?>
109
110         <?php if (extension_loaded('intl')): ?>
111             <li class="bullet success">Your version of PHP has the intl extension loaded.</li>
112         <?php else: ?>
113             <li class="bullet problem">Your version of PHP does NOT have the intl extension loaded.</li>
114         <?php endif; ?>
115         </ul>
116     </div>
117     <div class="columns large-6">
118         <h4>Filesystem</h4>
119         <ul>
120         <?php if (is_writable(TMP)): ?>
121             <li class="bullet success">Your tmp directory is writable.</li>
122         <?php else: ?>
123             <li class="bullet problem">Your tmp directory is NOT writable.</li>
124         <?php endif; ?>
125
126         <?php if (is_writable(LOGS)): ?>
127             <li class="bullet success">Your logs directory is writable.</li>
128         <?php else: ?>
129             <li class="bullet problem">Your logs directory is NOT writable.</li>
130         <?php endif; ?>
131
132         <?php $settings = Cache::config('_cake_core_'); ?>
133         <?php if (!empty($settings)): ?>
134             <li class="bullet success">The <em><?= $settings['className'] ?>Engine</em> is being used for core caching. To change the config edit config/app.php</li>
135         <?php else: ?>
136             <li class="bullet problem">Your cache is NOT working. Please check the settings in config/app.php</li>
137         <?php endif; ?>
138         </ul>
139     </div>
140     <hr />
141 </div>
142
143 <div class="row">
144     <div class="columns large-6">
145         <h4>Database</h4>
146         <?php
147         try {
148             $connection = ConnectionManager::get('default');
149             $connected = $connection->connect();
150         } catch (Exception $connectionError) {
151             $connected = false;
152             $errorMsg = $connectionError->getMessage();
153             if (method_exists($connectionError, 'getAttributes')):
154                 $attributes = $connectionError->getAttributes();
155                 if (isset($errorMsg['message'])):
156                     $errorMsg .= '<br />' . $attributes['message'];
157                 endif;
158             endif;
159         }
160         ?>
161         <ul>
162         <?php if ($connected): ?>
163             <li class="bullet success">CakePHP is able to connect to the database.</li>
164         <?php else: ?>
165             <li class="bullet problem">CakePHP is NOT able to connect to the database.<br /><?= $errorMsg ?></li>
166         <?php endif; ?>
167         </ul>
168     </div>
169     <div class="columns large-6">
170         <h4>DebugKit</h4>
171         <ul>
172         <?php if (Plugin::loaded('DebugKit')): ?>
173             <li class="bullet success">DebugKit is loaded.</li>
174         <?php else: ?>
175             <li class="bullet problem">DebugKit is NOT loaded. You need to either install pdo_sqlite, or define the "debug_kit" connection name.</li>
176         <?php endif; ?>
177         </ul>
178     </div>
179     <hr />
180 </div>
181
182 <div class="row">
183     <div class="columns large-6">
184         <h3>Editing this Page</h3>
185         <ul>
186             <li class="bullet cutlery">To change the content of this page, edit: src/Template/Pages/home.ctp.</li>
187             <li class="bullet cutlery">You can also add some CSS styles for your pages at: webroot/css/.</li>
188         </ul>
189     </div>
190     <div class="columns large-6">
191         <h3>Getting Started</h3>
192         <ul>
193             <li class="bullet book"><a target="_blank" href="http://book.cakephp.org/3.0/en/">CakePHP 3.0 Docs</a></li>
194             <li class="bullet book"><a target="_blank" href="http://book.cakephp.org/3.0/en/tutorials-and-examples/bookmarks/intro.html">The 15 min Bookmarker Tutorial</a></li>
195             <li class="bullet book"><a target="_blank" href="http://book.cakephp.org/3.0/en/tutorials-and-examples/blog/blog.html">The 15 min Blog Tutorial</a></li>
196         </ul>
197         <p>
198     </div>
199 </div>
200
201 <div class="row">
202     <div class="columns large-12 text-center">
203         <h3 class="more">More about Cake</h3>
204         <p>
205             CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Front Controller and MVC.<br />
206             Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.
207         </p>
208     </div>
209     <hr/>
210 </div>
211
212 <div class="row">
213     <div class="columns large-4">
214         <i class="icon support">P</i>
215         <h3>Help and Bug Reports</h3>
216         <ul>
217             <li class="bullet cutlery">
218                 <a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a>
219                 <ul><li>Live chat about CakePHP</li></ul>
220             </li>
221             <li class="bullet cutlery">
222                 <a href="https://github.com/cakephp/cakephp/issues">CakePHP Issues</a>
223                 <ul><li>CakePHP issues and pull requests</li></ul>
224             </li>
225             <li class="bullet cutlery">
226                 <a href="http://discourse.cakephp.org/">CakePHP Forum</a>
227                 <ul><li>CakePHP official discussion forum</li></ul>
228             </li>
229             <li class="bullet cutlery">
230                 <a href="https://groups.google.com/group/cake-php">CakePHP Google Group</a>
231                 <ul><li>Community mailing list</li></ul>
232             </li>
233         </ul>
234     </div>
235     <div class="columns large-4">
236         <i class="icon docs">r</i>
237         <h3>Docs and Downloads</h3>
238         <ul>
239             <li class="bullet cutlery">
240                 <a href="http://api.cakephp.org/3.0/">CakePHP API</a>
241                 <ul><li>Quick Reference</li></ul>
242             </li>
243             <li class="bullet cutlery">
244                 <a href="http://book.cakephp.org/3.0/en/">CakePHP Documentation</a>
245                 <ul><li>Your Rapid Development Cookbook</li></ul>
246             </li>
247             <li class="bullet cutlery">
248                 <a href="http://bakery.cakephp.org">The Bakery</a>
249                 <ul><li>Everything CakePHP</li></ul>
250             </li>
251             <li class="bullet cutlery">
252                 <a href="http://plugins.cakephp.org">CakePHP plugins repo</a>
253                 <ul><li>A comprehensive list of all CakePHP plugins created by the community</li></ul>
254             </li>
255             <li class="bullet cutlery">
256                 <a href="https://github.com/cakephp/">CakePHP Code</a>
257                 <ul><li>For the Development of CakePHP Git repository, Downloads</li></ul>
258             </li>
259             <li class="bullet cutlery">
260                 <a href="https://github.com/FriendsOfCake/awesome-cakephp">CakePHP Awesome List</a>
261                 <ul><li>A curated list of amazingly awesome CakePHP plugins, resources and shiny things.</li></ul>
262             </li>
263             <li class="bullet cutlery">
264                 <a href="http://www.cakephp.org">CakePHP</a>
265                 <ul><li>The Rapid Development Framework</li></ul>
266             </li>
267         </ul>
268     </div>
269     <div class="columns large-4">
270         <i class="icon training">s</i>
271         <h3>Training and Certification</h3>
272         <ul>
273             <li class="bullet cutlery">
274                 <a href="http://cakefoundation.org/">Cake Software Foundation</a>
275                 <ul><li>Promoting development related to CakePHP</li></ul>
276             </li>
277             <li class="bullet cutlery">
278                 <a href="http://training.cakephp.org/">CakePHP Training</a>
279                 <ul><li>Learn to use the CakePHP framework</li></ul>
280             </li>
281             <li class="bullet cutlery">
282                 <a href="http://certification.cakephp.org/">CakePHP Certification</a>
283                 <ul><li>Become a certified CakePHP developer</li></ul>
284             </li>
285         </ul>
286     </div>
287 </div>
288
289 </body>
290 </html>