|
1 | 1 | <?php
|
2 | 2 |
|
3 | 3 | if (!isset($_SERVER['HTTP_HOST'])) {
|
4 |
| - exit('This script cannot be run from the CLI. Run it from a browser.'); |
| 4 | + exit('This script cannot be run from the console. Run it from a browser.'); |
5 | 5 | }
|
6 | 6 |
|
7 |
| -if (!in_array(@$_SERVER['REMOTE_ADDR'], array( |
8 |
| - '127.0.0.1', |
9 |
| - '::1', |
10 |
| -))) { |
| 7 | +if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) { |
11 | 8 | header('HTTP/1.0 403 Forbidden');
|
12 | 9 | exit('This script is only accessible from localhost.');
|
13 | 10 | }
|
|
20 | 17 | $minorProblems = $symfonyRequirements->getFailedRecommendations();
|
21 | 18 |
|
22 | 19 | ?>
|
| 20 | + |
23 | 21 | <!DOCTYPE html>
|
24 | 22 | <html>
|
25 | 23 | <head>
|
26 |
| - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
27 |
| - <meta name="robots" content="noindex,nofollow" /> |
28 |
| - <title>Symfony Configuration</title> |
29 |
| - <link rel="stylesheet" href="bundles/framework/css/structure.css" media="all" /> |
30 |
| - <link rel="stylesheet" href="bundles/framework/css/body.css" media="all" /> |
31 |
| - <link rel="stylesheet" href="bundles/sensiodistribution/webconfigurator/css/install.css" media="all" /> |
| 24 | + <meta charset="UTF-8" /> |
| 25 | + <title>Symfony Demo Application</title> |
| 26 | + <link rel="stylesheet" href="/css/app.css"> |
| 27 | + <link rel="icon" type="image/x-icon" href="/favicon.ico" /> |
32 | 28 | </head>
|
33 |
| - <body> |
34 |
| - <div id="content"> |
35 |
| - <div class="header clear-fix"> |
36 |
| - <div class="header-logo"> |
37 |
| - <img src="bundles/framework/images/logo_symfony.png" alt="Symfony" /> |
38 |
| - </div> |
39 |
| - |
40 |
| - <div class="search"> |
41 |
| - <form method="get" action="http://symfony.com/search"> |
42 |
| - <div class="form-row"> |
43 | 29 |
|
44 |
| - <label for="search-id"> |
45 |
| - <img src="bundles/framework/images/grey_magnifier.png" alt="Search on Symfony website" /> |
46 |
| - </label> |
47 |
| - |
48 |
| - <input name="q" id="search-id" type="search" placeholder="Search on Symfony website" /> |
49 |
| - |
50 |
| - <button type="submit" class="sf-button"> |
51 |
| - <span class="border-l"> |
52 |
| - <span class="border-r"> |
53 |
| - <span class="btn-bg">OK</span> |
54 |
| - </span> |
| 30 | + <body id="requirements_checker"> |
| 31 | + <header> |
| 32 | + <div class="navbar navbar-default navbar-static-top" role="navigation"> |
| 33 | + <div class="container"> |
| 34 | + <div class="navbar-header"> |
| 35 | + <h1 class="navbar-brand"> |
| 36 | + Symfony Demo Application <span>/</span> Technical Requirements Checker |
55 | 37 | </span>
|
56 |
| - </button> |
57 | 38 | </div>
|
58 |
| - </form> |
59 | 39 | </div>
|
60 | 40 | </div>
|
| 41 | + </header> |
61 | 42 |
|
62 |
| - <div class="sf-reset"> |
63 |
| - <div class="block"> |
64 |
| - <div class="symfony-block-content"> |
65 |
| - <h1 class="title">Welcome!</h1> |
66 |
| - <p>Welcome to the <strong>Symfony Demo Application</strong>.</p> |
67 |
| - <p> |
68 |
| - This script will guide you through the required and optional environment configuration parameters for this project. |
69 |
| - </p> |
70 |
| - |
| 43 | + <div class="container body-container"> |
| 44 | + <div class="row"> |
| 45 | + <div id="main" class="col-sm-9"> |
| 46 | + <div class="row"> |
71 | 47 | <?php if (count($majorProblems)): ?>
|
72 |
| - <h2 class="ko">Major problems</h2> |
73 |
| - <p>Major problems have been detected and <strong>must</strong> be fixed before continuing:</p> |
74 |
| - <ol> |
75 |
| - <?php foreach ($majorProblems as $problem): ?> |
76 |
| - <li><?php echo $problem->getHelpHtml() ?></li> |
77 |
| - <?php endforeach; ?> |
78 |
| - </ol> |
| 48 | + <div class="panel panel-danger"> |
| 49 | + <div class="panel-heading"> |
| 50 | + <h3 class="panel-title"> |
| 51 | + <i class="fa fa-exclamation-circle"></i> |
| 52 | + Fix these problems before continuing |
| 53 | + </h3> |
| 54 | + </div> |
| 55 | + <div class="panel-body"> |
| 56 | + <p>These <strong>mandatory requirements</strong> must be fixed before running Symfony applications:</p> |
| 57 | + |
| 58 | + <ol> |
| 59 | + <?php foreach ($majorProblems as $problem): ?> |
| 60 | + <li><?php echo $problem->getHelpHtml() ?></li> |
| 61 | + <?php endforeach; ?> |
| 62 | + </ol> |
| 63 | + </div> |
| 64 | + </div> |
79 | 65 | <?php endif; ?>
|
80 | 66 |
|
81 | 67 | <?php if (count($minorProblems)): ?>
|
82 |
| - <h2>Recommendations</h2> |
83 |
| - <p> |
84 |
| - <?php if (count($majorProblems)): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience, |
85 |
| - it’s recommended that you fix the following: |
86 |
| - </p> |
87 |
| - <ol> |
88 |
| - <?php foreach ($minorProblems as $problem): ?> |
89 |
| - <li><?php echo $problem->getHelpHtml() ?></li> |
90 |
| - <?php endforeach; ?> |
91 |
| - </ol> |
| 68 | + <div class="panel panel-warning"> |
| 69 | + <div class="panel-heading"> |
| 70 | + <h3 class="panel-title"> |
| 71 | + <i class="fa fa-exclamation-triangle"></i> |
| 72 | + Fix these problems to improve your experience |
| 73 | + </h3> |
| 74 | + </div> |
| 75 | + <div class="panel-body"> |
| 76 | + <p>These <strong>optional requirements</strong> should be fixed to improve your experience running Symfony applications:</p> |
| 77 | + |
| 78 | + <ol> |
| 79 | + <?php foreach ($minorProblems as $problem): ?> |
| 80 | + <li><?php echo $problem->getHelpHtml() ?></li> |
| 81 | + <?php endforeach; ?> |
| 82 | + </ol> |
| 83 | + </div> |
| 84 | + </div> |
92 | 85 | <?php endif; ?>
|
93 | 86 |
|
94 | 87 | <?php if ($symfonyRequirements->hasPhpIniConfigIssue()): ?>
|
95 | 88 | <p id="phpini">*
|
96 | 89 | <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?>
|
97 |
| - Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>". |
| 90 | + Changes to the <strong>php.ini</strong> file must be done in the "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>" file. |
98 | 91 | <?php else: ?>
|
99 | 92 | To change settings, create a "<strong>php.ini</strong>".
|
100 | 93 | <?php endif; ?>
|
101 | 94 | </p>
|
102 | 95 | <?php endif; ?>
|
103 | 96 |
|
104 | 97 | <?php if (!count($majorProblems) && !count($minorProblems)): ?>
|
105 |
| - <p class="ok">Your configuration looks good to run Symfony Demo Application.</p> |
| 98 | + <div class="panel panel-success"> |
| 99 | + <div class="panel-heading"> |
| 100 | + <h3 class="panel-title"> |
| 101 | + <i class="fa fa-check"></i> |
| 102 | + All checks passed successfully |
| 103 | + </h3> |
| 104 | + </div> |
| 105 | + <div class="panel-body"> |
| 106 | + <p>Your configuration looks good to run the Symfony Demo application.</p> |
| 107 | + </div> |
| 108 | + </div> |
106 | 109 | <?php endif; ?>
|
| 110 | + </div> |
| 111 | + </div> |
107 | 112 |
|
108 |
| - <ul class="symfony-install-continue"> |
109 |
| - <?php if (!count($majorProblems)): ?> |
110 |
| - <li><a href="app_dev.php/">Go to the Welcome page</a></li> |
111 |
| - <?php endif; ?> |
112 |
| - <?php if (count($majorProblems) || count($minorProblems)): ?> |
113 |
| - <li><a href="config.php">Re-check configuration</a></li> |
114 |
| - <?php endif; ?> |
115 |
| - </ul> |
| 113 | + <div id="sidebar" class="col-sm-3"> |
| 114 | + <div class="section about"> |
| 115 | + <div class="well well-lg"> |
| 116 | + <p> |
| 117 | + This script checks whether your system meets the |
| 118 | + technical requirements for running Symfony |
| 119 | + applications. |
| 120 | + </p> |
| 121 | + <p> |
| 122 | + For more information, check out the |
| 123 | + <a href="http://symfony.com/doc/current/reference/requirements.html">requirements list</a> |
| 124 | + at the Symfony documentation. |
| 125 | + </p> |
| 126 | + </div> |
116 | 127 | </div>
|
| 128 | + |
117 | 129 | </div>
|
118 | 130 | </div>
|
119 |
| - <div class="version">Symfony Demo Application</div> |
120 | 131 | </div>
|
| 132 | + |
| 133 | + <footer> |
| 134 | + <div class="container"> |
| 135 | + <div class="row"> |
| 136 | + <div id="footer-copyright" class="col-md-6"> |
| 137 | + <p>© 2015 - The Symfony Project</p> |
| 138 | + <p>MIT License</p> |
| 139 | + </div> |
| 140 | + <div id="footer-resources" class="col-md-6"> |
| 141 | + <p> |
| 142 | + <a href="https://twitter.com/symfony"><i class="fa fa-twitter"></i></a> |
| 143 | + <a href="https://www.facebook.com/SensioLabs"><i class="fa fa-facebook"></i></a> |
| 144 | + <a href="http://symfony.com/blog"><i class="fa fa-rss"></i></a> |
| 145 | + </p> |
| 146 | + </div> |
| 147 | + </div> |
| 148 | + </div> |
| 149 | + </footer> |
121 | 150 | </body>
|
122 | 151 | </html>
|
0 commit comments