PasteSite is open to the public, but with limited features. Register to be able to modify access rights, track your pastes and more...
If you prefer reading light text on a dark background to dark text on a light background, then you might want to try the dark theme.
"Untitled" by Anonymous [PHP]Actions:
Replies: |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
<table cellpadding="0" cellspacing="5"> <tr> <!--Recent Headlines--> <td> recentnews(1); </td> </tr> <tr> <td> recentnews(2); </td> </tr> <tr> <td> recentnews(3); </td> </tr> <tr> <td> recentnews(4); </td> </tr> <tr> <td> recentnews(5); </td> </tr> <tr> <td> recentnews(6); </td> </tr> </table> function recentnews($row){ $news = fopen("data/news.txt","r") or exit("Unable to open file"); $newscount = 0; while (!feof($news)) { $line = fgets($news); $strongpos = strpos($line, "</strong>"); $boldpos = strpos($line,"<strong>"); if ($strongpos){ $header[$newscount] = substr($line, $boldpos, $strongpos + 9); $newscount++; } } fclose("data/news.txt"); switch ($row) { case 1: echo ("<a href='info.php#news" . ($newscount). "'>". $header[0]. "</a>"); break; case 2: echo ("<a href='info.php#news" . ($newscount - 1) . "'>". $header[1]. "</a>"); break; case 3: echo ("<a href='info.php#news" . ($newscount - 2) . "'>". $header[2]. "</a>"); break; case 4: echo ("<a href='info.php#news" . ($newscount-3) . "'>". $header[3]. "</a>"); break; case 5: echo ("<a href='info.php#news" . ($newscount-4) . "'>". $header[4]. "</a>"); break; case 6: echo ("<a href='info.php#news" . ($newscount-5) . "'>". $header[5]. "</a>"); break; default: break; } } |