'.$line.'
';
} else {
/* <
\\1
>
\\2
', $line );
/* -+- foo bar */
$line = ereg_replace( "^-\+- ([^&]*)(.*)", '-
+-
\\1\\2
', $line );
/* -*- foo bar */
$line = ereg_replace( "^-\*- ([^&]*)(.*)", '-
*-
\\1\\2
', $line );
/* * foo bar */
$line = ereg_replace( "^\* ([^&]*)(.*)", '*
\\1
\\2
', $line );
$string .= $br.$line;
$br = "
|
vote: [ MegA-SuX0r | naze!!! | mouais | hahaha, lol | ROx0r dA W0rlD ] } $karma = get_karma($n); echo "karma ".(($karma[0]>0)?'+':'')."$karma[0] ($karma[1] vote".(($karma[1]!=1)?'s':'').")"; ?>
} /* Sanitize $q */ $top = 0; $n = ""; $q = $_GET['q']; if(ereg('^top[1-9][0-9]*.html$',$q)) { $top = ereg_replace('top([1-9][0-9]*)\.html','\1',$q); if($top > $count) $top = $count; } else if(ereg('^[0-9][0-9]*(-a|-b|-c|-d|-e)$',$q)) { $result = ereg_replace("[0-9]","",$q); $q = ereg_replace("[^0-9]","",$q); if($q >= 1 && $q <= $count) { $hostname = gethostbyaddr($_SERVER["REMOTE_ADDR"]); $fd = fopen("karma/$q","a"); fwrite($fd, $hostname.":".$result."\n"); fclose($fd); header("Location: http://".$_SERVER["HTTP_HOST"]."/random"); die(); } $q = ""; } else if(ereg("^[0-9][0-9]*$",$q)) { if($q >= 1 && $q <= $count) { $n = $q; $q = ""; } } else if ($q == "random.txt") { header("Content-Type: text/plain; charset=utf-8"); $n = get_random($count); $array=$fortune[$n]; for($i=0; $i[ home ] [ 1) { ?> first first | 1) { ?> prev prev | random | next next | last last ]
$tab[$j][1]) { $a = $tab[$j][0]; $b = $tab[$j][1]; $tab[$j][0] = $tab[$j + 1][0]; $tab[$j][1] = $tab[$j + 1][1]; $tab[$j + 1][0] = $a; $tab[$j + 1][1] = $b; } } } /* Top x */ for($i = 0; $i < $top; $i++) { $j = $tab[$i][0]; echo "invalid regexp
"; } else { $found = 0; $lastfound = 0; for($i = 0; $i < $count; $i++) { for($j = 0; $j < count($fortune[$i]); $j++) { if(eregi($q, $fortune[$i][$j])){ echo "no matches found
"; } else if ($found == 1) { print_karma($lastfound); } } } ?>