From 479aca0db88f0b1af52f399f19a0a8267bd10744 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Tue, 27 Jun 2017 01:49:35 -0400 Subject: Add dbconfig model code --- app/model/dbconfig.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 app/model/dbconfig.php (limited to 'app/model') diff --git a/app/model/dbconfig.php b/app/model/dbconfig.php new file mode 100644 index 0000000..822fd88 --- /dev/null +++ b/app/model/dbconfig.php @@ -0,0 +1,44 @@ +text("dbHost"); + $form->text("dbUname"); + $form->text("dbPasswd", false); + $form->text("dbName"); + + if (!$form->populate(input())) + return; + + $stat = database::setConfig("mysql", $form->dbHost, $form->dbUname, + $form->dbPasswd, $form->dbName); + + if (!$stat) + return; + + location("/"); +} + +?> -- cgit v1.2.3