Hallo Rt, wenn ich auf den Supportpage drücke, bleibt die Page einfach weß.
Woran liegt dass?
Phpcodes:
Spoiler anzeigen
<?php
if($user_rank > 3){
if($hkzone !== true){ header("Location: index.php?throwBack=true"); exit; }
if(!isset($_SESSION['acp'])){ header("Location: index?p=login"); exit; }
$pagename = "Support - Übersicht";
$pageid = "support";
$posts = mysql_evaluate("SELECT COUNT(*) FROM cms_support");
$pages = ceil(($posts + 0) / 50);
if(isset($page)){
if($page > $pages $page < 1){
$page = 1;
}
} else {
$page = 1;
}
if(isset($_POST['site'])){
header("location: ".$adminpath."/index/p/support&page=".FilterText($_POST['page'])."");
}
if(isset($do)){
if($do == "delete" && is_numeric($key)){
$check = mysql_query("SELECT id FROM cms_support WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($check) > 0){
mysql_query("DELETE FROM cms_support WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
mysql_query("INSERT INTO stafflogs (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','Ticket gelöscht','support.php','".$my_id."','','".$date_full."')") or die(mysql_error());
$msg = "<div class='rounded rounded-green'><center>Ticket wurde erfolgreich gelöscht. <img src=\"./images/check.gif\"></center></div>";
} else {
$msg = "<div class='rounded rounded-red'><center>Fehler - Ticket konnten nicht gelöscht werden. <img src=\"./images/del.gif\"></center></div>";
}
$editor_mode = false;
} elseif($do == "edit" && is_numeric($key)){
$check = mysql_query("SELECT * FROM cms_support WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($check) > 0){
$support = mysql_fetch_assoc($check);
if($support['pickup'] == "0"){
mysql_query("UPDATE cms_support SET id_picker = '".$my_id."', pickup = '1' WHERE id = '".$key."'");
header("location: #");
}
$editor_mode = true;
} else {
$msg = "<div class='rounded rounded-red'><center>Fehler - Ticket konnten nicht gefunden werden. <img src=\"./images/del.gif\"></center></div>";
}
} elseif($do == "save" && is_numeric($key) && isset($_POST['alert'])){
$check = mysql_query("SELECT id,id_user FROM cms_support WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($check) > 0){
$support = mysql_fetch_assoc($check);
mysql_query("INSERT INTO cms_alerts (userid,alert) VALUES ('".$support['id_user']."','Antwort auf dein Support-Ticket ~ <b>".$key."</b>:<br><br>".$_POST['alert']."')") or die(mysql_error());
mysql_query("UPDATE cms_support SET pickup = '2' WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
mysql_query("INSERT INTO stafflogs (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','Ticket Bearbeitet','support.php','".$my_id."','".$support['id_user']."','".$date_full."')") or die(mysql_error());
$msg = "<div class='rounded rounded-green'><center>Ticket wurde erfolgreich bearbeitet. <img src=\"./images/check.gif\"></center></div>";
$editor_mode = false;
} else {
$msg = "<div class='rounded rounded-red'><center>Fehler - Das Ticket existiert nichtmehr! <img src=\"./images/check.gif\"></center></div>";
}
}
} else {
$editor_mode = false;
}
@include('subheader.php');
if(isset($msg)){ ?><p><strong><?php echo $msg; ?></strong></p><?php } ?>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<?php if(isset($editor_mode) && $editor_mode !== true){ ?>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<form action='<?php echo $adminpath; ?>/index/p/support&do=save' method='post' name='theAdminForm' id='theAdminForm'>
<div class='tableborder'>
<div class='tableheaderalt'><center><?php echo mysql_evaluate("SELECT COUNT(*) FROM cms_support"); ?> Hilferufe // Davon <?php echo mysql_evaluate("SELECT COUNT(*) FROM cms_support WHERE pickup != '2'"); ?> Unbearbeitet //
<select name="page">
<?php for ($i = 1; $i <= $pages; $i++){ ?>
<option value="<?php echo $i; ?>"<?php if($i == $page){ echo' selected="selected"'; } ?>><?php echo $i; ?></option>
<?php } ?>
</select>
<input type="submit" name="site" value="Weiter »">
</div>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<td class='tablesubheader' width='1%' align='center'>ID</td>
<td class='tablesubheader' width='20%'>Status</td>
<td class='tablesubheader' width='10%'><?php echo $sitename; ?></td>
<td class='tablesubheader' width='40%'>Kategorie</td>
<td class='tablesubheader' width='15%'>Datum</td>
<td class='tablesubheader' width='1%'>Bearbeitung</td>
</tr>
<?php
$query_min = ($page * 50) - 50;
if($query_min < 0){
$query_min = 0;
}
$get_tickets = mysql_query("SELECT * FROM cms_support ORDER BY id DESC LIMIT ".$query_min.", 50") or die(mysql_error());
while($row = mysql_fetch_assoc($get_tickets)){
$user = mysql_fetch_assoc($user = mysql_query("SELECT username FROM users WHERE id = '".$row['id_user']."'"));
if($row['pickup'] == "0"){
$status = "<font color='red'>Unbearbeitet!</font>";
} elseif($row['pickup'] == "1"){
$picker = mysql_fetch_assoc($get_picker = mysql_query("SELECT username FROM users WHERE id = '".$row['id_picker']."'"));
$status = "<font color='orange'>Bearbeitung von <b>".$picker['username']."</b>!</font>";
} else {
$status = "<font color='green'>Bearbeitet!</font>";
}
?>
<tr>
<td class='tablerow1' align='center'><?php echo $row['id']; ?></td>
<td class='tablerow2'><?php echo $status; ?></td>
<td class='tablerow1' align='center'><?php echo $user['username']; ?></td>
<td class='tablerow2'><?php echo $row['category']; ?></td>
<td class='tablerow2'><?php echo date('d.m.Y - H:i:s', $row['timestamp']); ?> Uhr</td>
<td class='tablerow2' align='center'><a href='<?php echo $adminpath; ?>/index/p/support&do=edit&key=<?php echo $row['id']; ?>'><img src='./images/<?php if($row['pickup'] == "0"){ echo"check"; } else { echo"edit"; } ?>.gif'></a> <a href='<?php echo $adminpath; ?>/index/p/support&do=delete&key=<?php echo $row['id']; ?>'><img src='./images/del.gif' alt='Delete'></a></td>
</tr>
<?php } ?>
</table>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<?php } elseif(isset($do) && $do == "edit" && is_numeric($key)) { ?>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<form action='<?php echo $adminpath; ?>/index/p/support&do=save&key=<?php echo $key; ?>' method='post' name='theAdminForm' id='theAdminForm'>
<div class='tableborder'>
<div class='tableheaderalt'><center>Ticket ID: <?php echo $key; ?>!</center> <div style="float: right; margin-top: -22px; margin-right: 5px;"><input onclick="javascript:history.go(-1);" value='Zurück' class='cancelbutton' accesskey='s'> <input type='submit' name='submit' value='Ticket Speichern' class='savebutton' accesskey='s'></div></div>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>User</b><div class='graytext'>Von wem das Ticket erstellt worden ist</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='id_user' disabled='disabled' value="<?php $user = mysql_fetch_assoc($user = mysql_query("SELECT username FROM users WHERE id = '".$support['id_user']."'")); echo $user['username']; ?>" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Supporter/in</b><div class='graytext'>Staff, der das Ticket bearbeitet (hat)</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='id_picker' disabled='disabled' value="<?php $user = mysql_fetch_assoc($user = mysql_query("SELECT username FROM users WHERE id = '".$support['id_picker']."'")); echo $user['username']; ?>" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Kategorie</b><div class='graytext'>Art des Tickets</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='category' value="<?php echo $support['category']; ?>" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Beschreibung</b><div class='graytext'>Problem/Idee des Users</div></td>
<td class='tablerow2' width='60%' valign='middle'><textarea id="content" name="comment" style="width:80%"><?php echo $support['comment']; ?></textarea>
</td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'></td>
<td class='tablerow2' width='60%' valign='middle'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Antwort</b><div class='graytext'>Antwort auf das Ticket (ID-<b><?php echo $key; ?></b>)<br /><font color="green">HTML is erlaubt.</font></div></td>
<td class='tablerow2' width='60%' valign='middle'><textarea id="content" name="alert" style="width:80%"></textarea>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<?php } ?>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
</div>
</table></div>
<?php require_once('footer.php'); } else { require_once('error.php'); exit; } ?>