'; $TotalPublications = getTotalPublications(); //Security - Get Variables if(isset($_GET['next']) ){ if($_GET['next'] == -0) $_GET['next'] = 0; if( filter_var($_GET['next'], FILTER_VALIDATE_INT)=== 0 || !filter_var($_GET['next'], FILTER_VALIDATE_INT)=== FALSE){ if( $_GET['next'] < 0) $_GET['next'] = 0; if( $_GET['next'] >= $TotalPublications ) $_GET['next'] = 0; }else{ $_GET['next'] = 0; } }else{ $_GET['next'] = 0; } $Publication = getAllPublications(); if( CanAddPublication() == true){ echo'
Créer une publication
'; } for($i=0 ; $i < count($Publication) ;$i++){ $User = getUser($Publication[$i]['id_user']); $isJaime = isJaime($Publication[$i]['id_publication'] ,$_SESSION["glpiID"]); $class = $isJaime == false ? '' : $isJaime; echo'
Communication INTERNE
'.$Publication[$i]['date'].'
'; if($Publication[$i]['id_user'] == $_SESSION["glpiID"]) echo'
'; echo'
'; $is_arabic = preg_match('/\p{Arabic}/u', nl2br($Publication[$i]['titre'])); if($is_arabic == true ){ echo'
'.nl2br($Publication[$i]['titre']).'
'; }else{ echo'
'.nl2br($Publication[$i]['titre']).'
'; } //files $file = getPublicationsFiles($Publication[$i]['id_publication']); if(count($file) == 1){ if($file[0]['type'] == "image"){ echo'
'; }elseif($file[0]['type'] == "video"){ } }elseif(count($file) > 1){ echo'
'; for($y=0 ; $y < count($file) ;$y++){ echo'
'; } echo'
'; } echo'
'; $totalEmoj =getTopEmoj($Publication[$i]['id_publication']); $emojs = count($totalEmoj); if($emojs != 0){ for($pp=0;$pp < $emojs ; $pp++){ echo''; } }else{ echo''; } echo '
'.getTotal($Publication[$i]['id_publication'],"comment").' commentaires


'; //all Commentaires $Commentaires = getCommentaires($Publication[$i]['id_publication']); echo'
'; //if(count($Commentaires) != 0) //echo'Afficher autres commentaires'; for($x=0 ; $x < count($Commentaires) ;$x++){ $User = getUser($Commentaires[$x]['id_user']); echo'
'.$User['nom']." ".$User['prenom'].'
'.$Commentaires[$x]['commentaire'].'
'; if($Commentaires[$x]['id_user'] == $_SESSION["glpiID"]){ echo'
Modifier . Supprimer
'; } echo'
' ; } echo'
'; echo'
'; } //pagination echo"
"; echo""; $root = $CFG_GLPI["root_doc"]; $fullname = $_SESSION["glpifriendlyname"]; if (Session::getCurrentInterface() == "helpdesk") { Html::helpFooter(); } else { Html::footer(); } ?>