<php> function get_num() { $num = 0; $file = «forum/$num/not.txt»; while (file_exists($file)) { ++$num; $file = «forum/$num/not.txt»; } return $num; } function get_seed() { $f = «forum/seed.txt»; $seed = file_get_contents($f); ++$seed; unlink($f); $fp = fopen($f, 'w'); fwrite($fp, $seed); fclose($fp); return $seed; } echo '<div align=«center»><table width=«90%» border=«0» align=«center»>'; $not=get_num(); $bg[0]=«#FF0000»; $bg[1]=«#000000»; $bg[2]=«#FFFFFF»; $tit[0]=«#000000»; $tit[1]=«#FFFFFF»; $tit[2]=«#FF0000»; $aut[0]=«#FFFFFF»; $aut[1]=«#FF0000»; $aut[2]=«#000000»; for ($i=0; $i<$not; ++$i) {

      srand(get_seed());
$file = "forum/$i/not.txt";
$text = file_get_contents($file);
$dades = explode("$",$text);
echo '<tr><td bgcolor="'.$bg[$i%3].'"><a href="doku.php?id=post'.$i.'"><p style="color:'.$tit[$i%3].';margin-left:10px; margin-top:10px;font-size:14px">'.$dades[1].'</p><p align="right" style="color:'.$aut[$i%3].'; margin-right:10px;font-size:14px">'.$dades[0].'</p></a></td></tr>';

} echo '<tr><td bgcolor=«#FFFFFF» style=«font-size:16px»><br><a href=«doku.php?id=nou_genere»>Envia el teu post</a></td></tr></table></div>'; </php>

forum.txt · Darrera modificació: d/m/Y H:i per 127.0.0.1
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0