-
Notifications
You must be signed in to change notification settings - Fork 0
/
invite_member.php
148 lines (124 loc) · 3.99 KB
/
invite_member.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Add Member</title>
<style>
body {
background: linear-gradient(to right, #ff6b6b, #ff7e75, #ff8e7f);
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background: white;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
padding: 20px;
text-align: center;
}
h1 {
color: #ff6b6b;
}
.icon {
font-size: 48px;
margin-bottom: 20px;
}
.email-input {
width: 100%;
padding: 10px;
margin: 10px 0;
border: none;
border-bottom: 2px solid #ff6b6b;
outline: none;
font-size: 18px;
}
.invite-button {
background-color: #ff6b6b;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
}
.invite-button:hover {
background-color: #ff7e75;
}
@media (max-width: 768px) {
.container {
width: 90%;
}
}
/* Add this to your existing CSS */
.alert {
padding: 20px;
background-color: green;
color: white;
margin-bottom: 15px;
position: relative;
}
.closebtn {
margin-left: 15px;
color: white;
font-weight: bold;
float: right;
font-size: 22px;
line-height: 20px;
cursor: pointer;
transition: 0.3s;
}
.closebtn:hover {
color: black;
}
</style>
</head>
<body>
<div class="container">
<form action="InvitationTable.php" method="post">
<h1><i class="icon">📧</i> Invite Members</h1>
<?php
session_start();
if (isset($_SESSION['success'])) {
echo '<div class="alert">';
echo '<span class="closebtn" onclick="this.parentElement.style.display=\'none\';">×</span>';
echo $_SESSION['success'];
echo '</div>';
unset($_SESSION['success']); // Clear the error message
}
?>
<?php
if (isset($_SESSION['successconnection'])) {
echo '<div class="alert">';
echo '<span class="closebtn" onclick="this.parentElement.style.display=\'none\';">×</span>';
echo $_SESSION['successconnection'];
echo '</div>';
unset($_SESSION['successconnection']); // Clear the error message
}
if (isset($_GET['project_id'])) {
$project_id = $_GET['project_id'];
$_SESSION['projectID']=$project_id;
} else {
}
?>
<p>Enter the email addresses of the members you want to invite:</p>
<input id="invitemail" type="email" class="email-input" name="email" placeholder="Email Address" required>
<br>
<button type="submit" class="invite-button">Invite</button>
</form>
</div>
<script>
// Function to close the alert
function closeAlert() {
var alert = document.getElementsByClassName("alert")[0];
alert.style.display = "none";
}
</script>
</body>
</html>