Hi@all
Ich will das der Anfang und nicht das Ende der TXTDB vom Script ausgegeben werden wie mache ich das ?? Wenn es geht postet gleich das veränderte script :
Hier ist es:
<?php
if($counter == 1){$cmtext = "Kommentar";} else {$cmtext = "Kommentare";}
include("style.dat");
$pw = ("123456");
if($passwort)
{
if ($passwort == $pw)
{
$message = "<center>
<font face=\"Verdana, Arial, sans-serif\" size=\"2\">News wurden hinzugefügt!</font></center>";
}
else
{ echo "<center>
<font face=Verdana, Arial, Helvetica, sans-serif><font size=2>Falsches Passwort!
<br><br><a href=\"posten.php\">back</a></font></font></center>";
}
}
else { $message = "<center><font face=\"Verdana, Arial, sans-serif\" size=\"2\">
Bitte füllen Sie alle Felder aus!<br><br><a href=\"posten.php\">
zurück zur Newseingabe</a></font></center>"; }
echo $message;
setlocale("LC_TIME", "ge");
$date = strftime("%H:%M am %d.%m.%Y", time());
$infos[3] = htmlentities($infos[3]);
function Do_ubb ($string)
{
$string = str_replace(chr(13),"<br>",$string);
$string = str_replace("","<b>",$string);
$string = str_replace("","</b>",$string);
$string = str_replace("","<i>",$string);
$string = str_replace("","</i>",$string);
$string = eregi_replace("\\[url=([^\\[]*)\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=\"_blank\">\\2</a>",$string);
$string = eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=\"_blank\">\\1</a>",$string);
$string = eregi_replace("\\[icq=([^\\[]*)\\]([^\\[]*)\\[/icq\\]","<a href=\"http://wwp.icq.com/scripts/Search.dll?to=\\1\">\\2</a>",$string);
$string = eregi_replace("\\[icq\\]([^\\[]*)\\[/icq\\]","<a href=\"http://wwp.icq.com/scripts/Search.dll?to=\\1\">\\1</a>",$string);
$string = eregi_replace("\\[colour=([^\\[]*)\\]([^\\[]*)\\[/colour\\]","<font color=\\1>\\2</font>",$string);
$string = eregi_replace("\\[email=([^\\[]*)\\]([^\\[]*)\\[/email\\]","<a href=\"mailto:\\1\">\\2</a>",$string);
$string = eregi_replace("\\[img]([^\\[]*)\\[/img]","<img src=\"\\1\" border=0>",$string);
$string = str_replace("
","»</blockquote>",$string);
//smilies
$string = str_replace(":alien:","<img src='images/alien.gif' border='0'>",$string);
$string = str_replace("","<img src='images/angry.gif' border='0'>",$string);
$string = str_replace("","<img src='images/cool.gif' border='0'>",$string);
$string = str_replace(":!:","<img src='images/rufez.gif' border='0'>",$string);
$string = str_replace("","<img src='images/biggrin.gif' border='0'>",$string);
$string = str_replace(":blah:","<img src='images/blah.gif' border='0'>",$string);
$string = str_replace(":???:","<img src='images/confused.gif' border='0'>",$string);
$string = str_replace("","<img src='images/cool.gif' border='0'>",$string);
$string = str_replace(":flen:","<img src='images/cry.gif' border='0'>",$string);
$string = str_replace("","<img src='images/eek.gif' border='0'>",$string);
$string = str_replace(":help:","<img src='images/frage.gif' border='0'>",$string);
$string = str_replace("","<img src='images/frown.gif' border='0'>",$string);
$string = str_replace(":lach:","<img src='images/hehe.gif' border='0'>",$string);
$string = str_replace(":king:","<img src='images/king.gif' border='0'>",$string);
$string = str_replace(":lol:","<img src='images/lol.gif' border='0'>",$string);
$string = str_replace("","<img src='images/mad.gif' border='0'>",$string);
$string = str_replace(":böse:","<img src='images/pissed.gif' border='0'>",$string);
$string = str_replace("","<img src='images/redface.gif' border='0'>",$string);
$string = str_replace(":eye:","<img src='images/rolleyes.gif' border='0'>",$string);
$string = str_replace("","<img src='images/smiley.gif' border='0'>",$string);
$string = str_replace(":P","<img src='images/tongue.gif' border='0'>",$string);
$string = str_replace("","<img src='images/wink.gif' border='0'>",$string);
return $string;
}
if($submit)
{
//Größte ID ermitteln
$highestid = 0;
$fp = fopen("datenbank.dat", "r");
while(!feof($fp))
{
$line = explode("[::--::]", fgets($fp, 4048));
if($line[0] > $highestid)
{
$highestid = $line[0];
}
}
fclose($fp);
//Neuen eintrag anfügen
$fp = fopen("datenbank.dat", "a");
$id = $highestid + 1;
$tempstring = "\n".$infos[0]."[::--::]" . $infos[1] . "[::--::]" . $infos[2] . "[::--::]" . $infos[3] . "[::--::]" . $id;
fputs($fp, $tempstring);
fclose($fp);
}
$infos[3] = do_ubb($infos[3]);
function zufall ($laenge)
{
$abc = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9";
$abcarray = explode(",",$abc);
mt_srand((double)microtime()*1000000);
$daspasswort = "";
for ($i=1;$i<=$laenge;$i++)
{
$zufall = mt_rand(0,35);
$daspasswort .= $abcarray[$zufall];
}
return $daspasswort;
}
$nichtda = "false";
while($nichtda == "false")
{
$zufallsstring = zufall(10);
if(!file_exists("kommentar_".$zufallsstring.".txt"))
{
$nichtda = "true";
}
}
echo"$css
<table width=\"90%\" border=\"$border\" cellspacing=\"$cs\" cellpadding=\"$cp\" bgcolor=\"$bgta\">
<tr>
<td bgcolor=\"$bgta\" width=\"88%\">
<table width=\"100%\" border=\"$border\" cellspacing=\"$cs\" cellpadding=\"$cp\" bgcolor=\"$bgta\">
<tr>
<td bgcolor=\"$titelbg\" width=\"100%\">
<font face=\"$titelface\" size=\"$titelsize\" color=\"$titelfc\"><b>$infos[2]
</b></font><font face=\"$titelface\" size=\"$titelsize\" color=\"$titelfc\">
<br>Geschrieben von <a href=\"mailto:$infos[1]\">$infos[0]</a> um $date </font></td>
</tr>
<tr>
<td bgcolor=\"$textbg\" colspan=\"$cols\">
<font face=\"$textfont\" size=\"$textsize\" color=\"$textfc\">
$infos[3]</font></td>
</tr>
<tr>
<td bgcolor=\"$kombg\" colspan=\"$cols\">
<font face=\"$komface\" size=\"$komsize\" color=\"$komfc\">
( <a href=\"comments.php?$zufallsstring\" target=\"_blank\">$counter $cmtext</a> | ACS News Script Powerd by
<a href=\"http://www.anime-networx.de\" target=_blank>Anime-NetworX.de</a>
written by Pichu )</font></td>
</tr>
</table>
</td>
</tr>
</table><br>
<center><br><font face='Arial' size='1'>
powered by <a href='http://www.anime-networx.de/' target='_blank'>
<font size='1'>AnimeCommunitySystem </font></a><br>© 2002 by Pichu , Dennis, Raichu(Exi) & Tyalis
</font><br></center>
<br>";
?>
PS: Danke schonma im VOrraus und tut mir leid aba das script wird nicht 1a dargestellt sorry
Ich will das der Anfang und nicht das Ende der TXTDB vom Script ausgegeben werden wie mache ich das ?? Wenn es geht postet gleich das veränderte script :
Hier ist es:
<?php
if($counter == 1){$cmtext = "Kommentar";} else {$cmtext = "Kommentare";}
include("style.dat");
$pw = ("123456");
if($passwort)
{
if ($passwort == $pw)
{
$message = "<center>
<font face=\"Verdana, Arial, sans-serif\" size=\"2\">News wurden hinzugefügt!</font></center>";
}
else
{ echo "<center>
<font face=Verdana, Arial, Helvetica, sans-serif><font size=2>Falsches Passwort!
<br><br><a href=\"posten.php\">back</a></font></font></center>";
}
}
else { $message = "<center><font face=\"Verdana, Arial, sans-serif\" size=\"2\">
Bitte füllen Sie alle Felder aus!<br><br><a href=\"posten.php\">
zurück zur Newseingabe</a></font></center>"; }
echo $message;
setlocale("LC_TIME", "ge");
$date = strftime("%H:%M am %d.%m.%Y", time());
$infos[3] = htmlentities($infos[3]);
function Do_ubb ($string)
{
$string = str_replace(chr(13),"<br>",$string);
$string = str_replace("","<b>",$string);
$string = str_replace("","</b>",$string);
$string = str_replace("","<i>",$string);
$string = str_replace("","</i>",$string);
$string = eregi_replace("\\[url=([^\\[]*)\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=\"_blank\">\\2</a>",$string);
$string = eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=\"_blank\">\\1</a>",$string);
$string = eregi_replace("\\[icq=([^\\[]*)\\]([^\\[]*)\\[/icq\\]","<a href=\"http://wwp.icq.com/scripts/Search.dll?to=\\1\">\\2</a>",$string);
$string = eregi_replace("\\[icq\\]([^\\[]*)\\[/icq\\]","<a href=\"http://wwp.icq.com/scripts/Search.dll?to=\\1\">\\1</a>",$string);
$string = eregi_replace("\\[colour=([^\\[]*)\\]([^\\[]*)\\[/colour\\]","<font color=\\1>\\2</font>",$string);
$string = eregi_replace("\\[email=([^\\[]*)\\]([^\\[]*)\\[/email\\]","<a href=\"mailto:\\1\">\\2</a>",$string);
$string = eregi_replace("\\[img]([^\\[]*)\\[/img]","<img src=\"\\1\" border=0>",$string);
$string = str_replace("
","<blockquote>«",$string);
$string = str_replace("
$string = str_replace("
//smilies
$string = str_replace(":alien:","<img src='images/alien.gif' border='0'>",$string);
$string = str_replace("","<img src='images/angry.gif' border='0'>",$string);
$string = str_replace("","<img src='images/cool.gif' border='0'>",$string);
$string = str_replace(":!:","<img src='images/rufez.gif' border='0'>",$string);
$string = str_replace("","<img src='images/biggrin.gif' border='0'>",$string);
$string = str_replace(":blah:","<img src='images/blah.gif' border='0'>",$string);
$string = str_replace(":???:","<img src='images/confused.gif' border='0'>",$string);
$string = str_replace("","<img src='images/cool.gif' border='0'>",$string);
$string = str_replace(":flen:","<img src='images/cry.gif' border='0'>",$string);
$string = str_replace("","<img src='images/eek.gif' border='0'>",$string);
$string = str_replace(":help:","<img src='images/frage.gif' border='0'>",$string);
$string = str_replace("","<img src='images/frown.gif' border='0'>",$string);
$string = str_replace(":lach:","<img src='images/hehe.gif' border='0'>",$string);
$string = str_replace(":king:","<img src='images/king.gif' border='0'>",$string);
$string = str_replace(":lol:","<img src='images/lol.gif' border='0'>",$string);
$string = str_replace("","<img src='images/mad.gif' border='0'>",$string);
$string = str_replace(":böse:","<img src='images/pissed.gif' border='0'>",$string);
$string = str_replace("","<img src='images/redface.gif' border='0'>",$string);
$string = str_replace(":eye:","<img src='images/rolleyes.gif' border='0'>",$string);
$string = str_replace("","<img src='images/smiley.gif' border='0'>",$string);
$string = str_replace(":P","<img src='images/tongue.gif' border='0'>",$string);
$string = str_replace("","<img src='images/wink.gif' border='0'>",$string);
return $string;
}
if($submit)
{
//Größte ID ermitteln
$highestid = 0;
$fp = fopen("datenbank.dat", "r");
while(!feof($fp))
{
$line = explode("[::--::]", fgets($fp, 4048));
if($line[0] > $highestid)
{
$highestid = $line[0];
}
}
fclose($fp);
//Neuen eintrag anfügen
$fp = fopen("datenbank.dat", "a");
$id = $highestid + 1;
$tempstring = "\n".$infos[0]."[::--::]" . $infos[1] . "[::--::]" . $infos[2] . "[::--::]" . $infos[3] . "[::--::]" . $id;
fputs($fp, $tempstring);
fclose($fp);
}
$infos[3] = do_ubb($infos[3]);
function zufall ($laenge)
{
$abc = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9";
$abcarray = explode(",",$abc);
mt_srand((double)microtime()*1000000);
$daspasswort = "";
for ($i=1;$i<=$laenge;$i++)
{
$zufall = mt_rand(0,35);
$daspasswort .= $abcarray[$zufall];
}
return $daspasswort;
}
$nichtda = "false";
while($nichtda == "false")
{
$zufallsstring = zufall(10);
if(!file_exists("kommentar_".$zufallsstring.".txt"))
{
$nichtda = "true";
}
}
echo"$css
<table width=\"90%\" border=\"$border\" cellspacing=\"$cs\" cellpadding=\"$cp\" bgcolor=\"$bgta\">
<tr>
<td bgcolor=\"$bgta\" width=\"88%\">
<table width=\"100%\" border=\"$border\" cellspacing=\"$cs\" cellpadding=\"$cp\" bgcolor=\"$bgta\">
<tr>
<td bgcolor=\"$titelbg\" width=\"100%\">
<font face=\"$titelface\" size=\"$titelsize\" color=\"$titelfc\"><b>$infos[2]
</b></font><font face=\"$titelface\" size=\"$titelsize\" color=\"$titelfc\">
<br>Geschrieben von <a href=\"mailto:$infos[1]\">$infos[0]</a> um $date </font></td>
</tr>
<tr>
<td bgcolor=\"$textbg\" colspan=\"$cols\">
<font face=\"$textfont\" size=\"$textsize\" color=\"$textfc\">
$infos[3]</font></td>
</tr>
<tr>
<td bgcolor=\"$kombg\" colspan=\"$cols\">
<font face=\"$komface\" size=\"$komsize\" color=\"$komfc\">
( <a href=\"comments.php?$zufallsstring\" target=\"_blank\">$counter $cmtext</a> | ACS News Script Powerd by
<a href=\"http://www.anime-networx.de\" target=_blank>Anime-NetworX.de</a>
written by Pichu )</font></td>
</tr>
</table>
</td>
</tr>
</table><br>
<center><br><font face='Arial' size='1'>
powered by <a href='http://www.anime-networx.de/' target='_blank'>
<font size='1'>AnimeCommunitySystem </font></a><br>© 2002 by Pichu , Dennis, Raichu(Exi) & Tyalis
</font><br></center>
<br>";
?>
PS: Danke schonma im VOrraus und tut mir leid aba das script wird nicht 1a dargestellt sorry
Kommentar