-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlive.php
executable file
·49 lines (36 loc) · 1.15 KB
/
live.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
<?php
/*********************/
/* Structure du LIVE */
/*********************/
include('config.php');
function displayContent(){
global $idUnif, $university, $longUnif, $dbUnif, $dbAdmin, $connectionAdmin, $dbNetwork, $connectionNetwork;
$YouAreHere = "live";
//Affiche le code du header
include('header.php');
echo "<div id=\"content\">\n";
include('content_live.php');
echo " <a class=\"plusDePosts\" href=\"#\">Afficher plus de posts</a>\n";
echo " <a class=\"goTop\" href=\"#wrapper\">Haut de la page</a>\n";
echo "</div> <!-- /content -->\n\n";
echo "<div id=\"sidebar\">\n";
include('sidebar.php');
echo"</div> <!-- /sidebar -->\n\n";
//Affiche le code du footer
include('footer.php');
} //displayContent()
//If quelqu'un a posté un nouveau post, sanitize + insert dans la db.
//Puis affiche le nouveau contenu de la page.
if(isset($_POST['posting_button'])){
/**** POSTING ****/
$name = $_COOKIE['username'];
$post = $_POST['posting_area'];
include ('live_insert_post.php');
// reload la page avec le nouveau contenu
displayContent();
} //if(isset())
//Quand la page est loadée, affiche le contenu
else{
displayContent();
}
?>