Browse code

Changed majority of files.

DoubleBastionAdmin authored on 30/11/2024 06:56:40
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,113 @@
1
+<!doctype html>
2
+<!--
3
+  Copyright (C) 2022, 2024  Double Bastion LLC
4
+
5
+  This file is part of Roundpin, which is licensed under the
6
+  GNU Affero General Public License Version 3.0. The license terms
7
+  are detailed in the "LICENSE.txt" file located in the root directory.
8
+
9
+  This is a modified version of the original file "index.html",
10
+  first modified in 2020. The copyright notice for the original
11
+  content follows:
12
+
13
+  Copyright (c) 2019 by Daniel Zawadzki (https://codepen.io/danzawadzki/pen/EgqKRr)
14
+  License: The MIT License
15
+-->
16
+
17
+<head>
18
+   <meta charset="utf-8">
19
+   <title>Roundpin</title>
20
+   <link rel="stylesheet" href="../css/login.css"/>
21
+   <link rel="stylesheet" href="../css/inter.min.css"/>
22
+   <script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
23
+   <script type="text/javascript" src="../js/forgot-password.min.js"></script>
24
+   <link rel="shortcut icon" type="image/svg" href="../images/favicon.svg" />
25
+</head>
26
+<body>
27
+
28
+  <div class="wrapper">
29
+  <div id="formContent">
30
+    <!-- Tabs Titles -->
31
+    <a href="../login.php"><h2 id="signintab" class="underlineHover">Log In</h2></a>
32
+    <a id="signupsec" href="roundpin-signup.php"><h2 id="signuptab" class="underlineHover">Sign Up</h2></a>
33
+
34
+    <!-- Icon -->
35
+    <div id="logosection">
36
+      <img src="../images/login-logo.svg" id="login-logo" alt="Roundpin logo" />
37
+    </div>
38
+
39
+    <div id="submitmessage"></div>
40
+    <div id="forgotPassSctn">
41
+      <div id="emailaddressfgtLabel" class="fadeInSpec">Email Address</div>
42
+      <input type="text" id="emailforgotpass" name="emailforgotpass" placeholder="Enter your email address" />
43
+      <input type="button" id="forgotpassbutton" name="forgotpassbutton" value="Request Access" />
44
+    </div>
45
+    <div id="formFooter">
46
+      <a id="forgotpass" class="underlineHover">Forgot Password?</a>
47
+    </div>
48
+
49
+  </div>
50
+  </div>
51
+
52
+<?php
53
+
54
+define('RESTRICTED', TRUE);
55
+
56
+ // Extract the sign up parameter from 'install-signup-check.php' to activate or deactivate the 'Sign Up' tab
57
+ if (is_file(dirname(__FILE__) . '/install-signup-check.php')) {
58
+
59
+    $setupfile = file(dirname(__FILE__) . '/install-signup-check.php');
60
+
61
+    $signup_check = 'false';
62
+    foreach ($setupfile as $keyfile => $valuefile) {
63
+         if ((strpos($valuefile, "\$signupcheck") !== false) && (strpos($valuefile, "//") === false)) {
64
+              $signup_init = explode("=", $valuefile);
65
+              $firsttwo_init = str_replace(" ","", $signup_init[0]);
66
+              $signup_sec = explode(";", $signup_init[1]);
67
+              $signup_check = str_replace(" ","", $signup_sec[0]);
68
+              break;
69
+         }
70
+    }
71
+
72
+    if ($signup_check != 'true') {
73
+
74
+         ?>
75
+         <script type="text/javascript">
76
+             $("#signupsec").css("cursor", "default");
77
+             $("#signupsec").attr("href", "");
78
+
79
+             $("#signuptab").addClass("inactive");
80
+             $("#signuptab").removeClass("underlineHover");
81
+             $("#signupsec").css("pointer-events", "none");
82
+         </script>
83
+         <?php
84
+
85
+    }
86
+ }
87
+
88
+ // Generate a random string to prevent direct access to 'register-user.php'
89
+ function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
90
+      $pieces = [];
91
+      $max = mb_strlen($keyspace, '8bit') - 1;
92
+
93
+      for ($i = 0; $i < $length; ++$i) {
94
+          $pieces []= $keyspace[random_int(0, $max)];
95
+      }
96
+      return implode('', $pieces);
97
+ }
98
+
99
+ $token = random_str(40);
100
+
101
+ session_start();
102
+
103
+ $_SESSION['forgotpass_access'] = $token;
104
+
105
+ ?>
106
+
107
+ <script type="text/javascript">
108
+      var getVerifyToken = "<?php print_r($_SESSION['forgotpass_access']); ?>";
109
+ </script>
110
+
111
+</body>
112
+</html>
113
+