Tutorials Infos - Anleitungen - Hilfe - Dreamcodes
 

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("<","&lt;",$newtext);
               $newtext = str_replace(">","&gt;",$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>

 
ID: 277
eingestellt am: 25.02.2004
Autor: The Doom
Status zum lesen: Gast
gelesen: 9085
Webseite: www.dreamcodes.com
[Drucken]