5 <title
>Install Test CMS CMS
</title
>
6 <mate name
="robots" content
="noindex, nofollow">
8 <link rel
="stylesheet" href
="assets/css/app.css">
10 <script src
="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script
>
11 <script
>window
.jQuery || document
.write('<script src="assets/js/jquery.js"><\/script>');</script
>
12 <script src
="assets/js/app.js"></script
>
16 <h1
><img src
="assets/img/logo.gif" alt
="Test CMS install logo"></h1
>
26 if(version_compare(PHP_VERSION
, '5.3.0', '<')) {
27 $compat[] = 'Test CMS requires PHP 5.3 or newer.<br><em>Your current environment is running PHP ' . PHP_VERSION
. '</em>';
31 if(class_exists('PDO') === false) {
32 $compat[] = 'Test CMS requires PDO (PHP Data Objects)<br>
33 <em>You can find more about <a href="//php.net/manual/en/book.pdo.php">installing and setting up PHP Data Objects</a>
34 on the php.net website</em>';
36 if(in_array('mysql', PDO
::getAvailableDrivers()) === false) {
37 $compat[] = 'Test CMS requires the MySQL PDO Driver<br>
38 <em>You can find more about <a href="//php.net/manual/en/ref.pdo-mysql.php">installing and setting up MySQL PDO Driver</a>
39 on the php.net website</em>';
43 // can we write a config file?
44 // note: on win the only way to really test is to try and write a new file to disk.
45 if(@file_put_contents
('../test.php', '<?php //test') === false) {
46 $compat[] = 'It looks like the root directory is not writable, we may not be able to automatically create your config.php file.
47 Please make the root directory writable until the installation is complete.';
49 unlink('../test.php');
54 <?php
if(count($compat)): ?
>
59 <p
>Test CMS is missing some requirements
:</p
>
61 <ul style
="padding-bottom: 1em;">
62 <?php
foreach($compat as $item): ?
>
63 <li
><?php
echo $item; ?
></li
>
67 <p
><a href
="." class="button" style
="float: none; display: inline-block;">Ok
, I
've fixed these, run the installer.</a></p>
70 <?php elseif(file_exists('../config
.php
')): ?>
75 <p>Test CMS is already installed. You should really delete this folder!</p>
77 <p><a href="../" class="button" style="float: none; display: inline-block;">Return to the main site.</a></p>
82 <p class="nojs error">You will need Javascript enabled for this installation. <em>Sorry :(</em></p>
85 <h2>Welcome to Test CMS.</h2>
87 <p>If you were looking for a truly lightweight blogging experience, you’ve
88 found the right place. Simply fill in the details below, and you’ll have your
89 new blog set up in no time.</p>
91 <small>If you want a more custom install, feel free to edit <code>config.default.php</code>
92 (before or after this installation, it doesn't really matter
, as long
as you rename it to
93 <code
>config
.php
</code
>).</small
>
95 <div
class="notes"></div
>
97 <form method
="get" novalidate
>
98 <fieldset id
="diagnose">
99 <legend
>Your database details
</legend
>
102 <label
for="host">Your database host
:</label
>
103 <input id
="host" name
="host" value
="localhost">
106 <label
for="user">Your database username
:</label
>
107 <input id
="user" autocapitalize
="off" name
="user" placeholder
="root">
110 <label
for="pass">Your database password
:</label
>
111 <input id
="pass" autocapitalize
="off" name
="pass" placeholder
="password">
114 <label
for="db">Your database name
:</label
>
115 <input id
="db" autocapitalize
="off" name
="db" placeholder
="Test CMS">
118 <a href
="#check" class="button">Check database details
</a
>
122 <legend
>About your site
</legend
>
125 <label
for="name">Site name
:</label
>
126 <input id
="name" name
="name" placeholder
="My awesome Test CMS site">
130 <label
for="description">Site description
:</label
>
131 <textarea id
="description" name
="description"></textarea
>
135 <label
for="theme">Theme
:</label
>
136 <select id
="theme" name
="theme">
137 <?php
foreach(glob('../themes/*') as $theme): $name = basename($theme); ?
>
138 <?php
if(file_exists($theme . '/about.txt')): ?
>
139 <option value
="<?php echo $name; ?>" <?php
if($name === 'default') echo 'selected'; ?
>><?php
echo ucwords($name); ?
></option
>
146 <label
for="email">Your Email Address
:</label
>
147 <input id
="email" name
="email">
151 <label
for="path">Site path
:</label
>
152 <input id
="path" name
="path" value
="<?php echo dirname(dirname($_SERVER['SCRIPT_NAME'])); ?>">
157 <br style
="clear: both;">
158 <button type
="submit">Install Test CMS
</button
>