prepare("SELECT * FROM `forum_topic` WHERE id_topic=?"); $stmt->bindValue(1,$id_topic, PDO::PARAM_INT); $stmt->execute(); if($stmt->RowCount()==0) { header("HTTP/1.1 301 Moved Permanently"); header("Location: ".SITE_URL."/".LANG_TEXT."/news/1"); exit(); } $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); extract($rows[0]); $page = $_SERVER['REQUEST_URI']; $pattern = '/read_news-band-(.+)-id-(.+)-l-(en|fr|de|es|pl|ru|pt|cn)/'; $pattern2 = '/read_news-groupe-(.+)-id-(.+)-l-(en|fr|de|es|pl|ru|pt|cn)/'; if(preg_match($pattern, $page, $matches) || preg_match($pattern2, $page, $matches)) { header("HTTP/1.1 301 Moved Permanently"); header("Location: ".lien_news($id_topic,$nom_topic)); } else if(empty($_SERVER['HTTPS'])) { header("HTTP/1.1 301 Moved Permanently"); header("Location: ".SITE_URL.$_SERVER['REQUEST_URI']); } if($stmt->RowCount()==1) { // $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); // extract($rows[0]); if(LANG=="fr") define("CURRENT_PAGE",set_current_page_seo("news",array("groupe"=>clean($nom_topic,true),"id"=>$id_topic),$_GET['l'])); else define("CURRENT_PAGE",set_current_page_seo("news",array("band"=>clean($nom_topic,true),"id"=>$id_topic),$_GET['l'])); $TheNewsIsFound=true; } else define("CURRENT_PAGE",set_current_page_seo("",null,$_GET['l'])); echo " $nom_topic - ".SITE_NAME." webzine "; include("styleNEW.htm"); ?>
'; $req = "SELECT * FROM style WHERE main=1"; $res = mysqli_query($GLOBALS['iconnexion'],$req); while($ligne = mysqli_fetch_array($res)) $txt_TagStyle['s'.$ligne['IDSTYLE']]=display($ligne["nom_fr"],$ligne["nom_en"]); $AllNewsTags = @array_merge( $TabFest,$txt_TagStyle,$txt_Tagnews); if($TheNewsIsFound) { echo '
'; if($_SESSION['login']==$auteur_topic || est_cercle1($_SESSION['login'])) echo "
"; echo '

'.$nom_topic.'

'; // cadre(1,"NEWS"); // echo "
"; $rq="SELECT M.*,T.forum FROM forum_message M INNER JOIN forum_topic T ON M.id_topic=T.id_topic WHERE M.id_topic='$id_topic' ORDER BY date_message LIMIT 1"; $res=mysqli_query($GLOBALS['iconnexion'],$rq); $total=mysqli_num_rows($res); if($ligne=mysqli_fetch_array($res)) { extract($ligne); if($forum!="g0" && $forum!="g") { $id_groupe=trim($forum,"g"); $groupe=new groupe($id_groupe); $pic="get_min_pics()."\" width=150 STYLE=\"border: 1px outset #CC8E1C\" align=left>"; } else $pic=""; // echo "
"; echo "".date_v1($date_message)." ".display("par ","by ").$auteur_topic."
"; $message=str_replace("$2$4', $message); // echo "
$pic
".stripslashes($message)."

"; //OLD echo "
".stripslashes($message)."

"; $rq2="SELECT id_tag FROM forum_topic_tags WHERE id_topic=$id_topic"; $res2=mysqli_query($GLOBALS['iconnexion'],$rq2); if(mysqli_num_rows($res2)) { while($ligne2=mysqli_fetch_array($res2)) { if($ligne2['id_tag']!="null") { if(preg_match('/^g/',$ligne2['id_tag'])) { $groupe = new groupe(str_replace('g','',$ligne2['id_tag'])); $FinalTagList[]='#'.$groupe->nom_groupe.''; } else { if($AllNewsTags[$ligne2['id_tag']]) $FinalTagList[]='#'.$AllNewsTags[$ligne2['id_tag']].''; } } } if($FinalTagList) echo "
Tags : ".implode(" ",$FinalTagList)."
"; } // if( (LANG!=LANG_TEXT) && !isset($_GET['translate'])) // echo ''; } echo '
'; /// $i=1; $rq=""; $stmt = $db_PDO->prepare("SELECT * FROM forum_message F INNER JOIN membres M ON M.pseudo=F.auteur_message WHERE id_topic=? ORDER BY date_message LIMIT 1, 12 "); $stmt->bindValue(1, $id_topic, PDO::PARAM_INT); $stmt->execute(); $total=$stmt->RowCount(); if($total>1) $pluriel="s"; // if($total>0) echo '

'.$common['comments'].'

'; // echo '
//

'.$common['comments'].'

//
'; // echo '

'.$total.' '.display("commentaire$pluriel","Comment$pluriel")."

"; $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach($rows as $ligne) { extract($ligne); // echo " //
"; $message=str_replace("[QUOTE]","
citation :
",$message); $message=str_replace("[/QUOTE]","
",$message); $membre = new membreLgn($ligne); echo "
"; if($avatar) echo "lien>"; else echo " "; echo "
lien>$auteur_message - ".date_v2($date_message)."
".stripslashes($message)."
"; $i++; if($i>10) break; } if($total==0) echo $txt_main[4].'
'; // if($total>0) echo ' '.$txt_main[6].' '; if($total>10) echo "".$common['SeeMore'].""; echo ''; // cadre(); } echo ' '; include("footer.php"); ?>