Ich hab angefangen ein Gästebuchscript zu programmieren. Den Links habe ich effekte mit Stylesheets zugewiesen. Alle Links funktionieren im Firefox. Im Internet Explorer funktionieren auch alle, bis auch einen, den Eintragen Link. Woran kann das liegen? Dern Link, der nicht funktioniert habe ich fett gemacht.
[/php]
PHP-Code:
<?php
if(!isset($_GET['benutzer'])){
die("kein Benutzername angegeben");
}
$benutzer=$_GET['benutzer'];
include("/srv/www/htdocs/web98/files/hpworld.inc.php");
$sql1="SELECT benutzername,farbe1,farbe2,textfarbe,linkfarbe,showentry FROM gb_properties WHERE benutzername='$benutzer'";
$query1=mysql_query($sql1);
$array1=mysql_fetch_array($query1);
$farbe1=$array1['farbe1'];
$farbe2=$array1['farbe2'];
$textfarbe=$array1['textfarbe'];
$linkfarbe=$array1['linkfarbe'];
$showentry=$array1['showentry'];
if(empty($array1['benutzername'])){
mysql_close();
die("Benutzer existiert nicht!");
}
$sql2="SELECT count(benutzername) AS gesamteintraege FROM gb_entries WHERE benutzername='$benutzer'";
$query2=mysql_query($sql2);
$array2=mysql_fetch_array($query2);
$anzahleintraege=$array2['gesamteintraege'];
mysql_error();
mysql_close();
?>
<style type="text/css">
a:link {
font-family: arial;
font-size: 8pt;
color : #336699;
text-decoration : none;
}
a:visited {
font-family: arial;
font-size: 8pt;
color : #336699;
text-decoration : none;
}
a:hover {
font-family: arial;
font-size: 8pt;
color : #336699;
text-decoration : underline overline;
}
a:active {
font-family: arial;
font-size: 8pt;
color : #336699;
text-decoration : none;
}
span.big{
font-family: arial;
font-size: 10pt;
color: <?php echo $textfarbe; ?>;
}
span.middle{
font-family: arial;
font-size: 9pt;
font-weight: bold;
color: <?php echo $textfarbe; ?>;
}
span.small{
font-family: arial;
font-size: 9pt;
color: <?php echo $textfarbe; ?>;
}
</style>
<span class="big">Es sind <?php if (empty($anzahleintraege)){ echo "0";} else{ echo $anzahleintraege;} ?> Einträge im Gästebuch</span>
[b][url="index.php?action=entry&benutzer=<?php echo $_GET['benutzer']; ?>"]Eintragen[/url][/b]
<?php
if(!empty($anzahleintraege)){
?>
<table style="position: absolute; left: 3%; width: 40%">
<?php
include("/srv/www/htdocs/web98/files/hpworld.inc.php");
$result = mysql_query("SELECT nummer,name,kommentar,email,www,icq,msn,datum,zeit FROM gb_entries WHERE benutzername='$benutzer' AND activated='yes'");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$nummer=$row[0];
$name=wordwrap($row[1], 25, "
\n");
$text=$row[2];
$email=wordwrap($row[3], 25, "
\n");
$www=wordwrap($row[4], 25, "
\n");
$icq=wordwrap($row[5], 25, "
\n");
$msn=wordwrap($row[6], 25, "
\n");
$datum=$row[7];
$zeit=$row[8];
?>
<tr>
<td valign="center" style="width: 35%; background-color: <?php echo $farbe1; ?>"><span style="font-family: arial; font-size: 9pt; color: #000000">Eintrag Nr.<?php echo $nummer; ?></span></td><td valign="center" style="background-color: <?php echo $farbe1; ?>"><span style="font-family: arial; font-size: 9pt; color: #000000">Kommentar</span></td>
</tr>
<tr>
<td valign="top" style="width: 35%; background-color: <?php echo $farbe2; ?>">
<span class="middle">Name:</span><span class="small"><?php echo $name; ?></span>
<?php if(!empty($email)){ ?>[img]mail.png[/img][email="<?php echo $email;?>"]<?php echo $email; ?>[/email]
<?php } if(!empty($www)){ ?>[img]home.png[/img][url="<?php echo $www; ?>"]<?php echo $www; ?>[/url]
<?php } if(!empty($icq)){ ?>[img]icq.png[/img]<span class="small"><?php echo $icq; ?></span>
<?php } if(!empty($msn)){ ?>[img]msn.png[/img]<span class="small"><?php echo $msn; ?></span><?php } ?>
</td>
<td valign="top" style="padding-top: 4px; background-color: <?php echo $farbe2; ?>">
<span class="small">Erstellt am:<?php echo $datum; ?> um <?php echo $zeit; ?></span><hr style="color: grey">
<span class="small"><?php echo $text; ?></span>
<span class="small"></span>
</td>
</tr>
<?php
}
mysql_free_result($result);
mysql_error();
mysql_close();
?>
</table>
<?php
}
?>
Kommentar