Schon daran gedacht das der Kommentar zu php gehört? //count steht NICHT im php tag.
Den Kommentar habe ich doch gerade nur gemacht weil ich euch keine 120 Zeilen shcicken wollte aber wnen ihr es nicht kapiert sry dann schick ich mal das ganze
<?php if($_SESSION['loggedin'] == false) {
?><div class="fail">Du bist nicht angemldet!</div><?php
} else if(isset($_GET['showid'])) {
if(IsPlayerAllowedToShowBeschw($_SESSION['username'], $_GET['showid'])) { ?>
<fieldset>
<?php
$sql = mysql_query("SELECT * FROM `ucp_beschwerde` WHERE `id` = '" . mysql_real_escape_string($_GET["showid"]) . "'");
$row = mysql_fetch_array($sql);
?><table>
<th><?php echo $row['id']; ?></th>
<th><?php echo "Betreff:" . $row['betreff']; ?></th>
<th><?php echo "Beschwerde von " . $row['from']; ?></th>
</table>
<?php
?>
</fieldset>
<?php
} else { ?>
<div class="fail">Du bist nicht berechtigt diese Beschwerde anzusehen!</div><?php
}
} else { ?>
<div class="left" style="width: 45%;">
<?php
$sql = mysql_query("SELECT * FROM `ucp_beschwerde` WHERE `bto` = '" . $_SESSION['username'] . "'");
$counter = 1;
if(@mysql_num_rows($sql)) { ?>
<div class="tab">
<table>
<thead>
<th>Nr</th>
<th>Von</th>
<th>Betreff</th>
<th>Datum</th>
<th>Aktionen</th>
</thead>
<tbody>
<?php
while($data = mysql_fetch_assoc($sql)) { ?>
<tr>
<td><?php echo $counter; ?></td>
<td><?php echo $data['bfrom'] ?></td>
<td><?php echo $data['betreff'] ?></td>
<td><?php echo formatdate($data['gtime']); ?></td>
<td>
<ul class="inline center">
<li><a href="index.php?page=7&showid=<?php echo $data['id']; ?>"><i class="fa fa-info"></i></a></li>
</ul>
</td>
</tr>
<?php $counter++;
}
?>
</tbody>
</table>
</div>
<?php } else {
echo "Es sind gegen dich keine Beschwerden gestellt worden!";
}?>
</div>
</div class="left" style="margin-left: 10%; width: 45%;">
</div>
<div class="clear"></div>
<?php }
} ?>
Ich dneke mal version 1 ist übersichtlicher oder?
Edit: Fail Datei