summaryrefslogtreecommitdiffstats
path: root/app/view/dbconfig.php
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-10-27 18:28:22 -0400
committerMalf Furious <m@lfurio.us>2018-10-27 18:28:22 -0400
commit0421aa1b60f4fe6bf140888159c58059c1013588 (patch)
treec3285276f6c53b6789e2f6dc82cb3b0fd17b38a4 /app/view/dbconfig.php
parent495157341d60522084dcc9f6219877b6ba497312 (diff)
parent6512655aee73d3d295daa4de0e4ef25c08cfec9e (diff)
downloadscrott-0.1.tar.gz
scrott-0.1.zip
Merge branch 'rel/v0.1'v0.1
Diffstat (limited to 'app/view/dbconfig.php')
-rw-r--r--app/view/dbconfig.php86
1 files changed, 86 insertions, 0 deletions
diff --git a/app/view/dbconfig.php b/app/view/dbconfig.php
new file mode 100644
index 0000000..a8d8bce
--- /dev/null
+++ b/app/view/dbconfig.php
@@ -0,0 +1,86 @@
+<?php
+
+/*
+ * SCROTT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For more information, please refer to UNLICENSE
+ */
+
+require_once "model/dbconfig.php";
+require_once "view/stdpage.php";
+require_once "view/formctrl.php";
+
+?>
+
+<!DOCTYPE html>
+
+<html lang="en">
+ <head>
+ <?=stdpage\head( "Database Configuration" )?>
+ </head>
+
+ <body>
+ <?=stdpage\top()?>
+
+ <div class="container">
+ <div class="jumbotron">
+ <h2 class="text-center">
+ <span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;&nbsp;
+ <span class="glyphicon glyphicon-th"></span>&nbsp;&nbsp;&nbsp;
+ <span class="glyphicon glyphicon-edit"></span>&nbsp;&nbsp;&nbsp;
+ <span class="glyphicon glyphicon-tasks"></span>&nbsp;&nbsp;&nbsp;
+ <span class="glyphicon glyphicon-inbox"></span>&nbsp;&nbsp;&nbsp;
+ <span class="glyphicon glyphicon-envelope"></span>
+ </h2>
+
+ <h1 class="text-center">Welcome to Scrott!</h1>
+ <hr />
+
+ <p class="text-center">You're seeing this page because the file "dbconfig.php" is missing.</p>
+ <p class="text-center">Please fill out the form below to configure Scrott to use your database.</p>
+ <hr />
+
+ <p class="text-center">This form will save your database parameters to the configuration file.<br />
+ Scrott needs this information before it can begin working!</p>
+
+ <h5 class="text-center text-danger">
+ It is presumed that you are the administrator for this Scrott install.<br />
+ There is a security risk involved with exposing this page to the public!
+ </h5>
+
+ <div class="row">
+ <div class="col-md-2"></div>
+
+ <div class="col-md-8">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <form method="post" action="<?=ap()?>">
+ <?=formctrl\formname( "save" )?>
+ <?=formctrl\text( "Engine", "dbEngine", "MySQL", "", false, true )?>
+ <?=formctrl\text( "Hostname", "dbHost", "", "localhost" )?>
+ <?=formctrl\text( "Username", "dbUname", "", "root" )?>
+ <?=formctrl\password( "Password", "dbPasswd", false )?>
+ <?=formctrl\text( "Database Name", "dbName", "", "db_scrott" )?>
+
+ <button type="submit" class="btn btn-primary pull-right">
+ Use these settings
+ </button>
+ </form>
+ </div>
+ </div>
+ </div>
+
+ <div class="col-md-2"></div>
+ </div>
+ </div>
+ </div>
+
+ <?=stdpage\foot()?>
+ </body>
+</html>