-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathjoin.php
More file actions
130 lines (83 loc) · 2.98 KB
/
join.php
File metadata and controls
130 lines (83 loc) · 2.98 KB
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
<?php
session_start();
include "php/func.php";
$id = $_GET['id'];
$key = $_GET['key'];
connect();
$user = getLoggedInUser();
$invite = sqlObject("SELECT * FROM invites WHERE id=".sqlVar($id));
if (!$invite)
$error = "Invalid invite";
else if ($key != makeInviteKey($invite->message,$invite->email,$invite->id))
$error = "Invalid key";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta name="viewport" content="width=860">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="./css/main.css" />
<link rel="stylesheet" type="text/css" href="./css/nav.css" />
<link rel="stylesheet" href="./css/font-awesome.css">
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<style type="text/css">
html,body{width:100%; height:100%;}
.outer{
width: 100%;
height: 100%;
display: table;
vertical-align: middle;
background-color: #f8f8f8;
background: rgb(255,255,255);
background: -moz-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%, rgba(196,220,255,1) 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(196,220,255,1)));
background: -webkit-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(196,220,255,1) 100%);
background: -o-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(196,220,255,1) 100%);
background: -ms-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(196,220,255,1) 100%);
background: radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(196,220,255,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#c4dcff',GradientType=1 );
}
.container{
text-align: center;
position: relative;
vertical-align: middle;
display: table-cell;
/*padding-top: 40px;*/
}
.inner{
margin-left: auto;
margin-right: auto;
width: 100%;
}
</style>
<title>Join</title>
</head>
<body class="dark">
<div class="outer">
<div class="container">
<div class="inner">
<div class="intro single">
<div id="title">
<?php echo "Welcome to ".CONFIG_SITE_TITLE; ?>
</div>
<p>
<?php
if ($error)
echo $error;
else if ($invite)
{
$msg = getMessage($invite->message);
echo '<h3>You have been invited to join: <br><br>'.$msg->plain.'</h3>';
echo '<form id="form1" name="form1" method="post" action="/php/accept.php" enctype="multipart/form-data" >';
echo '<button class="button large gray" /><i class="icon-remove"></i> Decline</button>';
echo '<button class="button large blue" name="accept" value="1" class="button"><i class="icon-ok icon-large"></i> Accept</button>';
echo '<input type="hidden" name="id" value="'.$id.'">';
echo '<input type="hidden" name="key" value="'.$key.'">';
echo '</form>';
}
disconnect();
?>
</p>
</div>
</body>
</html>