This repository was archived by the owner on Mar 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharchive_private_chat.php
More file actions
executable file
·99 lines (84 loc) · 2.49 KB
/
Copy patharchive_private_chat.php
File metadata and controls
executable file
·99 lines (84 loc) · 2.49 KB
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
89
90
91
92
93
94
95
96
97
98
99
<?php
//Safety
include('securite.php');
//Init page
include('inc/initPage.php');
//International
$lang = detecteinstallelangue();
//Info:
// Table :
// Name: chatprive
// Content :
// ID : Unique ID of the post
// date_envoi : Date of the post
// ID_personne : Who has sent the post
// ID_destination : To who is sent the post
// contenu : content of the post
//Is accessible by privatechat.php
//See Pierre Hubert for more informations.s
//Get ready
$headerprivatechat = '<link href="'.$urlsite.'css/privatechat.css" rel="stylesheet" type="text/css" />
<link href="'.$urlsite.'css/metro-bootstrap_2.css" rel="stylesheet">';
if(!isset($_GET['id']))
{
echo "<b>Error : OK for chat but with who ?</b>";
die();
}
else
{
//Définition de l'ID de l'autre personne
$id_other = $_GET['id']*1;
}
if($_SESSION['ID'] == $id_other)
{
echo "<b>Error: You can't chat with you !</b>";
die();
}
elseif($id_other < 1)
{
echo "<b>Error : File stopped for security reasons.</b>";
die();
}
$info_remote = cherchenomprenom($id_other, $bdd);
?><!DOCTYPE html>
<html>
<head>
<title><?php echo $lang[65]; ?></title>
<?php echo $headerprivatechat; ?>
<?php include(pagesRelativePath('common/head.php')); ?>
</head>
<body class="metro">
<?php include(pagesRelativePath('common/pageTop.php')); ?>
<div class="nouveau_corps_page">
<h2 class="titre">Chat privé avec <?php echo $info_remote['prenom']." ".$info_remote['nom']; ?></h2>
<table id="contentpost" width="90%">
<?php
//Get the content of the chat
$content_chat = get_content_private_chat($_SESSION['ID'], $id_other, $bdd, 10000, '*', $urlsite);
//Show content of the private chat
foreach($content_chat as $show)
{
//We show the content of the chat
echo "<tr><td>";
if($show['ID_personne'] == $_SESSION['ID'])
{
?><div class="notice marker-on-right bg-lightBlue fg-white">
<?php echo corrige_accent_javascript(afficher_lien($show['contenu'])); ?>
</div>
<?php
}
else
{
?><div class="notice marker-on-left bg-lightOlive fg-white">
<?php echo corrige_accent_javascript(afficher_lien($show['contenu'])); ?>
</div>
<?php
}
echo "</tr>";
} ?>
</table>
</div>
<hr />
<?php include(pagesRelativePath('common/pageBottom.php')); ?>
</body>
</html>