Text Ticker
Ein Text Ticker mit Adminsteuerung
|
Script: |
<body bgcolor="#000000" text="#FFFFFF">
<?php
echo "<marquee>";
include("text.txt");
echo "</marquee>";
if($do == "admin") { ?>
Neuer Text:
<form name="form1" method="post" action="index.php?do=save">
<input name="newtext" type="text" id="newtext">
<input type="submit" name="Submit" value="OKAY!">
</form>
<?php } elseif($do == "save") {
$newtext = str_replace("<","<",$newtext);
$newtext = str_replace(">",">",$newtext);
$newtext = str_replace(""","'",$newtext);
$newtext = str_replace("\","",$newtext);
$fp = fopen("text.txt","w");
fwrite($fp,$newtext);
rewind($fp);
fclose($fp);
echo "OK! <br>";
} elseif($do == "clear") {
$fp = fopen("text.txt","w");
fwrite($fp,"");
rewind($fp);
fclose($fp);
echo "OK! <br>";
}
echo "<a href=index.php?do=admin>Admin</a>";
echo " | ";
echo "<a href=index.php?do=clear>Laufschrift loeschen</a>";
?>
</body>
|
|