| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,100 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+/** |
|
| 4 |
+ * @copyright 2024 Double Bastion LLC <www.doublebastion.com> |
|
| 5 |
+ * |
|
| 6 |
+ * @author Double Bastion LLC |
|
| 7 |
+ * |
|
| 8 |
+ * @license GNU AGPL version 3 or any later version |
|
| 9 |
+ * |
|
| 10 |
+ * This program is free software; you can redistribute it and/or |
|
| 11 |
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
| 12 |
+ * License as published by the Free Software Foundation; either |
|
| 13 |
+ * version 3 of the License, or any later version. |
|
| 14 |
+ * |
|
| 15 |
+ * This program is distributed in the hope that it will be useful, |
|
| 16 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
|
| 19 |
+ * |
|
| 20 |
+ * You should have received a copy of the GNU Affero General Public |
|
| 21 |
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 22 |
+ * |
|
| 23 |
+ */ |
|
| 24 |
+ |
|
| 25 |
+define('RESTRICTED', TRUE);
|
|
| 26 |
+ |
|
| 27 |
+include 'install-signup-check.php'; |
|
| 28 |
+ |
|
| 29 |
+if ($installcheck == true) {
|
|
| 30 |
+ |
|
| 31 |
+ if(isset($_POST['createconfigbttn'])) {
|
|
| 32 |
+ |
|
| 33 |
+ if (isset($_POST['databasename']) && $_POST['databasename'] != '' && isset($_POST['databaseuser']) && $_POST['databaseuser'] != '' && |
|
| 34 |
+ isset($_POST['dbuserpassword']) && $_POST['dbuserpassword'] != '') {
|
|
| 35 |
+ |
|
| 36 |
+ // Create the configuration file |
|
| 37 |
+ $dbname = $_POST['databasename']; |
|
| 38 |
+ $dbuser = $_POST['databaseuser']; |
|
| 39 |
+ $dbuserpswd = $_POST['dbuserpassword']; |
|
| 40 |
+ |
|
| 41 |
+ $texttofill = "<?php\r\nif(!defined('ACCESSCONST')){die();}\r\n\r\n\$databasename='".$dbname."';\r\n\$username='".$dbuser."';\r\n\$password='".$dbuserpswd."';\r\n?>";
|
|
| 42 |
+ |
|
| 43 |
+ file_put_contents("panel-config.php", $texttofill);
|
|
| 44 |
+ |
|
| 45 |
+ session_start(); |
|
| 46 |
+ |
|
| 47 |
+ $_SESSION['validateaccesspnl'] = "accessallowedpnl"; |
|
| 48 |
+ |
|
| 49 |
+ header("Location: panel-initializedb.php");
|
|
| 50 |
+ } |
|
| 51 |
+ } |
|
| 52 |
+ |
|
| 53 |
+?> |
|
| 54 |
+ |
|
| 55 |
+<html> |
|
| 56 |
+ |
|
| 57 |
+<head> |
|
| 58 |
+ <title>RED SCARF Suite Panel Setup</title> |
|
| 59 |
+ |
|
| 60 |
+ <link rel="stylesheet" href="assets/css/setup-style.css"> |
|
| 61 |
+ <script type="text/javascript" src="assets/js/jquery-3.3.1.min.js"></script> |
|
| 62 |
+ <script type="text/javascript" src="assets/js/panel-setup.js"></script> |
|
| 63 |
+ |
|
| 64 |
+</head> |
|
| 65 |
+ |
|
| 66 |
+<body> |
|
| 67 |
+ |
|
| 68 |
+ <div id="mainarea"> |
|
| 69 |
+ |
|
| 70 |
+ <img class="logosetuppage" src="images/red-scarf-suite-panel_logo_about.svg" /> |
|
| 71 |
+ |
|
| 72 |
+ <h3 style="text-align:center;">RED SCARF Suite Panel Setup</h3><br> |
|
| 73 |
+ |
|
| 74 |
+ <img class="setupStage" src="images/panel-setup-stages-1.svg" /> |
|
| 75 |
+ |
|
| 76 |
+ <form id="panelcredform" action="" method="POST"> |
|
| 77 |
+ |
|
| 78 |
+ <label for="databasename" class="fieldlabels">RED SCARF Suite Panel database name:</label><br> |
|
| 79 |
+ <input type="text" id="databasename" class="textinput" name="databasename"/><br><br> |
|
| 80 |
+ |
|
| 81 |
+ <label for="databaseuser" class="fieldlabels">RED SCARF Suite Panel database user:</label><br> |
|
| 82 |
+ <input type="text" id="databaseuser" class="textinput" name="databaseuser"/><br><br> |
|
| 83 |
+ |
|
| 84 |
+ <label for="dbuserpassword" class="fieldlabels">RED SCARF Suite Panel database user password:</label><br> |
|
| 85 |
+ <input type="password" id="dbuserpassword" class="textinput" name="dbuserpassword"/><br><br> |
|
| 86 |
+ |
|
| 87 |
+ <input type="submit" id="createconfigbttn" name="createconfigbttn" value="Next" /> |
|
| 88 |
+ |
|
| 89 |
+ </form> |
|
| 90 |
+ |
|
| 91 |
+ </div> |
|
| 92 |
+ |
|
| 93 |
+</body> |
|
| 94 |
+ |
|
| 95 |
+</html> |
|
| 96 |
+ |
|
| 97 |
+<?php |
|
| 98 |
+} |
|
| 99 |
+ |
|
| 100 |
+?> |