forked from howest-wsde/owaes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
group.php
88 lines (76 loc) · 2.71 KB
/
group.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
<?php
include "inc.default.php"; // should be included in EVERY file
$oSecurity = new security(TRUE);
$iID = intval($_GET["id"]);
$oGroup = group($iID);
$oNotification = new notification();
$oNotification->read("group." . $iID);
$oExperience = new experience(me());
$oExperience->detail("reason", "pageload");
$oExperience->add(1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
echo $oPage->getHeader();
?>
</head>
<body id="profile">
<?php echo $oPage->startTabs(); ?>
<div class="body content content-account-profile container">
<div class="row">
<?php /*echo $oSecurity->me()->html("leftuserprofile.html"); */
echo $oSecurity->me()->html("user.html");
?>
</div>
<?php
//vardump($oProfile->friends());
//echo "<div class=\"masonry\">";
echo $oGroup->html("group.html");
//echo "</div>";
?>
<?php echo $oPage->endTabs(); ?>
</div>
<div class="footer">
<?php echo $oPage->footer(); ?>
</div>
<?php
$oRechten = new usergrouprights($oGroup, me());
if ($oRechten->value("confirmed") === FALSE) {
?>
<div class="modal fade" id="invitationModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Groepsuitnodiging</h4>
</div>
<div class="modal-body">
<p>Wilt u lid worden van de groep "<?php echo $oGroup->naam(); ?>"!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" id="btn-accept" data-dismiss="modal">Ja</button>
<button type="button" class="btn btn-cancel" id="btn-cancel" data-dismiss="modal">Neen</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script>
$(document).ready(function () {
$("#invitationModal").modal({
show: true,
backdrop: "static",
keyboard: false
});
$("#btn-accept").click( function (){
$.post("<?php echo fixPath("group.invitationresponse.ajax.php") ?>", {"g":<?php echo $iID; ?> , "a": 1});
});
$("#btn-cancel").click( function (){
$.post("<?php echo fixPath("group.invitationresponse.ajax.php") ?>", {"g":<?php echo $iID; ?>, "a": 0});
});
});
</script>
<?php
}
?>
</body>
</html>