# 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'); if(isset($_GET['zid'])) { require(dirname(__FILE__).'/include/members.inc.php'); $id = $_GET['zid']; $numero = $_GET['zid']; if (IsProjectAdmin()) { $date = $_POST['date']; $heure = $_POST['heure']; $auteur = $_POST['auteur']; $titre = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['titre']))); $message = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['texte']))); mysql_query("INSERT INTO ct2_os_actu (titre, auteur, texte, date, heure, projet) VALUES ('$titre','$auteur','$message','$date','$heure','$id') ") or die (mysql_error()); mysql_insert_id(); if(file_exists('"rss/cache/cache-rss-rss2-projets-".$id.".xml"')) { unlink("rss/cache/cache-rss-rss2-projets-".$id.".xml"); } Header('Location: '.$_GET['p'].'-actus_'.$_GET['ct_lang'].'.html'); } else { exit('Error'); } } if(isset($_GET['pid'])) { require(dirname(__FILE__).'/include/members.inc.php'); $numero = $_GET['id']; if (IsProjectAdmin()) { $titre = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['titre']))); $message = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['texte']))); $pid = $_GET['pid']; mysql_query("UPDATE ct2_os_actu SET titre = '$titre', texte = '$message' WHERE id = '$pid' LIMIT 1"); Header('Location: '.$_GET['p'].'-actus_'.$_GET['ct_lang'].'.html'); } else { exit('Error'); } } $code = $_GET['p']; $ma = mysql_query("SELECT * FROM ct2_os WHERE adresse = '$code' "); if (mysql_num_rows($ma) == 0) { require('include/erreurs.inc.php'); GenerateErrorPage ("404","Not Found",$txt); exit(); } $ma = mysql_query("SELECT * FROM ct2_os WHERE adresse = '$code' "); $mb = mysql_fetch_array($ma); $titre = $mb['titre']; $desc = $mb['description']; $numero = $mb['id']; $cadreonecat = "os"; $ct_title = utf8_encode(htmlspecialchars($titre)). ' - CodingTeam.net : '.CODINGTEAM_GAUCHE_19; require(dirname(__FILE__).'/prepend.core.php'); ?>

-

rss syndication'; ?>

" /> " />





- ".$row['date']." @ ".$row['heure']." "; echo $row['auteur']; echo""; if (IsProjectAdmin()) { ?>






 

"; $idaneplusafficher = $row['id']; } $nb_membres_page=4; @$page=$_GET['page']; if(@$debut==""){$debut=0;} if(@$page==""){$page=0;} $debut=$page*$nb_membres_page; $testouille = mysql_query("SELECT * FROM ct2_os_actu WHERE id != '$idaneplusafficher' AND projet = '$numero' ") or die (mysql_error()); $nb_total=mysql_num_rows($testouille); $result = mysql_query("SELECT * FROM ct2_os_actu WHERE id != '$idaneplusafficher' AND projet = '$numero' ORDER BY id DESC LIMIT $debut,$nb_membres_page"); while ($row = mysql_fetch_array($result)) { echo "".utf8_encode(htmlspecialchars($row['titre'])).""; echo "

".bb_parse($row['texte'])."

"; echo "".$row['date']." @ ".$row['heure']." "; echo $row['auteur']; echo""; if (IsProjectAdmin()) { ?>






 

"; } echo "

 

"; if ($page>0) { $precedent=$page-1; echo "".CODINGTEAM_PROJETLIBRE_41." "; } $i=0; $j=1; if($nb_total>$nb_membres_page) { while($i<($nb_total/$nb_membres_page)) { if($i!=$page) { echo" $j "; } else { echo" $j "; } $i++;$j++; } } if($debut+$nb_membres_page<$nb_total) { $suivant=$page+1; echo " ".CODINGTEAM_PROJETLIBRE_42.""; } ?>