-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinviteuserstoquestion.php
48 lines (42 loc) · 1.07 KB
/
inviteuserstoquestion.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
<?php
include('header.php');
#$userid=isloggedin();
if ($userid)
{
$userstoinvite = $_POST['users'];
if(!$userstoinvite){$userstoinvite=array();}
$question = $_POST['question'];
$room = $_POST['room'];
/* if ($.cookie('btab'))
{
foreach ($userstoinvite as $user)
{
InviteUserToBubbleQuestion($user,$question,$room,$userid);
}
}
else
{
foreach ($userstoinvite as $user)
{
InviteUserToQuestion($user,$question,$room,$userid);
// Add entry to invites table so user can see the question in his To-Do List page
SendInvite($userid, $user, $question);
}
} */
foreach ($userstoinvite as $user)
{
InviteUserToQuestion($user,$question,$room,$userid);
// Add entry to invites table so user can see the question
// in his To-Do List page
SendInvite($userid, $user, $question);
}
#echo "Invitations Sent";
// Only show room id if not empty
$question_url = CreateQuestionURL($question,$room);
header("Location: viewquestion.php".$question_url);
}
else
{
header("Location: login.php");
}
?>