Code:
<html>
<body bgcolor="#FFFFFF" background="http://www.schmitter/telefonverzeichnis/hintergrund.gif">
<table border width="950" height="50">
<tr>
<th align="center" width="150" height="20"><FONT SIZE=4>Name</FONT></th>
<th align="center" width="100" height="20"><FONT SIZE=4>Vorname</FONT></th>
<th align="center" width="50" height="20"><FONT SIZE=4>DW</FONT></th>
<th align="center" width="100" height="20"><FONT SIZE=4>Mobil</FONT></th>
<th align="center" width="50" height="20"><FONT SIZE=4>Fax</FONT></th>
<th align="center" width="200" height="20"><FONT SIZE=4>interne E-Mail</FONT></th>
<th align="center" width="300" height="20"><FONT SIZE=4>externe E-Mail</FONT></th>
</tr>
</table>
<?php
error_reporting(53);
$Zaehler=0;
$fp = fopen("Daten.txt","r");
if ($fp)
{
while (!feof($fp))
{
$zeile = fgets($fp, 400);
$pos=0;
$var=0;
$var=strpos($zeile,";",$pos);
$var1=substr($zeile,$pos,$var-$pos);
$pos=strpos($zeile,";",$var+1);
$var2=substr($zeile,$var+1,$pos-$var-1);
$var=strpos($zeile,";",$pos+1);
$var3=substr($zeile,$pos+1,$var-$pos-1);
$pos=strpos($zeile,";",$var+1);
$var4=substr($zeile,$var+1,$pos-$var-1);
$var=strpos($zeile,";",$pos+1);
$var5=substr($zeile,$pos+1,$var-$pos-1);
$pos=strpos($zeile,";",$var+1);
$var6=substr($zeile,$var+1,$pos-$var-1);
$var=strpos($zeile,";",$pos+1);
$var7=substr($zeile,$pos+1,$var-$pos-1);
$pos=strpos($zeile,";",$var+1);
$var8=substr($zeile,$var+1,$pos-$var-1);
$var=strpos($zeile,";",$pos+1);
$var9=substr($zeile,$pos+1,$var-$pos-1);
if (!$z) $DS= array($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9);
if ($z) array_push($DS,$var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9);
$z++;
}}
for ($durchlauf=0; $durchlauf<=$z; $durchlauf++)
{
$a=0;$b=1;$c=2;$d=3;$e=4;$f=5;$g=6;$h=7;$i=8;
$a2=9; $b2=10; $c2=11; $d2=12; $e2=13; $f2=14; $g2=15; $h2=16; $i2=17;
for ($x=0; $x<=$z; $x++)
{
if (strcasecmp($DS[$a],$DS[$a2])<0)
{ }
else
{
$Zwischen1=$DS[$a];
$Zwischen2=$DS[$b];
$Zwischen3=$DS[$c];
$Zwischen4=$DS[$d];
$Zwischen5=$DS[$e];
$Zwischen6=$DS[$f];
$Zwischen7=$DS[$g];
$Zwischen8=$DS[$h];
$Zwischen9=$DS[$i];
$DS[$a]=$DS[$a2];
$DS[$b]=$DS[$b2];
$DS[$c]=$DS[$c2];
$DS[$d]=$DS[$d2];
$DS[$e]=$DS[$e2];
$DS[$f]=$DS[$f2];
$DS[$g]=$DS[$g2];
$DS[$h]=$DS[$h2];
$DS[$i]=$DS[$i2];
$DS[$a2]=$Zwischen1;
$DS[$b2]=$Zwischen2;
$DS[$c2]=$Zwischen3;
$DS[$d2]=$Zwischen4;
$DS[$e2]=$Zwischen5;
$DS[$f2]=$Zwischen6;
$DS[$g2]=$Zwischen7;
$DS[$h2]=$Zwischen8;
$DS[$i2]=$Zwischen9;
}
$a=$a+9;$b=$b+9;$c=$c+9;$d=$d+9;$e=$e+9;$f=$f+9;$g=$g+9;$h=$h+9;$i=$i+9;
$a2=$a2+9; $b2=$b2+9; $c2=$c2+9; $d2=$d2+9; $e2=$e2+9; $f2=$f2+9; $g2=$g2+9; $h2=$h2+9; $i2=$i2+9;
}}
$a=0;$b=1;$c=2;$d=3;$e=4;$f=5;$g=6;$h=7;$i=8;
$abc="Wert1";
$Zaehler=1;
$alphabet="A";
for ($x=0; $x<=$z; $x++)
{
$a2=$a-9;
$Vergleicher1=substr($DS[$a],0,1);
$Vergleicher2=substr($DS[$a2],0,1);
if ($Vergleicher1!=$Vergleicher2)
{
while ($alphabet!=$Vergleicher1)
{ $alphabet++; $Zaehler++; }
?> <FONT SIZE=6>
<table border width="950"> <?php
echo $alphabet;
?> </FONT> <?php
$abc="Wert".$Zaehler;
?>
<A NAME=<?php echo $abc; ?>></A>
<?php
}
if ($DS[$a]=="" && $DS[$b]=="" && $DS[$c]=="" && $DS[$d]=="" && $DS[$e]=="" && $DS[$f]=="" && $DS[$g]=="" && $DS[$h]=="" && ($DS[$i]=="SchmitterGroup.de" || $DS[$i]==""))
{}
else
{
?>
<tr>
</td>
<td align="center" width="150" height="10"><FONT SIZE=2><?php echo "$DS[$a]"?></FONT> </td>
<td align="center" width="100" height="10"><FONT SIZE=2><?php echo "$DS[$b]" ?></FONT> </td>
<td align="center" width="50" height="10"><FONT SIZE=2><?php echo "$DS[$c]" ?></FONT> </td>
<td align="center" width="100" height="10"><FONT SIZE=2><?php echo "$DS[$d]" ?></FONT> </td>
<td align="center" width="50" height="10"><FONT SIZE=2><?php echo "$DS[$e]" ?></FONT> </td>
<?php
if ($DS[$f]!="" && $DS[$f]!="-")
{ ?> <td align="center" width="200" height="10"><FONT SIZE=2><?php echo "$DS[$f] @ th.schmitter" ?></FONT> </td> <?php }
else { ?> <td align="center" width="200" height="10"><FONT SIZE=2><?php echo " - " ?></FONT> </td> <?php }
if ($DS[$g]!="" && $DS[$g]!="-")
{ if ($DS[$h]!="" && $DS[$h]!="-")
{ ?> <td align="center" width="300" height="10"><FONT SIZE=2>"><?php echo "$DS[$g] . $DS[$h] @ $DS[$i]" ?></FONT></td> <?php }
else
{ ?> <td align="center" width="300" height="10"><FONT SIZE=2><a href="mailto:<?php echo "$DS[$g]@$DS[$i]"?>"><?php echo "$DS[$g] @ $DS[$i]" ?></FONT></td>
<?php }}
if ($DS[$g]=="" || $DS[$g]=="-")
{ if ($DS[$h]!="" && $DS[$h]!="-")
{ ?> <td align="center" width="300" height="10"><FONT SIZE=2>"><?php echo "$DS[$h] @ $DS[$i]" ?></FONT></td> <?php }
else
{ ?> <td align="center" width="300" height="10"><FONT SIZE=2><?php echo " - " ?></FONT></td>
<?php }} ?>
</tr>
<?php
}
$a=$a+9;$b=$b+9;$c=$c+9;$d=$d+9;$e=$e+9;$f=$f+9;$g=$g+9;$h=$h+9;$i=$i+9;
}
?>
</table>
<form action = "geheim.php" method = "post">
<input type="password" name="password">
<input type ="submit" value="Telefonliste bearbeiten">
</form>
</html>
?>[/php]