about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--series/core/trunk/install.php27
-rw-r--r--series/core/trunk/theme/index.tpl2
2 files changed, 26 insertions, 3 deletions
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']))
77 showStepOne($_POST['host'], $_POST['username'], $_POST['password'], $_POST['dbname'], $errors); 77 showStepOne($_POST['host'], $_POST['username'], $_POST['password'], $_POST['dbname'], $errors);
78 } else { 78 } else {
79 showHeader('2'); 79 showHeader('2');
80 showStepTwo('', array()); 80 showStepTwo('', '', '', array());
81 } 81 }
82 } 82 }
83 } 83 }
@@ -91,10 +91,20 @@ if (!isset($_GET['submit']))
91 addError($numOfErrors, $errors, 'siteName', 'Site Name is a required field'); 91 addError($numOfErrors, $errors, 'siteName', 'Site Name is a required field');
92 } 92 }
93 93
94 if ($_POST['adminUser'] == '')
95 {
96 addError($numOfErrors, $errors, 'adminUser', 'Administrator Username is a required field');
97 }
98
99 if ($_POST['adminPass'] == '')
100 {
101 addError($numOfErrors, $errors, 'adminPass', 'Administrator Password is a required field');
102 }
103
94 if ($numOfErrors > 0) 104 if ($numOfErrors > 0)
95 { 105 {
96 showHeader('2'); 106 showHeader('2');
97 showStepTwo($_POST['mailDomain'], $_POST['smtpHost'], ($_POST['smtpAuth'] == 'on' ? ' CHECKED' : ''), $_POST['smtpUser'], $_POST['smtpPass'], $_POST['siteName'], $_POST['xmlrpcURL'], $_POST['adminUser'], $_POST['adminPass'], $_POST['adminEmail'], $errors); 107 showStepTwo($_POST['siteName'], $_POST['adminUser'], $_POST['adminPass'], $errors);
98 } else { 108 } else {
99 include_once('includes/config.php'); 109 include_once('includes/config.php');
100 110
@@ -102,6 +112,8 @@ if (!isset($_GET['submit']))
102 mysql_select_db($dbname); 112 mysql_select_db($dbname);
103 113
104 $sql[0] = "INSERT INTO config (name,value) VALUES (\"siteName\",\"" . mysql_real_escape_string($_POST['siteName']) . "\")"; 114 $sql[0] = "INSERT INTO config (name,value) VALUES (\"siteName\",\"" . mysql_real_escape_string($_POST['siteName']) . "\")";
115 $sql[1] = "INSERT INTO config (name,value) VALUES (\"adminUser\",\"" . mysql_real_escape_string($_POST['adminUser']) . "\")";
116 $sql[2] = "INSERT INTO config (name,value) VALUES (\"adminPass\",\"" . mysql_real_escape_string($_POST['adminPass']) . "\")";
105 117
106 foreach ($sql as $name => $value) 118 foreach ($sql as $name => $value)
107 { 119 {
@@ -118,7 +130,7 @@ if (!isset($_GET['submit']))
118 if ($numOfErrors > 0) 130 if ($numOfErrors > 0)
119 { 131 {
120 showHeader('2'); 132 showHeader('2');
121 showStepTwo($_POST['siteName'], $errors); 133 showStepTwo($_POST['siteName'], $_POST['adminUser'], $_POST['adminPass'], $errors);
122 } else { 134 } else {
123 showHeader('3'); 135 showHeader('3');
124 showStepThree(); 136 showStepThree();
@@ -198,6 +210,15 @@ function showStepTwo($siteName, $errors)
198 <INPUT TYPE="text" ID="siteName" NAME="siteName" CLASS="textInput" VALUE="<?php echo($siteName); ?>"> 210 <INPUT TYPE="text" ID="siteName" NAME="siteName" CLASS="textInput" VALUE="<?php echo($siteName); ?>">
199 <P CLASS="formHint">Your website's name is required for a little personalization of emails.</P> 211 <P CLASS="formHint">Your website's name is required for a little personalization of emails.</P>
200</DIV> 212</DIV>
213</FIELDSET><FIELDSET CLASS="inlineLabels"><LEGEND>Administrator User Details</LEGEND>
214<DIV CLASS="ctrlHolder<?php ifErrors($errors, 'adminUser'); ?>">
215<?php doErrors($errors, 'adminUser'); ?> <LABEL FOR="adminUser"><EM>*</EM> Administrator Username: </LABEL>
216 <INPUT TYPE="text" ID="adminUser" NAME="adminUser" CLASS="textInput" VALUE="<?php echo($adminUser); ?>">
217</DIV>
218<DIV CLASS="ctrlHolder<?php ifErrors($errors, 'adminPass'); ?>">
219<?php doErrors($errors, 'adminPass'); ?> <LABEL FOR="adminPass"><EM>*</EM> Administrator Password: </LABEL>
220 <INPUT TYPE="password" ID="adminPass" NAME="adminPass" CLASS="textInput" VALUE="<?php echo($adminPass); ?>">
221</DIV>
201</FIELDSET> 222</FIELDSET>
202<DIV CLASS="buttonHolder"> 223<DIV CLASS="buttonHolder">
203 <INPUT TYPE="submit" VALUE="Next"> 224 <INPUT TYPE="submit" VALUE="Next">
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 @@
1<CENTER>
1<H1><!--SITENAME--></H1><P> 2<H1><!--SITENAME--></H1><P>
2<H2>Subscriptions Available</H2> 3<H2>Subscriptions Available</H2>
3 4
@@ -6,3 +7,4 @@
6 <LI><A HREF="subscription.php?id=<!--SUBSCRIPTIONS.IDENTITY-->"><!--SUBSCRIPTIONS.IDENTITY--></A> - <!--SUBSCRIPTIONS.TITLE--> (<!--SUBSCRIPTIONS.CATEGORY-->)</LI> 7 <LI><A HREF="subscription.php?id=<!--SUBSCRIPTIONS.IDENTITY-->"><!--SUBSCRIPTIONS.IDENTITY--></A> - <!--SUBSCRIPTIONS.TITLE--> (<!--SUBSCRIPTIONS.CATEGORY-->)</LI>
7 <!--END SUBSCRIPTIONS--> 8 <!--END SUBSCRIPTIONS-->
8</UL> 9</UL>
10</CENTER>