hey,
ich bin an einem ucp für samp dran aber bei dem ticketsystem gibt es probleme beim anzeigen sie werden abgesendet aber lassen sich nicht öffnen
Code
<?
if(empty($_REQUEST['id'])){
if(!empty($_REQUEST['do'])){
$operator = $_REQUEST['do'];
if($operator == "ticket"){?>
<div class="containerHead_Tab"><b>Deine Tickets</b></div>
<div class="containerInner">
<table class="table table-hover">
<thead>
<tr>
<th></th>
<th>Titel</th>
<th>Datum</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<? $getColor = "";
$query = "SELECT * FROM `".$MySQLiDB['tickets']."` WHERE Name = '$Name' AND first = '1'";
if ($result = $mysqli->query($query))
{
while ($row = $result->fetch_assoc())
{
if($row['status'] == 0) { $getColor = '<span class="badge badge-info">In bearbeitung</span>'; }
else if($row['status'] == 1) { $getColor = '<span class="badge badge-success">Abgeschlossen</span>'; }
else $getColor = "Fail";
$bwid = $row['id'];?>
<tr style="cursor:pointer;" onClick="location.href='?s=tickets&id=<?= $bwid;?>'">
<td><?= $bwid;?></td>
<td><?= $row['Header'];?></td>
<td><?= getDatenew($row['timestamp']);?></td>
<td><?= $getColor;?></td>
</tr>
<?}
}?>
</tbody>
</table>
<?}else if($operator == "answer"){?>
<?$id = $_SESSION['id'];?>
<form action="?s=tickets.send&id=<?=$id;?>" method="post" enctype="multipart/form-data">
<? $_SESSION['send'] = "answertickets"; ?>
<?if(!empty($_SESSION['ticketse'])){?>
<textarea id="editor1" name="ticketse" style="width:100%; height:200px;"><?= $_SESSION['ticketse'];?></textarea>
<?}else{?>
<textarea name="ticketse" style="width:100%; height:200px;"></textarea>
<?}?>
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-body">
<input type="submit" name="submit" value="Absenden" class="btn btn-success">
<input type="reset" name="reset" value="Abbrechen" class="btn btn-danger">
</div>
</div>
</div>
</form>
<?}else if($operator == "open"){
if(!empty($_SESSION['id'])) $id = $mysqli->real_escape_string($_SESSION['id']);
else reload("?s=tickets&error=3");
if(!$mysqli -> query("UPDATE `".$MySQLiDB['tickets']."` SET close = 0 WHERE id = '$id'"))
{
printf("Errorcode: %s\n", $mysqli->error);
exit();
}
unset($_SESSION['id']);
reload("?s=tickets&id=$id");
}else if($operator == "close"){
if(!empty($_SESSION['id'])) $id = $mysqli->real_escape_string($_SESSION['id']);
else reload("?s=tickets&error=3");
if(!$mysqli -> query("UPDATE `".$MySQLiDB['tickets']."` SET close = 1 WHERE id = '$id'"))
{
printf("Errorcode: %s\n", $mysqli->error);
exit();
}
unset($_SESSION['id']);
reload("?s=tickets&id=$id");
}
}
}else{
$id = $mysqli->real_escape_string($_REQUEST['id']);
if(isPlayerAdminOrOwner($id, $Name))
{
$_SESSION['id'] = $id;?>
<ul class="timeline">
<?$rowid = 0; $isClosed = 0;
$query = "SELECT * FROM `".$MySQLiDB['tickets']."` WHERE id = '$id' AND first = '1'";
if ($result = $mysqli->query($query))
{
while ($row = $result->fetch_assoc())
{
$isClosed = $row['close'];?>
<li class="time-label">
<span class="bg-red">
<?= getDatenew($row['timestamp']);?>
</span>
</li>
<li>
<div class="timeline-item">
<div class="timeline-body">
<?if($row['status'] == 0) {echo "<button name='submit' class='btn btn-info'>In bearbeitung</button>";}
else if($row['status'] == 1) {echo "<button name='submit' class='btn btn-success'>Abgeschlossen</button>";}
if($isClosed == 0){ echo " <button name='submit' class='btn btn-success'>Offen</button>";}
else if($isClosed == 1){ echo " <button name='submit' class='btn btn-danger'>Geschlossen</button>"; }?>
<br/>
<?if($row['status'] == 1){?>
<br/><?= successInfo("Deine Beschwerde wurde aus folgenden Grund Abgeschlossen:<br/>".$row['adescription'], 0);?>
</div>
</div>
</li>
<li>
<i class="fa fa-envelope bg-blue"></i>
<div class="timeline-item">
<span class="time"><i class="fa fa-clock-o"></i> <?= getTimeAnddate($row['timestamp']);?></span>
<h3 class="timeline-header"><?= getAdminRankByName($row['Name'], $row['Name'])." - ".$row['Header'];?></h3>
<div class="timeline-body">
<?= $row['Description']; ?>
</div>
</div>
</li>
<?}
}
$query = "SELECT * FROM `".$MySQLiDB['tickets']."` WHERE id = '$id' AND first = '0'";
if ($result = $mysqli->query($query))
{
while ($row = $result->fetch_assoc())
{?>
<li>
<i class="fa fa-envelope bg-blue"></i>
<div class="timeline-item">
<span class="time"><i class="fa fa-clock-o"></i> <?= getTimeAnddate($row['timestamp']);?></span>
<?if($row['Header'] == " "){?> <h3 class="timeline-header"><?= getAdminRankByName($row['Name'], $row['Name']);?></h3> <?}
else {?> <h3 class="timeline-header"><?= getAdminRankByName($row['Name'], $row['Name'])." - ".$row['Header'];?></h3><?}?>
<div class="timeline-body">
<?= $row['Description']; ?>
</div>
</div>
</li>
<?}
}?>
<li>
<div class="timeline-item">
<div class="timeline-body">
<?if($isClosed == 0){?>
<a href="?s=tickets&do=answer"><button name="submit" value="send" class="btn btn-btn-lg">Antworten</button></a>
<?}else if($isClosed == 1){
if($playerInfo['Admin'] > 0){?>
<a href="?s=tickets&do=answer"><button name="submit" value="send" class="btn btn-btn-lg">Antworten</button></a>
<?}
}?>
<?if($isClosed == 0){?>
<a href="?s=complaint&do=close"> <button name="submit" value="send" class="btn btn-btn-lg">Schließen</button></a>
<?}else if($isClosed == 1){?>
<a href="?s=complaint&do=open"> <button name="submit" value="send" class="btn btn-btn-lg">Öffnen</button></a>
<?}?>
</div>
</div>
</li>
<li>
<i class="fa fa-clock-o"></i>
</li>
</ul>
<?}
}?>
Alles anzeigen
es kommt der Fehler
Parse error: syntax error, unexpected end of file in /var/www/virtual/ucp-arbeit.s4y-web.de/cprp/templates/user/tickets.php on line 166
edit:
Es wäre die zeile 162 hier