Error : OK for chat but with who ?"; die(); } else { //Définition de l'ID de l'autre personne $id_other = $_GET['id']*1; } if($_SESSION['ID'] == $id_other) { echo "Error: You can't chat with you !"; die(); } elseif($id_other == 0) { //Redirection vers la page de choix d'un session private chat header('Location: '.$urlsite.'action.php?actionid=36'); //echo "Error : File stopped for security reasons."; die(); } if(!isset($_GET['ajax'])) { //Définition du temps $time = time(); ?> <?php echo $lang[65]; ?>

Message dans le chat privé

Un message vient de vous être adressé par ".$afficher['prenom']." ".$afficher['nom']." dans le chat privé de Comunic.

Voici l'historique de votre discussion dans Comunic :

"; //Get the content of the chat $content_chat = get_content_private_chat($_SESSION['ID'], $id_other, $bdd, 15, "*", $urlsite); //Show content of the private chat foreach($content_chat as $show) { //We show the content of the chat $texte_message .= ""; } $texte_message .="
"; if($show['ID_personne'] == $_SESSION['ID']) { $texte_message .= $afficher['prenom']." ".$afficher['nom']." : ".corrige_caracteres_speciaux(corrige_accent_javascript($show['contenu'])); } else { $texte_message .= "Vous : ". corrige_caracteres_speciaux(corrige_accent_javascript($show['contenu'])); } $texte_message .= "
"; $texte_message .= "

Connectez-vous à Comunic afin d'accéder à toute les notifications

"; //Envoi du message include('inc/envoi_mail.php'); } } } } } } //Définition du numéro de fenêtre $id_window = (isset($_GET['id_window']) ? $_GET['id_window'] : "default"); //On vérifie quel temps il faut accorder au chat privé if(isset($_SESSION['window_private_chat'][$_SESSION['ID']][$id_other." - ".$id_window][0]) AND isset($_GET['refresh'])) { if($_SESSION['window_private_chat'][$_SESSION['ID']][$id_other." - ".$id_window][0] > 0) { //On définit le temps $last_id_post = $_SESSION['window_private_chat'][$_SESSION['ID']][$id_other." - ".$id_window][0][0]; } } if(!isset($_SESSION['window_private_chat'][$_SESSION['ID']][$id_other." - ".$id_window][0])) { $_SESSION['window_private_chat'][$_SESSION['ID']][$id_other." - ".$id_window][0] = array(1); } //Get the content of the chat $content_chat = get_content_private_chat($_SESSION['ID'], $id_other, $bdd, 15, (isset($last_id_post) ? $last_id_post : "*")); //On vérifie si c'est nécessaire de continuer if(count($content_chat) == 0) exit('0'); //On met tous les messages en vu mettre_en_vu_private_chat($_SESSION['ID'], $id_other, $bdd); //Show content of the private chat foreach($content_chat as $show) { //On met à jour le dernier post vu si possible if((isset($_SESSION['window_private_chat'][$_SESSION['ID']][$id_other." - ".$id_window][0][0]) ? $_SESSION['window_private_chat'][$_SESSION['ID']][$id_other." - ".$id_window][0][0] : 0) < $show['ID']) { //On met à jour la variable $id_post = $show; $_SESSION['window_private_chat'][$_SESSION['ID']][$id_other." - ".$id_window][0] = $id_post; } //We show the content of the chat echo ""; if($show['ID_personne'] == $_SESSION['ID']) { ?>
"; } }