diff --git a/control.php b/control.php
index a1663c3..b3cb488 100644
--- a/control.php
+++ b/control.php
@@ -38,7 +38,7 @@
// main library routines and defaults
require_once('config/dmsDefaults.php');
-
+require_once("setup/wizard/install_util.php");
/**
* Controller page -- controls the web application by responding to a set of
* defined actions. The controller performs session handling, page-level
@@ -49,6 +49,12 @@ require_once('config/dmsDefaults.php');
// -------------------------------
// page start
// -------------------------------
+// Check if system has been installed
+$iu = new InstallUtil();
+if(!$iu->isSystemInstalled()) {
+ redirect("setup/wizard");
+ exit(0);
+}
$action = $_REQUEST['action'];
diff --git a/setup/wizard/index.php b/setup/wizard/index.php
index cfcb62a..c169dbf 100755
--- a/setup/wizard/index.php
+++ b/setup/wizard/index.php
@@ -39,5 +39,12 @@
* @package Installer
* @version Version 0.1
*/
- require("installer.php");
+ require_once("install_util.php");
+ $ui = new InstallUtil();
+ if(!$ui->isSystemInstalled()) {
+ require("installer.php");
+ } else {
+ echo "System has been installed Goto Login";
+ }
+
?>
\ No newline at end of file
diff --git a/setup/wizard/install_util.php b/setup/wizard/install_util.php
new file mode 100644
index 0000000..73dce37
--- /dev/null
+++ b/setup/wizard/install_util.php
@@ -0,0 +1,17 @@
+
\ No newline at end of file
diff --git a/setup/wizard/installer.php b/setup/wizard/installer.php
index 0782048..d968625 100755
--- a/setup/wizard/installer.php
+++ b/setup/wizard/installer.php
@@ -439,6 +439,12 @@ class Installer {
for ($i=1; $i< count($steps)+1; $i++) {
$this->installHelper($steps[$i]);
}
+
+ $this->completeInstall();
+ }
+
+ private function completeInstall() {
+ unlink("install");
}
/**
@@ -457,8 +463,8 @@ class Installer {
$class->setDataFromSession($className); // Set Session Information
$class->setDBConfig(); // Set any posted variables
$response = $class->installStep(); // Run install step
- echo "$className==$response
";
- echo "
";print_r($_SESSION['database']);echo ""; +// echo "$className==$response
";print_r($_SESSION['database']);echo ""; // echo $response; // if($response == 'error') { // return $this->landing(); diff --git a/setup/wizard/resources/wizard.js b/setup/wizard/resources/wizard.js index e38f6b3..d53f270 100644 --- a/setup/wizard/resources/wizard.js +++ b/setup/wizard/resources/wizard.js @@ -10,8 +10,8 @@ wizard.prototype.doFormCheck = function() { // Disable DnD on element // Element has to have a readOnly status set to readonly wizard.prototype.disableDnd = function(el_id) { - el = document.getElementById(el_id); - el.removeAttribute('readOnly'); +// el = document.getElementById(el_id); +// el.removeAttribute('readOnly'); } // Add readOnly access on all inputs of a form diff --git a/setup/wizard/steps/database.php b/setup/wizard/steps/database.php index 94ec215..50d854b 100755 --- a/setup/wizard/steps/database.php +++ b/setup/wizard/steps/database.php @@ -740,17 +740,17 @@ class database extends Step * @return boolean */ public function doAjaxTest($host, $uname, $dname) { - echo 'asd'; - die; - if($this->dport == '') - $con = $this->dbhandler->DBUtil($this->dhost, $this->duname, $this->dpassword, $this->dname); - else - $con = $this->dbhandler->DBUtil($this->dhost.":".$this->dport, $this->duname, $this->dpassword, $this->dname); - if (!$con) { - return false; - } else { - return true; - } +// echo 'asd'; +// die; +// if($this->dport == '') +// $con = $this->dbhandler->DBUtil($this->dhost, $this->duname, $this->dpassword, $this->dname); +// else +// $con = $this->dbhandler->DBUtil($this->dhost.":".$this->dport, $this->duname, $this->dpassword, $this->dname); +// if (!$con) { +// return false; +// } else { +// return true; +// } } public function setPostValues() { diff --git a/setup/wizard/templates/database.tpl b/setup/wizard/templates/database.tpl index 09551a4..8c2fd50 100755 --- a/setup/wizard/templates/database.tpl +++ b/setup/wizard/templates/database.tpl @@ -1,5 +1,4 @@