summaryrefslogtreecommitdiff
path: root/installer/views
diff options
context:
space:
mode:
authorTristan Zur <tzur@webserver.ccwn.org>2015-06-10 20:55:53 +0200
committerTristan Zur <tzur@webserver.ccwn.org>2015-06-10 20:55:53 +0200
commit406abd7c4df1ace2cd3e4e17159e8941a2e8c0c4 (patch)
treea324be16021f44f2fd6d55e609f47024e945b1db /installer/views
Initial import
Diffstat (limited to 'installer/views')
-rw-r--r--installer/views/already_installed.html.php5
-rw-r--r--installer/views/db_not_empty.html.php8
-rw-r--r--installer/views/environment_errors.html.php20
-rw-r--r--installer/views/get_db_info.html.php89
-rw-r--r--installer/views/install.html.php24
-rw-r--r--installer/views/invalid_db_info.html.php6
-rw-r--r--installer/views/invalid_db_version.html.php5
-rw-r--r--installer/views/missing_db.html.php13
-rw-r--r--installer/views/oops.html.php10
-rw-r--r--installer/views/success.html.php23
10 files changed, 203 insertions, 0 deletions
diff --git a/installer/views/already_installed.html.php b/installer/views/already_installed.html.php
new file mode 100644
index 0000000..f6ac1bf
--- /dev/null
+++ b/installer/views/already_installed.html.php
@@ -0,0 +1,5 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<p class="success">
+ Your Gallery 3 install is complete.
+</p>
+
diff --git a/installer/views/db_not_empty.html.php b/installer/views/db_not_empty.html.php
new file mode 100644
index 0000000..bc45458
--- /dev/null
+++ b/installer/views/db_not_empty.html.php
@@ -0,0 +1,8 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<h1> Uh oh! </h1>
+<p class="error">
+ The database you provided already has Gallery 3 tables in it.
+ Continuing with the install would overwrite your existing install.
+ Please either use a different database, delete the old tables,
+ or choose a different table prefix.
+</p>
diff --git a/installer/views/environment_errors.html.php b/installer/views/environment_errors.html.php
new file mode 100644
index 0000000..318be61
--- /dev/null
+++ b/installer/views/environment_errors.html.php
@@ -0,0 +1,20 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<h1> Whoa there! </h1>
+
+<p class="error">
+ There are some problems with your web hosting environment
+ that need to be fixed before you can successfully install
+ Gallery 3.
+</p>
+
+<ul>
+ <?php foreach ($errors as $error): ?>
+ <li>
+ <?php print $error ?>
+ </li>
+ <?php endforeach ?>
+</ul>
+
+<p>
+ <a href="index.php">Check again</a>
+</p>
diff --git a/installer/views/get_db_info.html.php b/installer/views/get_db_info.html.php
new file mode 100644
index 0000000..c9f57e1
--- /dev/null
+++ b/installer/views/get_db_info.html.php
@@ -0,0 +1,89 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<h1> Let's get going! </h1>
+<p>
+ Installing Gallery is easy. We just need a place to put your photos
+ and info about your MySQL database.
+</p>
+
+
+<fieldset class="<?= installer::var_writable() ? 'success' : 'error' ?>">
+ <legend>Photo Storage</legend>
+ <?php if (!installer::var_writable()): ?>
+ <p>
+ We're having trouble creating a place for your photos. Can you
+ help? We need you to create a directory called <em>var</em> in
+ your gallery3 directory. This sample code works for most users.
+ Run it in the gallery3 directory:
+ <code>
+ mkdir var<br>
+ chmod 777 var
+ </code>
+ <a href="index.php">Check again</a>
+ </p>
+ <?php else: ?>
+ <p>
+ We've found a place to store your photos:
+ <code class="location"> <?= htmlspecialchars(VARPATH, ENT_QUOTES, 'UTF-8', true) ?> </code>
+ </p>
+ <?php endif ?>
+</fieldset>
+
+<?php if (installer::var_writable()): ?>
+<form method="post" action="index.php?step=save_db_info">
+ <fieldset>
+ <legend>Database</legend>
+ <p>
+ Gallery 3 needs a MySQL database. The values provided work for
+ most setups, so if you're confused try clicking <i>continue</i>.
+ </p>
+ <br/>
+ <table id="db_info">
+ <tr>
+ <td>
+ Database name
+ </td>
+ <td>
+ <input name="dbname" value="gallery3"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ User
+ </td>
+ <td>
+ <input name="dbuser" value="root"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Password
+ </td>
+ <td>
+ <input name="dbpass" value=""/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Host
+ </td>
+ <td>
+ <input name="dbhost" value="localhost"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Table prefix <span class="subtext">(optional)</span>
+ </td>
+ <td>
+ <input name="prefix" value=""/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <input type="submit" value="Continue"/>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</form>
+<?php endif ?>
diff --git a/installer/views/install.html.php b/installer/views/install.html.php
new file mode 100644
index 0000000..7a30561
--- /dev/null
+++ b/installer/views/install.html.php
@@ -0,0 +1,24 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<html>
+ <head>
+ <title>Gallery 3 Installer</title>
+ <link rel="stylesheet" type="text/css" href="install.css"/>
+ </head>
+ <body>
+ <div id="outer">
+ <img src="../modules/gallery/images/gallery.png" />
+ <div id="inner">
+ <?php print $content ?>
+ </div>
+ <div id="footer">
+ <p>
+ <i>Did something go wrong? Try
+ the <a href="http://codex.galleryproject.org/Gallery3:FAQ">FAQ</a>
+ or ask in
+ the <a href="http://galleryproject.org/forum">Gallery
+ forums</a>.</i>
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/installer/views/invalid_db_info.html.php b/installer/views/invalid_db_info.html.php
new file mode 100644
index 0000000..242a28a
--- /dev/null
+++ b/installer/views/invalid_db_info.html.php
@@ -0,0 +1,6 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<h1> Uh oh! </h1>
+<p class="error">
+ We were unable to connect to your MySQL server with the username and
+ password that you provided. Please go back and try again!
+</p>
diff --git a/installer/views/invalid_db_version.html.php b/installer/views/invalid_db_version.html.php
new file mode 100644
index 0000000..5b021ba
--- /dev/null
+++ b/installer/views/invalid_db_version.html.php
@@ -0,0 +1,5 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<h1> Uh oh! </h1>
+<p class="error">
+ Gallery requires at least MySQL version 5.0.0. You're using version <?= installer::mysql_version($config) ?>
+</p>
diff --git a/installer/views/missing_db.html.php b/installer/views/missing_db.html.php
new file mode 100644
index 0000000..fa42fde
--- /dev/null
+++ b/installer/views/missing_db.html.php
@@ -0,0 +1,13 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<h1> Can't find that database! </h1>
+<p class="error">
+ We were able to connect to your MySQL server, yay! But the database
+ name you gave us doesn't exist and we don't have permissions to
+ create it for you. Please create the database manually, then go
+ back and try again.
+</p>
+
+<p>
+ If you're having trouble creating the database, please contact your
+ web host or system administrator for assistance.
+</p>
diff --git a/installer/views/oops.html.php b/installer/views/oops.html.php
new file mode 100644
index 0000000..9c6b165
--- /dev/null
+++ b/installer/views/oops.html.php
@@ -0,0 +1,10 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<h1> Oops! </h1>
+<p>
+ Something unexpected happened and we can't finish your install.
+ We'll try to provide some details about the specific problem below.
+</p>
+<p class="error">
+ <?php print $error ?>
+</p>
+
diff --git a/installer/views/success.html.php b/installer/views/success.html.php
new file mode 100644
index 0000000..e9ee981
--- /dev/null
+++ b/installer/views/success.html.php
@@ -0,0 +1,23 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<h1> Success! </h1>
+<p class="success">
+ Your Gallery 3 install is complete!
+</p>
+
+<?php if (!empty($user)): ?>
+<h2> Before you start using it... </h2>
+<p>
+ We've created an account for you to use:
+ <br/>
+ username: <b><?php print $user ?></b>
+ <br/>
+ password: <b><?php print $password ?></b>
+ <br/>
+ <br/>
+ Save this information in a safe place, or change your admin password
+ right away!
+</p>
+<?php endif ?>
+
+<h2> <a href="..">Start using Gallery</a> </h2>
+