Base for a static organization website

home.ctp 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?php
  2. /**
  3. * @link http://cakephp.org CakePHP(tm) Project
  4. * @package app.View.Pages
  5. * @since CakePHP(tm) v 0.10.0.1076
  6. */
  7. if (!Configure::read('debug')):
  8. throw new NotFoundException();
  9. endif;
  10. App::uses('Debugger', 'Utility');
  11. ?>
  12. <h2><?php echo __d('cake_dev', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2>
  13. <p>
  14. <?php echo $this->Html->link(__d('cake_dev', 'Read the changelog'), 'http://cakephp.org/changelogs/' . Configure::version()); ?>
  15. </p>
  16. <?php
  17. if (Configure::read('debug') > 0):
  18. Debugger::checkSecurityKeys();
  19. endif;
  20. ?>
  21. <?php if (file_exists(WWW_ROOT . 'css' . DS . 'cake.generic.css')): ?>
  22. <p id="url-rewriting-warning" style="background-color:#e32; color:#fff;">
  23. <?php echo __d('cake_dev', 'URL rewriting is not properly configured on your server.'); ?>
  24. 1) <a target="_blank" href="http://book.cakephp.org/2.0/en/installation/url-rewriting.html" style="color:#fff;">Help me configure it</a>
  25. 2) <a target="_blank" href="http://book.cakephp.org/2.0/en/development/configuration.html#cakephp-core-configuration" style="color:#fff;">I don't / can't use URL rewriting</a>
  26. </p>
  27. <?php endif; ?>
  28. <p>
  29. <?php
  30. if (version_compare(PHP_VERSION, '5.2.8', '>=')):
  31. echo '<span class="notice success">';
  32. echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.');
  33. echo '</span>';
  34. else:
  35. echo '<span class="notice">';
  36. echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.');
  37. echo '</span>';
  38. endif;
  39. ?>
  40. </p>
  41. <p>
  42. <?php
  43. if (is_writable(TMP)):
  44. echo '<span class="notice success">';
  45. echo __d('cake_dev', 'Your tmp directory is writable.');
  46. echo '</span>';
  47. else:
  48. echo '<span class="notice">';
  49. echo __d('cake_dev', 'Your tmp directory is NOT writable.');
  50. echo '</span>';
  51. endif;
  52. ?>
  53. </p>
  54. <p>
  55. <?php
  56. $settings = Cache::settings();
  57. if (!empty($settings)):
  58. echo '<span class="notice success">';
  59. echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit %s', '<em>' . $settings['engine'] . 'Engine</em>', 'APP/Config/core.php');
  60. echo '</span>';
  61. else:
  62. echo '<span class="notice">';
  63. echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in %s', 'APP/Config/core.php');
  64. echo '</span>';
  65. endif;
  66. ?>
  67. </p>
  68. <p>
  69. <?php
  70. $filePresent = null;
  71. if (file_exists(APP . 'Config' . DS . 'database.php')):
  72. echo '<span class="notice success">';
  73. echo __d('cake_dev', 'Your database configuration file is present.');
  74. $filePresent = true;
  75. echo '</span>';
  76. else:
  77. echo '<span class="notice">';
  78. echo __d('cake_dev', 'Your database configuration file is NOT present.');
  79. echo '<br/>';
  80. echo __d('cake_dev', 'Rename %s to %s', 'APP/Config/database.php.default', 'APP/Config/database.php');
  81. echo '</span>';
  82. endif;
  83. ?>
  84. </p>
  85. <?php
  86. if (isset($filePresent)):
  87. App::uses('ConnectionManager', 'Model');
  88. try {
  89. $connected = ConnectionManager::getDataSource('default');
  90. } catch (Exception $connectionError) {
  91. $connected = false;
  92. $errorMsg = $connectionError->getMessage();
  93. if (method_exists($connectionError, 'getAttributes')):
  94. $attributes = $connectionError->getAttributes();
  95. if (isset($errorMsg['message'])):
  96. $errorMsg .= '<br />' . $attributes['message'];
  97. endif;
  98. endif;
  99. }
  100. ?>
  101. <p>
  102. <?php
  103. if ($connected && $connected->isConnected()):
  104. echo '<span class="notice success">';
  105. echo __d('cake_dev', 'CakePHP is able to connect to the database.');
  106. echo '</span>';
  107. else:
  108. echo '<span class="notice">';
  109. echo __d('cake_dev', 'CakePHP is NOT able to connect to the database.');
  110. echo '<br /><br />';
  111. echo $errorMsg;
  112. echo '</span>';
  113. endif;
  114. ?>
  115. </p>
  116. <?php
  117. endif;
  118. App::uses('Validation', 'Utility');
  119. if (!Validation::alphaNumeric('cakephp')):
  120. echo '<p><span class="notice">';
  121. echo __d('cake_dev', 'PCRE has not been compiled with Unicode support.');
  122. echo '<br/>';
  123. echo __d('cake_dev', 'Recompile PCRE with Unicode support by adding <code>--enable-unicode-properties</code> when configuring');
  124. echo '</span></p>';
  125. endif;
  126. ?>
  127. <p>
  128. <?php
  129. if (CakePlugin::loaded('DebugKit')):
  130. echo '<span class="notice success">';
  131. echo __d('cake_dev', 'DebugKit plugin is present');
  132. echo '</span>';
  133. else:
  134. echo '<span class="notice">';
  135. echo __d('cake_dev', 'DebugKit is not installed. It will help you inspect and debug different aspects of your application.');
  136. echo '<br/>';
  137. echo __d('cake_dev', 'You can install it from %s', $this->Html->link('GitHub', 'https://github.com/cakephp/debug_kit/tree/2.2'));
  138. echo '</span>';
  139. endif;
  140. ?>
  141. </p>
  142. <h3><?php echo __d('cake_dev', 'Editing this Page'); ?></h3>
  143. <p>
  144. <?php
  145. echo __d('cake_dev', 'To change the content of this page, edit: %s.<br />
  146. To change its layout, edit: %s.<br />
  147. You can also add some CSS styles for your pages at: %s.',
  148. 'APP/View/Pages/home.ctp', 'APP/View/Layouts/default.ctp', 'APP/webroot/css');
  149. ?>
  150. </p>
  151. <h3><?php echo __d('cake_dev', 'Getting Started'); ?></h3>
  152. <p>
  153. <?php
  154. echo $this->Html->link(
  155. sprintf('<strong>%s</strong> %s', __d('cake_dev', 'New'), __d('cake_dev', 'CakePHP 2.0 Docs')),
  156. 'http://book.cakephp.org/2.0/en/',
  157. array('target' => '_blank', 'escape' => false)
  158. );
  159. ?>
  160. </p>
  161. <p>
  162. <?php
  163. echo $this->Html->link(
  164. __d('cake_dev', 'The 15 min Blog Tutorial'),
  165. 'http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html',
  166. array('target' => '_blank', 'escape' => false)
  167. );
  168. ?>
  169. </p>
  170. <h3><?php echo __d('cake_dev', 'Official Plugins'); ?></h3>
  171. <p>
  172. <ul>
  173. <li>
  174. <?php echo $this->Html->link('DebugKit', 'https://github.com/cakephp/debug_kit/tree/2.2') ?>:
  175. <?php echo __d('cake_dev', 'provides a debugging toolbar and enhanced debugging tools for CakePHP applications.'); ?>
  176. </li>
  177. <li>
  178. <?php echo $this->Html->link('Localized', 'https://github.com/cakephp/localized') ?>:
  179. <?php echo __d('cake_dev', 'contains various localized validation classes and translations for specific countries'); ?>
  180. </li>
  181. </ul>
  182. </p>
  183. <h3><?php echo __d('cake_dev', 'More about CakePHP'); ?></h3>
  184. <p>
  185. <?php echo __d('cake_dev', 'CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.'); ?>
  186. </p>
  187. <p>
  188. <?php echo __d('cake_dev', '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.'); ?>
  189. </p>
  190. <ul>
  191. <li><a href="http://cakephp.org">CakePHP</a>
  192. <ul><li><?php echo __d('cake_dev', 'The Rapid Development Framework'); ?></li></ul></li>
  193. <li><a href="http://book.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Documentation'); ?> </a>
  194. <ul><li><?php echo __d('cake_dev', 'Your Rapid Development Cookbook'); ?></li></ul></li>
  195. <li><a href="http://api.cakephp.org"><?php echo __d('cake_dev', 'CakePHP API'); ?> </a>
  196. <ul><li><?php echo __d('cake_dev', 'Quick API Reference'); ?></li></ul></li>
  197. <li><a href="http://bakery.cakephp.org"><?php echo __d('cake_dev', 'The Bakery'); ?> </a>
  198. <ul><li><?php echo __d('cake_dev', 'Everything CakePHP'); ?></li></ul></li>
  199. <li><a href="http://plugins.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Plugins'); ?> </a>
  200. <ul><li><?php echo __d('cake_dev', 'A comprehensive list of all CakePHP plugins created by the community'); ?></li></ul></li>
  201. <li><a href="http://community.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Community Center'); ?> </a>
  202. <ul><li><?php echo __d('cake_dev', 'Everything related to the CakePHP community in one place'); ?></li></ul></li>
  203. <li><a href="https://groups.google.com/group/cake-php"><?php echo __d('cake_dev', 'CakePHP Google Group'); ?> </a>
  204. <ul><li><?php echo __d('cake_dev', 'Community mailing list'); ?></li></ul></li>
  205. <li><a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a>
  206. <ul><li><?php echo __d('cake_dev', 'Live chat about CakePHP'); ?></li></ul></li>
  207. <li><a href="https://github.com/cakephp/"><?php echo __d('cake_dev', 'CakePHP Code'); ?> </a>
  208. <ul><li><?php echo __d('cake_dev', 'Find the CakePHP code on GitHub and contribute to the framework'); ?></li></ul></li>
  209. <li><a href="https://github.com/cakephp/cakephp/issues"><?php echo __d('cake_dev', 'CakePHP Issues'); ?> </a>
  210. <ul><li><?php echo __d('cake_dev', 'CakePHP Issues'); ?></li></ul></li>
  211. <li><a href="https://github.com/cakephp/cakephp/wiki#roadmaps"><?php echo __d('cake_dev', 'CakePHP Roadmaps'); ?> </a>
  212. <ul><li><?php echo __d('cake_dev', 'CakePHP Roadmaps'); ?></li></ul></li>
  213. <li><a href="http://training.cakephp.org"><?php echo __d('cake_dev', 'Training'); ?> </a>
  214. <ul><li><?php echo __d('cake_dev', 'Join a live session and get skilled with the framework'); ?></li></ul></li>
  215. <li><a href="http://cakefest.org"><?php echo __d('cake_dev', 'CakeFest'); ?> </a>
  216. <ul><li><?php echo __d('cake_dev', 'Don\'t miss our annual CakePHP conference'); ?></li></ul></li>
  217. <li><a href="http://cakefoundation.org"><?php echo __d('cake_dev', 'Cake Software Foundation'); ?> </a>
  218. <ul><li><?php echo __d('cake_dev', 'Promoting development related to CakePHP'); ?></li></ul></li>
  219. </ul>