forked from ugwuanyiandy/Website-NACOSS-UNN
-
Notifications
You must be signed in to change notification settings - Fork 1
/
footer.php
61 lines (58 loc) · 2.9 KB
/
footer.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
<div class="bg-dark">
<div class="container tertiary-text bg-dark fg-white" style="padding: 10px">
© <a href="<?= NDG_HOMEPAGE ?>" target="_blank" class="fg-white fg-hover-yellow fg-active-amber">NACOSS UNN Developers Group (NDG)</a>
<div class="place-right compact">
<a id="feedBackLink" class="fg-white fg-hover-yellow fg-active-amber"> FeedBack </a>
|
<a href="contact.php" class="fg-white fg-hover-yellow fg-active-amber"> Contact Us </a>
|
<a href="faq.php" class="fg-white fg-hover-yellow fg-active-amber"> FAQs</a>
</div>
</div>
</div>
<script>
$(function () {
$("#feedBackLink").on('click', function () {
$.Dialog({
overlay: true,
shadow: true,
flat: true,
icon: '<img src="favicon.ico">',
title: 'Feedback',
content: '<div class="span3">' +
'<label id="feedBackLabel">We appreciate your feedback. What do you want to tell us?</label>' +
'<textarea rows="5" id="feedBackMessage" class="span3"></textarea>' +
'<div id="feedBackButtonDiv">' +
'<button class="bg-NACOSS-UNN bg-hover-amber" onclick="sendFeedBack()">Send FeedBack</button>' +
'</div>' +
'</div>',
padding: 10
});
});
});
function sendFeedBack() {
var msg = document.getElementById("feedBackMessage").value;
if (msg !== "") {
var xmlHttp;
if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
} else {
xmlHttp = new ActiveObject("Microsoft.XMLHTTP");
}
xmlHttp.onreadystatechange = function () {
if (xmlHttp.status === 200 && xmlHttp.readyState === 4 && xmlHttp.responseText === "OK") {
document.getElementById("feedBackLabel").setAttribute("class", "padding5 text-center");
document.getElementById("feedBackButtonDiv").setAttribute("hidden", "true");
document.getElementById("feedBackMessage").setAttribute("hidden", "true");
document.getElementById("feedBackLabel").innerHTML = "Thanks for your feedback!<br/>Our team is currently on it";
}
};
xmlHttp.open("GET", "xmlhttp.php?op=feedback&msg=" + msg, true);
xmlHttp.send();
} else {
document.getElementById("feedBackLabel").innerHTML = "Message box is empty!";
document.getElementById("feedBackLabel").setAttribute("class", "padding5");
document.getElementById("feedBackLabel").setAttribute("style", "background: pink");
}
}
</script>