-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_id.php
executable file
·90 lines (79 loc) · 2.89 KB
/
index_id.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
session_start();
require_once 'config.php';
// if (isset($_SESSION['user_token'])) {
// header("Location: index2.php");
// } else {
// $showGoogleLogin = true;
// // echo "<a href='" . $client->createAuthUrl() . "'>Google Login</a>";
// }
// ?>
<!DOCTYPE html>
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JEVSC7VEKC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-JEVSC7VEKC');
</script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<style>
.top-bar {
position: fixed;
top: calc(100vh / 12);
width: 100%;
background: transparent;
padding: 10px 0;
box-shadow: none;
z-index: 1000;
}
.centered-content {
margin-top: calc(100vh / 10 + 100px); /* Offset by the height of top-bar */
text-align: center;
width: 33.33%; /* Content width as 1/3 of the page */
margin-left: auto;
margin-right: auto;
}
.text-left-align {
text-align: left; /* Ensure text within this div is left-aligned */
}
</style>
</head>
<body>
<!-- <div class="top-bar">
<div class="container text-center">
<h1>Optimize Anything!</h1>
</div>
</div> -->
<div class="centered-content">
<div style="text-align: center;"> <!-- 将内容居中对齐 -->
<!-- <p><b>Get started:</b></p> -->
<!-- 显示 profilic ID 输入框和提交按钮 -->
<form action="index_2.php" method="post">
<div class="form-group">
<label for="Prolific">Input your Prolific ID:</label>
<input type="text" class="form-control" id="ProlificID" name="Prolific" required>
</div>
<button type="submit" class="btn btn-primary" onclick="recordID()">Submit</button>
</form>
</div>
</div>
</div>
<script>
function recordID() {
var ProlificID = document.getElementById("ProlificID").value;
localStorage.setItem("ProlificID", ProlificID);
console.log(ProlificID);
// var url = "index_2.php";
// location.href = url;
}
</script>
</body>
</html>
<!-- <?php if ($showGoogleLogin): ?> -->
<!-- 只有在 $showGoogleLogin 为 true 时才显示 Google 登录按钮 -->
<!-- <a href="<?php echo $client->createAuthUrl(); ?>" class="btn-google">Login with Google</a> -->
<!-- <?php endif; ?> -->