Browse Source

Nicer looking login form

Also file permission cleanup
spaghetti 2 years ago
parent
commit
b6b2095d52

+ 0
- 0
.gitignore View File


+ 0
- 0
README.md View File


+ 7
- 11
design/publicheader.php View File

@@ -26,19 +26,15 @@ define('FOOTER_FILE',SERVER_ROOT.'/design/publicfooter.php');
26 26
   <meta id="bg_data" bg="<?=$img[rand(0,count($img)-1)]?>">
27 27
 </head>
28 28
 <body>
29
-<div id="head">
30
-</div>
29
+<div id="head"><span>
30
+<a href="login.php">Log in</a>
31
+<? if (OPEN_REGISTRATION) { ?>
32
+ | <a href="register.php">Register</a>
33
+<? } ?>
34
+</span></div>
31 35
 <div id="content">
32 36
   <table class="layout" id="maincontent">
33 37
     <tr>
34 38
       <td align="center" valign="middle">
35
-        <div id="logo">
36
-          <ul>
37
-            <li><a href="index.php">Home</a></li>
38
-            <li><a href="login.php">Log in</a></li>
39
-<? if (OPEN_REGISTRATION) { ?>
40
-            <li><a href="register.php">Register</a></li>
41
-<? } ?>
42
-          </ul>
43
-        </div>
39
+        <a href="index.php"><div id="logo"></div></a>
44 40
 <?

+ 0
- 0
gazelle.sql View File


+ 0
- 0
sections/image/err_imgs/badprotocol.png View File


+ 0
- 0
sections/image/err_imgs/forbidden.png View File


+ 0
- 0
sections/image/err_imgs/invalid.png View File


+ 0
- 0
sections/image/err_imgs/invisible.png View File


+ 0
- 0
sections/image/err_imgs/nogd.png View File


+ 0
- 0
sections/image/err_imgs/small.png View File


+ 0
- 0
sections/image/err_imgs/timeout.png View File


+ 3
- 4
sections/login/index.php View File

@@ -294,9 +294,8 @@ else {
294 294
               }
295 295
 
296 296
               $SessionID = Users::make_secret(64);
297
-              $KeepLogged = ($_POST['keeplogged'] ?? false) ? 1 : 0;
298
-              setcookie('session', $SessionID, (time()+60*60*24*365)*$KeepLogged, '/', '', true, true);
299
-              setcookie('userid', $UserID, (time()+60*60*24*365)*$KeepLogged, '/', '', true, true);
297
+              setcookie('session', $SessionID, (time()+60*60*24*365), '/', '', true, true);
298
+              setcookie('userid', $UserID, (time()+60*60*24*365), '/', '', true, true);
300 299
 
301 300
               // Because we <3 our staff
302 301
               $Permissions = Permissions::get_permissions($PermissionID);
@@ -311,7 +310,7 @@ else {
311 310
                 INSERT INTO users_sessions
312 311
                   (UserID, SessionID, KeepLogged, Browser, OperatingSystem, IP, LastUpdate, FullUA)
313 312
                 VALUES
314
-                  ('$UserID', '".db_string($SessionID)."', '$KeepLogged', '$Browser', '$OperatingSystem', '".db_string(apc_exists('DBKEY')?DBCrypt::encrypt($_SERVER['REMOTE_ADDR']):'0.0.0.0')."', '".sqltime()."', '".db_string($_SERVER['HTTP_USER_AGENT'])."')");
313
+                  ('$UserID', '".db_string($SessionID)."', '1', '$Browser', '$OperatingSystem', '".db_string(apc_exists('DBKEY')?DBCrypt::encrypt($_SERVER['REMOTE_ADDR']):'0.0.0.0')."', '".sqltime()."', '".db_string($_SERVER['HTTP_USER_AGENT'])."')");
315 314
 
316 315
               $Cache->begin_transaction("users_sessions_$UserID");
317 316
               $Cache->insert_front($SessionID, array(

+ 5
- 20
sections/login/login.php View File

@@ -16,37 +16,22 @@ if (!$Banned) {
16 16
 <?  } ?>
17 17
   <table class="layout">
18 18
     <tr>
19
-      <td>Username&nbsp;</td>
20 19
       <td colspan="2">
21
-        <input type="text" name="username" id="username" class="inputtext" required="required" maxlength="20" pattern="[A-Za-z0-9_?]{1,20}" autofocus="autofocus" placeholder="Username" />
20
+        <input type="text" name="username" id="username" class="inputtext" required="required" maxlength="20" pattern="[A-Za-z0-9_?]{1,20}" autofocus="autofocus" placeholder="Username" size="40" />
22 21
       </td>
23 22
     </tr>
24 23
     <tr>
25
-      <td>Password&nbsp;</td>
26
-      <td colspan="2">
24
+      <td>
27 25
         <input type="password" name="password" id="password" class="inputtext" required="required" maxlength="307200" pattern=".{6,307200}" placeholder="Password" />
28 26
       </td>
29
-    </tr>
30
-    <tr id="2fa_tr">
31
-      <td>Two-factor&nbsp;</td>
32
-      <td colspan="2">
33
-        <input type="text" name="twofa" id="twofa" class="inputtext" maxlength="6" pattern="[0-9]{6}" placeholder="2FA Verification Code" />
34
-      </td>
35
-    </tr>
36
-    <tr>
37
-      <td></td>
38 27
       <td>
39
-        <input type="checkbox" id="keep2fa" name="keep2fa" value="0">
40
-        <label for="keep2fa">Show 2FA</label>
28
+        <input type="text" name="twofa" id="twofa" class="inputtext" maxlength="6" pattern="[0-9]{6}" placeholder="2FA" size="6" title="Leave blank if you have not enabled 2FA" />
41 29
       </td>
42 30
     </tr>
43 31
     <tr>
44
-      <td></td>
45
-      <td>
46
-        <input type="checkbox" id="keeplogged" name="keeplogged" value="1"<?=(isset($_REQUEST['keeplogged']) && $_REQUEST['keeplogged']) ? ' checked="checked"' : ''?>>
47
-        <label for="keeplogged">Remember me</label>
32
+      <td colspan="2">
33
+        <input type="submit" name="login" value="Log in" class="submit" />
48 34
       </td>
49
-      <td><input type="submit" name="login" value="Log in" class="submit" /></td>
50 35
     </tr>
51 36
   </table>
52 37
   </form>

+ 0
- 0
sections/schedule/hourly/sphinx_min_max_matches.php View File


+ 0
- 0
static/common/badges/toujou_bra.png View File


+ 0
- 7
static/functions/public.js View File

@@ -11,11 +11,4 @@ $(() => {
11 11
         $('#no-cookies').gshow();
12 12
     }
13 13
   }
14
-
15
-  if ($('#keep2fa').length) {
16
-    $('#2fa_tr').ghide()
17
-    $('#keep2fa')[0].onclick = (e) => {
18
-      $('#2fa_tr')[$('#keep2fa')[0].checked ? 'gshow' : 'ghide']()
19
-    }
20
-  }
21 14
 })

+ 0
- 0
static/styles/beluga/images/haze.png View File


+ 0
- 0
static/styles/font-awesome/css/font-awesome.css View File


+ 0
- 0
static/styles/font-awesome/css/font-awesome.min.css View File


+ 0
- 0
static/styles/font-awesome/fonts/FontAwesome.otf View File


+ 0
- 0
static/styles/font-awesome/fonts/fontawesome-webfont.eot View File


+ 0
- 0
static/styles/font-awesome/fonts/fontawesome-webfont.svg View File


+ 0
- 0
static/styles/font-awesome/fonts/fontawesome-webfont.ttf View File


+ 0
- 0
static/styles/font-awesome/fonts/fontawesome-webfont.woff View File


+ 0
- 0
static/styles/font-awesome/fonts/fontawesome-webfont.woff2 View File


+ 31
- 32
static/styles/public/style.css View File

@@ -34,10 +34,13 @@ a:hover {
34 34
 }
35 35
 
36 36
 input[type="text"], input[type="password"], input[type="email"] {
37
-  padding: 1px 3px 1px 3px;
38
-  font-family: "tahoma", "arial", "helvetica", "sans-serif";
39
-  font-size: 8pt;
40
-  width: 200px;
37
+  color: black;
38
+  background-color: white;
39
+  padding: 0 0 0 6px;
40
+  font: 500 14px/29px Helvetica, Arial, sans-serif;
41
+  width: 100%;
42
+  box-sizing: border-box;
43
+  border-radius: 3px;
41 44
 }
42 45
 
43 46
 input[type="text"]:valid, input[type="password"]:valid, input[type="email"] {
@@ -45,11 +48,20 @@ input[type="text"]:valid, input[type="password"]:valid, input[type="email"] {
45 48
 }
46 49
 
47 50
 input[type="text"]:invalid, input[type="password"]:invalid {
48
-  border-top-style: none;
49
-  border-bottom-style: none;
50
-  border-left-style: none;
51
-  border-right-style: solid 2px;
52
-  border-color: red;
51
+  border: none;
52
+  border-right: 2px solid red;
53
+}
54
+
55
+input[type="submit"] {
56
+  width: 100%;
57
+  background-color: white;
58
+  font: 500 14px/29px Helvetica, Arial, sans-serif;
59
+  border: none;
60
+  border-radius: 3px;
61
+  cursor: pointer;
62
+}
63
+input[type="submit"]:hover {
64
+  background-color: #FFF7F7;
53 65
 }
54 66
 
55 67
 #head, #foot {
@@ -59,21 +71,26 @@ input[type="text"]:invalid, input[type="password"]:invalid {
59 71
   overflow: hidden;
60 72
 }
61 73
 
74
+#head {
75
+  text-align: right;
76
+}
77
+
62 78
 #foot {
63 79
   text-align: center;
64 80
   bottom: 0;
65 81
   position: absolute;
66 82
 }
67 83
 
68
-#foot > span,#head > span {
84
+#foot > span, #head > span {
69 85
   line-height: 30px;
86
+  margin: 10px;
70 87
 }
71 88
 
72
-#foot > span {
89
+#foot > span, #head > span {
73 90
   color: #a07c92;
74 91
 }
75 92
 
76
-#foot a {
93
+#foot a, #head a {
77 94
   color: #b98fa9;
78 95
 }
79 96
 
@@ -93,29 +110,11 @@ input[type="text"]:invalid, input[type="password"]:invalid {
93 110
 }
94 111
 
95 112
 #logo {
96
-  height: 60px;
97
-  width: 244px;
113
+  height: 100px;
98 114
   background-image: url('images/logo.svg');
99 115
   background-repeat: no-repeat;
100
-  background-position: top left;
101
-  padding: 50px 0px 0px 0px;
116
+  background-position: center;
102 117
   background-size: contain;
103
-  text-align: center;
104
-}
105
-
106
-#logo ul {
107
-  float: left;
108
-  left: 50%;
109
-  margin: 2em auto;
110
-  position: relative;
111
-}
112
-
113
-#logo ul li {
114
-  float: left;
115
-  position: relative;
116
-  right: 50%;
117
-  margin: 0 1em 0 0;
118
-  list-style: none;
119 118
 }
120 119
 
121 120
 .poetry {

Loading…
Cancel
Save