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,120 @@
1
+<!DOCTYPE html>
2
+
3
+<!--
4
+  Copyright (C) 2022, 2024  Double Bastion LLC
5
+
6
+  This file is part of Roundpin, which is licensed under the
7
+  GNU Affero General Public License Version 3.0. The license terms
8
+  are detailed in the "LICENSE.txt" file located in the root directory.
9
+
10
+  This is a modified version of the original file "index.html",
11
+  first modified in 2020. The copyright notice for the original
12
+  content follows:
13
+
14
+  Copyright (c) 2019 by Daniel Zawadzki (https://codepen.io/danzawadzki/pen/EgqKRr)
15
+  License: The MIT License
16
+-->
17
+
18
+<?php
19
+
20
+session_start();
21
+
22
+define('ACCESSCONST', TRUE);
23
+define('RESTRICTED', TRUE);
24
+
25
+require 'db-connect.php';
26
+
27
+// Extract the sign up parameter from 'install-signup-check.php' to activate or deactivate the 'Sign Up' tab
28
+if (is_file(dirname(__FILE__) . '/install-signup-check.php')) {
29
+
30
+    $setupfile = file(dirname(__FILE__) . '/install-signup-check.php');
31
+
32
+    $signup_check = 'false';
33
+    foreach ($setupfile as $keyfile => $valuefile) {
34
+         if ((strpos($valuefile, "\$signupcheck") !== false) && (strpos($valuefile, "//") === false)) {
35
+              $signup_init = explode("=", $valuefile);
36
+              $firsttwo_init = str_replace(" ","", $signup_init[0]);
37
+              $signup_sec = explode(";", $signup_init[1]);
38
+              $signup_check = str_replace(" ","", $signup_sec[0]);
39
+              break;
40
+         }
41
+    }
42
+
43
+    if ($signup_check == 'true') {
44
+
45
+       // Generate a random string to prevent direct access to 'register-user.php'
46
+       function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {
47
+           $pieces = [];
48
+           $max = mb_strlen($keyspace, '8bit') - 1;
49
+
50
+           for ($i = 0; $i < $length; ++$i) {
51
+               $pieces []= $keyspace[random_int(0, $max)];
52
+           }
53
+           return implode('', $pieces);
54
+       }
55
+
56
+       $token = random_str(40);
57
+
58
+       $_SESSION['validate_access'] = $token;
59
+
60
+       ?>
61
+       <script type="text/javascript">
62
+         var signupCheck = "<?php print_r($signup_check); ?>";
63
+         var validateToken = "<?php print_r($_SESSION['validate_access']); ?>";
64
+       </script>
65
+       <?php
66
+
67
+    } else { header("Location: ../login.php"); }
68
+
69
+} else { header("Location: ../login.php"); }
70
+
71
+?>
72
+
73
+
74
+<html>
75
+<head>
76
+   <meta charset="utf-8">
77
+   <title>Roundpin</title>
78
+   <link rel="stylesheet" href="../css/login.css"/>
79
+   <link rel="stylesheet" href="../css/inter.min.css"/>
80
+   <script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
81
+   <script type="text/javascript" src="../js/roundpin-signup.min.js"></script>
82
+   <link rel="shortcut icon" type="image/svg" href="../images/favicon.svg" />
83
+</head>
84
+<body>
85
+
86
+  <div class="wrapper">
87
+  <div id="formContent">
88
+
89
+    <!-- Tabs Titles -->
90
+    <a href="../login.php"><h2 id="signintab" class="underlineHover">Log In</h2></a>
91
+    <a id="signupsec" href="roundpin-signup.php"><h2 id="signuptab" class="active underlineHover">Sign Up</h2></a>
92
+
93
+    <!-- Icon -->
94
+    <div id="logosection">
95
+      <img src="../images/login-logo.svg" id="login-logo" alt="Roundpin logo" />
96
+    </div>
97
+
98
+    <div id="submitmessage"></div>
99
+
100
+    <!-- Signup fields -->
101
+    <div id="emailaddressLabel" class="fadeInSpec">Email Address</div>
102
+    <input type="text" id="emailaddress" name="emailaddress" placeholder="Email Address" />
103
+    <div id="regusernameLabel" class="fadeInSpec">Username</div>
104
+    <input type="text" id="login" name="login" placeholder="Username" />
105
+    <div id="regpasswordLabel" class="fadeInSpec">Password</div>
106
+    <input type="password" id="password" name="password" placeholder="Password (Eg.: d?t5&c!9b~2yq4)" title="At least 10 characters, including at least one letter, one
107
+             digit and one special character" />
108
+    <div id="regpasswordrepLabel" class="fadeInSpec">Repeat Password</div>
109
+    <input type="password" id="passwordrepeat" name="passwordrepeat" placeholder="Repeat Password" title="Enter password again." />
110
+    <input type="submit" id="signupbutton" name="signupbutton" value="Sign Up" />
111
+
112
+    <!-- Remind Passowrd -->
113
+    <div id="formFooter">
114
+        <a id="forgotpass" class="underlineHover" href="forgot-password.php">Forgot Password?</a>
115
+    </div>
116
+  </div>
117
+  </div>
118
+
119
+</body>
120
+</html>