Location: PHPKode > projects > Twisty Forum > twisty-forum/forum/sujets.php
<?php 
session_start();
include('coords.inc.php');

ini_set('arg_separator.output','&amp;'); 
ini_set('url_rewriter.tags','get=fakeentry'); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Twisty Forum - Les Sujets</title>
<link rel="StyleSheet" type="text/css" href="index.css" />
</head>
<body>
<?php
include ('haut.inc');
if(empty($_SESSION['nom'])){
include ('fconnect.inc');}
else{
include ('fdeco.inc');};

$nom=$_SESSION['nom'];
$ind=$_GET['ind'];
$tit=mysql_query("select f, titre,ftitre from ftitre where id='$ind'");
$tit2=mysql_fetch_array($tit);
if($tit2[0]==""){
echo '<p style="clear:left"><span>Ce topic n\'existe pas.</span></p>';};
?>
<div style="clear:left;font-weight:bold;text-align:left">
<a class="accueil" href="index.php?f=<?php echo $tit2[0] ;?>"><?php echo $tit2[2] ;?></a>
 :::::: <a class="chat" href="sujets.php?ind=<?php echo $ind ;?>"><?php echo $tit2[1] ;?></a>
</div>
<p>
<?
$b=0;
$list1=mysql_query("select id from fmess where ind='$ind'");
$total=mysql_num_rows($list1);
if(empty($_GET['page'])){
if(empty($_GET['id'])){
$page = 0;
$list2=mysql_query("select id from fmess where ind='$ind'");
}
else{
$id=$_GET['id'];
$list2=mysql_query("select id from fmess where ind='$ind' && id < '$id'");
$total2=mysql_num_rows($list2);
$page=floor($total2 / $finm) * $finm;
};
};
if(!empty($_GET['page'])){
$page=$_GET['page'];
};

$apres=$page+$finm;
$avant=$page-$finm;

$mess=mysql_query("select auteur,texte,temps2,id from fmess where ind='$ind' order by id LIMIT $page,$finm")or die("zut..."); 
if($page>0){echo '<a href="'.$PHP_SELF.'?ind='.$ind.'&amp;page='.$avant.'">précédente</a> - ';};
if($total>$apres){echo '<a href="'.$PHP_SELF.'?ind='.$ind.'&amp;page='.$apres.'">suivante</a>';};
echo "<br />";
if($total>$finm)for($i=0;$i<$total;$i+=$finm){$b++;echo '<a href="'.$PHP_SELF.'?ind='.$ind.'&amp;page='.$i.'">'.$b.' - </a>';
};
?>
</p>
<hr />

<div style="text-align:center">
<table class="gen">
<tr style="background-color:yellow;text-align:center"><td style="width:80%;border-bottom:solid 2px">Messages</td><td style="border-bottom:solid 2px">Auteurs</td></tr>
<?
while ($mess2=mysql_fetch_array($mess)){
$user=mysql_query("select logo,mail,site,pub from fusers where nom='$mess2[0]'");
$user2=mysql_fetch_array($user);

echo '<tr><td  class="prem"><a name="'.$mess2[3].'"></a>'.$mess2[1].'</td>'."\n".'<td style="vertical-align:top" class="deux" >'.$mess2[2].'<hr style="color:black" />'.$mess2[0].'<hr style="color:black" />';
if($user2[0]!=''){
echo '<img src="'.$racinelogo.$user2[0].'"  alt="qui?" /><hr style="color:black" />';}
else{
echo '<img src="'.$racinegif.'inconnue.gif"  alt="qui?" /><hr style="color:black" />';};
if($mess2[0]==$nom){
echo '<input type="button" class="bouton" value="éditer" onclick="location.href=\'edit.php?ind='.$ind.'&id='.$mess2[3].'&page='.$page.'\'"><hr style="color:black" />';};
if($user2[3]=='oui'){
echo '<a href="mailto:'.$user2[1].'"><img src="'.$racinegif.'mail.gif" style="vertical-align:baseline" alt="mail" /></a> ';}
else{
echo '<a href="mailto: adresse privée"><img src="'.$racinegif.'mail.gif" style="vertical-align:baseline" alt="mail" /></a> ';};
if(ereg('^http://',$user2[2])!=false){
echo ' <a href="'.$user2[2].'"><img src="'.$racinegif.'net.gif" style="vertical-align:baseline" alt="site" /></a>';}
else{
echo ' <a href="http://pasdesite.ici"><img src="'.$racinegif.'net.gif" style="vertical-align:baseline" alt="site"  /></a>';};
echo '</td></tr>'."\n";
};
?>
</table>
</div>

<hr />
<p>
<?
$c=0;
if($page>0){echo '<a href="'.$PHP_SELF.'?ind='.$ind.'&amp;page='.$avant.'">précédente</a> - ';};
if($total>$apres){echo '<a href="'.$PHP_SELF.'?ind='.$ind.'&amp;page='.$apres.'">suivante</a>';};
echo "<br />";
if($total>$finm)for($i=0;$i<$total;$i+=$finm){$c++;echo '<a href="'.$PHP_SELF.'?ind='.$ind.'&amp;page='.$i.'">'.$c.' - </a>';
};
?>
</p>

<?php
if(!empty($nom)&&($tit2[0]!="")){
$vu=mysql_query("select vu,id from fmess where ind='$ind' order by id limit 0,1");
$vu2=mysql_fetch_array($vu);
if(strstr($vu2[0],$nom.'*')==false){
$new=$nom.'*';
mysql_query("update fmess set vu='$vu2[0]$new' where ind='$ind' and id='$vu2[1]'");
};

include ('fmess.inc');};
?>

<p style="margin-top:50px;color:white;clear:left">
<a class="liensite" href="http://javatwist.imingo.net">© Javatwist 2002</a> - JavaTwisting people
</p>
</body>
</html>
Return current item: Twisty Forum