From 015c6e704c06824d1135b4033642f0225a67fa75 Mon Sep 17 00:00:00 2001 From: Glenn Hermans Date: Thu, 19 Sep 2019 16:18:34 +0200 Subject: [PATCH] Added mail configuration --- public/installer/Admin.php | 4 +- public/installer/Email.php | 122 ++++++++++++++++++ public/installer/EmailConfig.php | 92 +++++++++++++ public/installer/Finish.php | 11 +- public/installer/Views/requirements.blade.php | 2 +- public/installer/index.php | 1 + 6 files changed, 221 insertions(+), 11 deletions(-) create mode 100644 public/installer/Email.php create mode 100644 public/installer/EmailConfig.php diff --git a/public/installer/Admin.php b/public/installer/Admin.php index f48b48de3..16b6a197c 100755 --- a/public/installer/Admin.php +++ b/public/installer/Admin.php @@ -114,12 +114,12 @@ result = confirm(data['support_error']); if (result) { $('#admin').hide(); - $('#finish').show(); + $('#email').show(); } } if (!data['connection'] && !data['insert_fail'] && !data['support_error']) { $('#admin').hide(); - $('#finish').show(); + $('#email').show(); } } }); diff --git a/public/installer/Email.php b/public/installer/Email.php new file mode 100644 index 000000000..a579e99f6 --- /dev/null +++ b/public/installer/Email.php @@ -0,0 +1,122 @@ +
+
+

Email Configuration

+
+
+
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/public/installer/EmailConfig.php b/public/installer/EmailConfig.php new file mode 100644 index 000000000..3b81bd876 --- /dev/null +++ b/public/installer/EmailConfig.php @@ -0,0 +1,92 @@ + $value) { + $changedData[] = $key . '=' . $value; + } + + // inserting new form-data to env + $changedData = implode(PHP_EOL, $changedData); + file_put_contents($envFile, $changedData); + + $data['success'] = true; + $data['message'] = 'Success!'; + } + + // return all our data to an AJAX call + echo json_encode($data); \ No newline at end of file diff --git a/public/installer/Finish.php b/public/installer/Finish.php index 7ccf136ed..8c06126a7 100755 --- a/public/installer/Finish.php +++ b/public/installer/Finish.php @@ -1,29 +1,24 @@ - -
-

Finish Installment

+

Installation completed

- Bagisto is successfully installed on your system. Click the below button to launch Admin Panel. + Bagisto is successfully installed on your system.
+ Click the below button to launch Admin Panel.
-
- -