summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
Diffstat (limited to 'installer')
-rw-r--r--installer/index.php3
-rw-r--r--installer/install.html.php43
-rw-r--r--installer/installer.php8
3 files changed, 54 insertions, 0 deletions
diff --git a/installer/index.php b/installer/index.php
index 07565acc..19b99735 100644
--- a/installer/index.php
+++ b/installer/index.php
@@ -33,4 +33,7 @@ define("SYSPATH", "DEFINED_TO_SOMETHING_SO_THAT_WE_CAN_KEEP_CONSISTENT_PREAMBLES
require(DOCROOT . "installer/installer.php");
if (php_sapi_name() == "cli") {
installer::command_line();
+} else {
+ installer::web();
}
+
diff --git a/installer/install.html.php b/installer/install.html.php
new file mode 100644
index 00000000..2afac33e
--- /dev/null
+++ b/installer/install.html.php
@@ -0,0 +1,43 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<html>
+ <head>
+ <title>Gallery3 Installer</title>
+ <style>
+ body {
+ background: #999;
+ font-family: Trebuchet MS;
+ }
+
+ div#outer {
+ width: 650px;
+ background: white;
+ border: 1px solid black;
+ margin: 0 auto;
+ padding: -10px;
+ height: 600px;
+ }
+
+ div#inner {
+ padding: 0 1em 0 1em;
+ margin: 0px;
+ }
+
+ h1, h2, h3 {
+ margin-bottom: .1em;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="outer">
+ <center>
+ <img src="http://www.gallery2.org/gallery2.png"/>
+ </center>
+ <div id="inner">
+ <h1> Gallery 3 installer </h1>
+ <p>
+ <?= $content ?>
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/installer/installer.php b/installer/installer.php
index d623103b..9279613b 100644
--- a/installer/installer.php
+++ b/installer/installer.php
@@ -43,6 +43,14 @@ class installer {
}
}
+ static function web() {
+ if (self::already_installed()) {
+ print self::_render(
+ "install.html.php", array("content" => "Gallery 3 is already installed."));
+ return;
+ }
+ }
+
static function already_installed() {
return file_exists(VARPATH . "database.php");
}