page.header.html 4.36 KB
Newer Older
maryam's avatar
done  
maryam committed
1
2
<?php
include('./languages/language.php');
3
4
include('./models/RecupScore.php');//cf. said file…
require_once('./controllers/notificationMessage.php');
David's avatar
David committed
5
6

// Notification initialisation
7
$notif = new Notification();
David's avatar
David committed
8
9
$notif->readNotif();

maryam's avatar
done  
maryam committed
10
11
12
13
14
15
//header('Content-Type: text/html; charset=UTF-8');
?><!DOCTYPE html>
<html>
    <head>
        <title><?php echo $title; ?></title>
        <meta charset="UTF-8">
arnaudbey's avatar
arnaudbey committed
16
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
maryam's avatar
done  
maryam committed
17
        <meta name="viewport" content="width=device-width, initial-scale=1">
18

Mathieu Loiseau's avatar
Mathieu Loiseau committed
19
		<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
20
		<!--Module de son : -->
Mathieu Loiseau's avatar
Mathieu Loiseau committed
21
		<script src="https://www.webrtc-experiment.com/RecordRTC.min.js"></script>
22
23
24
25
26

		<!--pour coder dans le train>
		<script src="../jquery-3.0.0.min.js"></script>
		<script src="../RecordRTC.min.js"></script-->

maryam's avatar
done  
maryam committed
27
28
29
		<!-- Adaptation au Bootstrap -->
		<link rel="stylesheet" type="text/css" href="style/default.css/css/bootstrap.css">
		<link rel="stylesheet" type="text/css" href="style/default.css/css/bootstrap-theme.css">
David's avatar
David committed
30
		<link rel ="stylesheet" type ="text/css" href="style/default.css/css/moncss.css">
31

maryam's avatar
done  
maryam committed
32
		<script src="style/default.js/js/bootstrap.min.js"></script>
33

maryam's avatar
done  
maryam committed
34
35
36
		<link href="http://fonts.googleapis.com/css?family=Playball" rel="stylesheet" type="text/css">
		<link rel="icon" href="style/default.css/imgs/favicon.ico" />

David's avatar
David committed
37
38
39
		<!-- For notification style -->
		<link rel="stylesheet" type="text/css" href="style/default.css/css/ns-default.css" />
		<link rel="stylesheet" type="text/css" href="style/default.css/css/ns-style-other.css" />
40

David's avatar
David committed
41
42
43
44
		<!-- For notifications-->
		<script src="controllersJS/Notification/modernizr.custom.js"></script>
		<script src="controllersJS/sendSQL.js"></script>
		<script src="controllersJS/notif.js"></script>
maryam's avatar
done  
maryam committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    </head>
    <body>
        <div id="header-logo"></div>
		<div class="navbar navbar-inverse" role="navigation">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
								<span class="sr-only">Toggle navigation</span>
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
							</button>
					<a class="navbar-brand" href="index.php">Game of Words</a>
				</div>
59
			<div class="collapse navbar-collapse" style="height: 1px;">
maryam's avatar
done  
maryam committed
60
				<ul class="nav navbar-nav">
61
<?php
maryam's avatar
done  
maryam committed
62
63
	if ( $GLOBALS['userlogged'] ) { ?>

Mathieu Loiseau's avatar
Mathieu Loiseau committed
64
65
66
67
			<li><a href="index.php?mode=profile" title="<?php echo htmlspecialchars($GLOBALS['user']->username); ?>"><?php echo $lang['menu_profile']; ?></a></li>
			<li><a href="index.php?mode=score" title="score"><?php echo $lang['scores']; ?></a></li>
			<li><a href="index.php?mode=infos" title="rules"><?php echo $lang['rules']; ?></a></li>
			<li><a href="index.php?mode=logout" title="logout"><?php echo $lang['logout']; ?></a></li>
David's avatar
David committed
68
69
			<li id="notification_li">
				<span id="notification_count" ></span>
Mathieu Loiseau's avatar
Mathieu Loiseau committed
70
				<a href="#" id="notificationLink"><img src="style/default.css/imgs/info.svg" style="width:25px;height:25px;"></a>
David's avatar
David committed
71
72
73
74
75
				<div id="notificationContainer">
					<div id="notificationTitle">News</div>
					<div id="notificationsBody" class="notifications">
							<?php
							if($notif->messNotif){?>
76
									<script>
David's avatar
David committed
77
78
								var tab = <?php echo json_encode($notif->messNotif); ?>;
									notifBox(tab);</script>
79
							<?php
David's avatar
David committed
80
81
82
83
84
85
86
87
88
89
90
							}
							else{ ?>
								<script> $("#notification_count").hide(); </script>
							<?php }
							?>
					</div>
					<div id="notificationFooter"><a href="#"></a></div>
				</div>
			</li>


91
92
93

<?php
	} else {
maryam's avatar
done  
maryam committed
94
?>
Mathieu Loiseau's avatar
Mathieu Loiseau committed
95
96
			<li><a href="?mode=login" title="login">Se connecter</a></li>
			<li><a href="?mode=register" title="register">S'enregister</a></li>
97
98
<?php
	}
maryam's avatar
done  
maryam committed
99
?>
100
				</ul>
maryam's avatar
done  
maryam committed
101
102
103
			</div>
		</div>
</div>
David's avatar
David committed
104
105
106
107
108
109
<script src="controllersJS/Notification/notificationFx.js"></script>
<script src="controllersJS/Notification/classie.js"></script>
<script src="modelJS/notifDynam.js"></script>
<?php
	if(isset($_SESSION["notif"])){
		foreach($_SESSION["notif"] as $key => $value)
110
		{
David's avatar
David committed
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
			foreach($_SESSION["notif"][$key] as $k => $v){
				$scoreUtilisateur = "";
				if($k != "undefined"){
					$scoreUtilisateur = score($k);
					?>
					<script>
						notifOn("<?php echo $lang[$v];?>","<?php echo $key; ?>","<?php echo $k; ?>", "<?php echo $scoreUtilisateur; ?>");
					</script>
				<?php }

	 		}
	 		unset($_SESSION["notif"]);
	 	}
	}
?>

maryam's avatar
done  
maryam committed
127
	<div class="container">