From 3f432ba4762dde5de489b38dffe3d00a043cc006 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 7 Sep 2008 13:20:35 +0000 Subject: Series: Added Administrator account Refs #28 --- series/core/trunk/install.php | 27 ++++++++++++++++++++++++--- series/core/trunk/theme/index.tpl | 2 ++ 2 files changed, 26 insertions(+), 3 deletions(-) (limited to 'series') diff --git a/series/core/trunk/install.php b/series/core/trunk/install.php index 0f7549d..750dce8 100644 --- a/series/core/trunk/install.php +++ b/series/core/trunk/install.php @@ -77,7 +77,7 @@ if (!isset($_GET['submit'])) showStepOne($_POST['host'], $_POST['username'], $_POST['password'], $_POST['dbname'], $errors); } else { showHeader('2'); - showStepTwo('', array()); + showStepTwo('', '', '', array()); } } } @@ -91,10 +91,20 @@ if (!isset($_GET['submit'])) addError($numOfErrors, $errors, 'siteName', 'Site Name is a required field'); } + if ($_POST['adminUser'] == '') + { + addError($numOfErrors, $errors, 'adminUser', 'Administrator Username is a required field'); + } + + if ($_POST['adminPass'] == '') + { + addError($numOfErrors, $errors, 'adminPass', 'Administrator Password is a required field'); + } + if ($numOfErrors > 0) { showHeader('2'); - showStepTwo($_POST['mailDomain'], $_POST['smtpHost'], ($_POST['smtpAuth'] == 'on' ? ' CHECKED' : ''), $_POST['smtpUser'], $_POST['smtpPass'], $_POST['siteName'], $_POST['xmlrpcURL'], $_POST['adminUser'], $_POST['adminPass'], $_POST['adminEmail'], $errors); + showStepTwo($_POST['siteName'], $_POST['adminUser'], $_POST['adminPass'], $errors); } else { include_once('includes/config.php'); @@ -102,6 +112,8 @@ if (!isset($_GET['submit'])) mysql_select_db($dbname); $sql[0] = "INSERT INTO config (name,value) VALUES (\"siteName\",\"" . mysql_real_escape_string($_POST['siteName']) . "\")"; + $sql[1] = "INSERT INTO config (name,value) VALUES (\"adminUser\",\"" . mysql_real_escape_string($_POST['adminUser']) . "\")"; + $sql[2] = "INSERT INTO config (name,value) VALUES (\"adminPass\",\"" . mysql_real_escape_string($_POST['adminPass']) . "\")"; foreach ($sql as $name => $value) { @@ -118,7 +130,7 @@ if (!isset($_GET['submit'])) if ($numOfErrors > 0) { showHeader('2'); - showStepTwo($_POST['siteName'], $errors); + showStepTwo($_POST['siteName'], $_POST['adminUser'], $_POST['adminPass'], $errors); } else { showHeader('3'); showStepThree(); @@ -198,6 +210,15 @@ function showStepTwo($siteName, $errors)

Your website's name is required for a little personalization of emails.

+
Administrator User Details +
+ + +
+
+ + +
diff --git a/series/core/trunk/theme/index.tpl b/series/core/trunk/theme/index.tpl index 338f0cc..4bef7e6 100644 --- a/series/core/trunk/theme/index.tpl +++ b/series/core/trunk/theme/index.tpl @@ -1,3 +1,4 @@ +

Subscriptions Available

@@ -6,3 +7,4 @@
  • - ()
  • +
    -- cgit 1.4.1