# Copyright (c) 2007 Erwan Briand # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ***** END LICENSE BLOCK ***** session_start(); require(dirname(__FILE__).'/include/config.inc.php'); $cadreonecat = "index"; $ps = $_GET['ps']; $ct_title = CODINGTEAM_DIVERS_57.' - CodingTeam.net'; require(dirname(__FILE__).'/prepend.core.php'); ?>
".CODINGTEAM_FORUM_46." | ".CODINGTEAM_FORUM_49." | ||
"; if($row['open']=="0") { echo" | |||
"; $max_caracteres=40; $texteamodif = htmlentities($row['sujet']); if (strlen($texteamodif) > $max_caracteres) { $texteamodif = substr($texteamodif, 0, $max_caracteres); $position_espace = strrpos($texteamodif, " "); $texteamodif = substr($texteamodif, 0, $position_espace); $texteamodif = $texteamodif."..."; } echo $texteamodif." | ".$row['destinataire']." | "; } echo"||
";
if($nb_message==0)
{
echo" |
"; if ($page>0) { $precedent=$page-1; echo "".CODINGTEAM_PROJETLIBRE_41." "; } $i=0; $j=1; if($nb_total>$nb_messages_page) { while($i<($nb_total/$nb_messages_page)) { if($i!=$page) { echo" $j "; } else { echo"$j"; } $i++;$j++; } } if($debut+$nb_messages_page<$nb_total) { $suivant=$page+1; echo "".CODINGTEAM_PROJETLIBRE_42.""; } echo"
"; /////////////// MP VOIR ENVOYE } elseif($action=="mess") { $id = $_GET['id']; mysql_query("UPDATE member_mess SET open='1' WHERE id='$id' AND destinataire='$pseudo'") or die (mysql_error()); $messagerie=mysql_query("SELECT * FROM member_mess WHERE id='$id' AND destinataire='$pseudo'") or die (mysql_error()); while($row=mysql_fetch_array($messagerie)) { echo "".$row['date']." @ ".$row['heure']." ".$row['auteur'].".
".utf8_encode($row['sujet'])."
"; echo bb_parse($row['message']); echo "
"; } } } else { /////////////// MP VOIR RECU $taille = '450'; @$page=$_GET['page']; $nb_messagerieages_page = "10"; if(@$debut==""){$debut=0;} if(@$page==""){$page=0;} $debut=$page*$nb_messagerieages_page; $messageriea=mysql_query(" SELECT * FROM member_mess WHERE destinataire='$pseudo' ") or die (mysql_error()); $nb_total=mysql_num_rows($messageriea); $messagerieagerie=mysql_query(" SELECT * FROM member_mess WHERE destinataire='$pseudo' ORDER BY id DESC LIMIT $debut,$nb_messagerieages_page ") or die (mysql_error()); $nb_messagerieage=mysql_num_rows($messagerieagerie); echo"
|
"; if ($page>0) { $precedent=$page-1; echo "".CODINGTEAM_PROJETLIBRE_41." "; } $i=0; $j=1; if($nb_total>$nb_messagerieages_page) { while($i<($nb_total/$nb_messagerieages_page)) { if($i!=$page) { echo" $j "; } else { echo"$j"; } $i++;$j++; } } if($debut+$nb_messagerieages_page<$nb_total) { $suivant=$page+1; echo "".CODINGTEAM_PROJETLIBRE_42.""; } echo"
"; /////////////// MP VOIR RECU } ?>