", $text); $text = str_replace("[b]", "", $text); $text = str_replace("[/b]", "", $text); $text = str_replace("[i]", "", $text); $text = str_replace("[/i]", "", $text); $text = str_replace("[u]", "", $text); $text = str_replace("[/u]", "", $text); $text = str_replace("[url]", "", $text); $text = str_replace("[/url]", "", $text); $text = str_replace("[mail]", "", $text); $text = str_replace("[/mail]", "", $text); $text = str_replace("[img]", "", $text); $text = str_replace(":D", "", $text); $text = str_replace(":(", "", $text); $text = str_replace("?(", "", $text); $text = str_replace("8)", "", $text); $text = str_replace("8o", "", $text); $text = str_replace("X(", "", $text); $text = str_replace(":)", "", $text); $text = str_replace(":P", "", $text); $text = str_replace(";)", "", $text); } ?> \n\n"; echo "$titel\n"; echo "\n"; echo "\n\n"; echo "\n"; if($_GET['page'] == "" || $_GET['page'] == "news") { echo "
\n"; echo "News schreiben\n"; echo "

\n"; echo "\n"; $datei = file("news"); $anzahl = sizeof($datei); if($anzahl == 0) echo ""; $pages = ceil($anzahl / $pro); if($show == "") $show = 1; $start = $show * $pro - $pro; $end = $start + $pro; if($end >= $anzahl) $end = $anzahl; for ($i = $start; $i < $end ; $i++) { $eintraege = explode ("|@|", $datei[$i]); echo "\n"; echo "\n"; echo "\n"; } echo "
Keine News vorhanden
$eintraege[3]$eintraege[0]
\n"; if($eintraege[2] == "") echo "Autor: $eintraege[1]"; else echo "Autor: $eintraege[1]"; echo "
$eintraege[4]
"; if($comment) { $comments = file("comments/$eintraege[5].dat"); echo "".count($comments); if(count($comments) == 1) echo " Kommentar"; else echo " Kommentare"; echo ""; } echo "\"News \"News
\n"; if($i < $anzahl-1) echo "
 
\n"; echo "
\n"; if($pages > 1) { echo "
\n"; echo "Seite: \n"; for($x = 1; $x <= $pages; $x++) { if($x == $show) echo "$x "; else echo "$x "; } echo "
\n"; echo "

\n"; } echo "
\n"; echo "STaBO NEWS
(C) 2008 by STaBO Full Internetservices GbR\n"; echo "
\n"; } if($_GET['page'] == "edit") { echo "\n"; $datei = file("news"); $eintraege = explode ("|@|", $datei[$_GET['nr']]); echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Datum:
Name*:
E-Mail:
Titel*:
Text*:

\n"; echo "BB-Code: Fett Kursiv Unterstrichen Link E-Mail Bild

\n"; echo "Smilies:

\n"; echo "
Passwort*:\n"; echo "
\n"; echo "
\n"; echo "
Zurück
\n"; if($_POST) { if($_POST['password'] == $passwort) { $text = $_POST['text']; $text = str_replace('\"', '"', $text); replace(); $datei = file("news"); $in = $_POST['date']."|@|".$_POST['name']."|@|".$_POST['mail']."|@|".$_POST['title']."|@|".$text."|@|".$_POST['comments']."|@|\n"; for($x = 0; $x < count($datei); $x++) { if($x == $nr) $input .= $in; else $input .= $datei[$x]; } $datei = "news"; $fp = fopen($datei, "w+"); fputs($fp, $input); fclose($fp); echo ""; } else echo ""; } } if($_GET['page'] == "delete") { echo "\n"; $datei = file("news"); $eintraege = explode ("|@|", $datei[$_GET['nr']]); echo "\n"; echo ""; echo "

News \"$eintraege[3]\" vom $eintraege[0] wirklich löschen?

Passwort:   \n"; echo "
\n"; echo "
\n"; echo "
Zurück
\n"; if($_POST) { if($_POST['password'] == $passwort) { $datei = file("news"); for($x = 0; $x < count($datei); $x++) { if($x == $nr) $input .= ""; else $input .= $datei[$x]; } $datei = "news"; $fp = fopen($datei, "w+"); fputs($fp, $input); fclose($fp); echo ""; } else echo ""; } } if($_GET['page'] == "addnews") { echo "\n"; echo "\n"; $date = date("d.m.Y - H:i"); echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Datum:$date
Name*:
E-Mail:
Titel*:
Text*:

\n"; echo "BB-Code: Fett Kursiv Unterstrichen Link E-Mail Bild

\n"; echo "Smilies:

\n"; echo "
Passwort*:
\n"; echo "
\n"; echo "
Zurück
\n"; if($_POST) { if($_POST['password'] == $passwort) { $text = $_POST['text']; replace(); $datei = "news"; $comments = time(); $com = fopen("./comments/$comments.dat", "w+"); fclose($com); $input = $date."|@|".$_POST['name']."|@|".$_POST['mail']."|@|".$_POST['title']."|@|".$text."|@|".$comments."|@|\n"; $fp = fopen($datei, "r"); while(!feof($fp)) { $eintraege = fgets($fp, 1000); $input .= $eintraege; } fclose($fp); $fp = fopen($datei, "w+"); fputs($fp, $input); fclose($fp); echo ""; } else echo ""; } } if($_GET['page'] == "comments" && $comment) { echo "\n"; $datei = file("comments/".$_GET['com'].".dat"); $anzahl = sizeof($datei); if($anzahl == 0) echo ""; for ($i = 0; $i < $anzahl ; $i++) { $eintraege = explode ("|@|", $datei[$i]); echo "\n"; } echo "
Keine Kommentare vorhanden
$eintraege[0]:$eintraege[1]


\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Name:
Kommentar:

\n"; echo "BB-Code: Fett Kursiv Unterstrichen Link E-Mail Bild

\n"; echo "Smilies:

\n"; echo "
\n"; echo "\n"; echo "
\n"; echo "
Fenster schließen
\n"; if($_POST) { $text = $_POST['text']; replace(); $input = $_POST['name']."|@|".$text."|@|\n"; $fp = fopen("comments/".$_POST['com'].".dat", "r"); while(!feof($fp)) { $eintraege = fgets($fp, 1000); $input .= $eintraege; } fclose($fp); $fp = fopen("comments/".$_POST['com'].".dat", "w+"); fputs($fp, $input); fclose($fp); echo ""; } } echo "\n"; ?>