Browse code

Created repository.

DoubleBastionAdmin authored on 26/01/2022 20:32:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,112 @@
1
+<!doctype html>
2
+<!--
3
+  Copyright (C) 2021  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.min.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="roundpin-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
+    <span id="emailaddressfgtLabel" class="fadeInSpec">Email Address</span>
41
+    <input type="text" id="emailforgotpass" name="emailforgotpass" placeholder="Enter your email address" />
42
+    <input type="button" id="forgotpassbutton" name="forgotpassbutton" value="Request Access" />
43
+
44
+    <div id="formFooter">
45
+      <a id="forgotpass" class="underlineHover">Forgot Password?</a>
46
+    </div>
47
+
48
+  </div>
49
+  </div>
50
+
51
+<?php
52
+
53
+define('RESTRICTED', TRUE);
54
+
55
+ // Extract the sign up parameter from 'install-signup-check.php' to activate or deactivate the 'Sign Up' tab
56
+ if (is_file(dirname(__FILE__) . '/install-signup-check.php')) {
57
+
58
+    $setupfile = file(dirname(__FILE__) . '/install-signup-check.php');
59
+
60
+    $signup_check = 'false';
61
+    foreach ($setupfile as $keyfile => $valuefile) {
62
+         if ((strpos($valuefile, "\$signupcheck") !== false) && (strpos($valuefile, "//") === false)) {
63
+              $signup_init = explode("=", $valuefile);
64
+              $firsttwo_init = str_replace(" ","", $signup_init[0]);
65
+              $signup_sec = explode(";", $signup_init[1]);
66
+              $signup_check = str_replace(" ","", $signup_sec[0]);
67
+              break;
68
+         }
69
+    }
70
+
71
+    if ($signup_check != 'true') {
72
+
73
+         ?>
74
+         <script type="text/javascript">
75
+             $("#signupsec").css("cursor", "default");
76
+             $("#signupsec").attr("href", "");
77
+
78
+             $("#signuptab").addClass("inactive");
79
+             $("#signuptab").removeClass("underlineHover");
80
+             $("#signuptab").css("cursor", "default");
81
+         </script>
82
+         <?php
83
+
84
+    }
85
+ }
86
+
87
+ // Generate a random string to prevent direct access to 'register-user.php'
88
+ function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
89
+      $pieces = [];
90
+      $max = mb_strlen($keyspace, '8bit') - 1;
91
+
92
+      for ($i = 0; $i < $length; ++$i) {
93
+          $pieces []= $keyspace[random_int(0, $max)];
94
+      }
95
+      return implode('', $pieces);
96
+ }
97
+
98
+ $token = random_str(40);
99
+
100
+ session_start();
101
+
102
+ $_SESSION['forgotpass_access'] = $token;
103
+
104
+ ?>
105
+
106
+ <script type="text/javascript">
107
+      var getVerifyToken = "<?php print_r($_SESSION['forgotpass_access']); ?>";
108
+ </script>
109
+
110
+</body>
111
+</html>
112
+