login != $admin1 && $data->login != $admin2) { exit; } mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'"); /* ------------------------- */ ?> DatumOnderwerp Bekijken'; $mijntickets = mysql_query("SELECT * FROM tickets"); while($mijnticket = mysql_fetch_object($mijntickets)){ print ''.$mijnticket->datum.''.$mijnticket->onderwerp.' ( '.$mijnticket->afzender.' ) Bekijken '; } print ''; if($_GET['show']){ print "hoi"; $showen = mysql_query("SELECT * FROM tickets WHERE id='{$_GET['show']}'"); $showa = mysql_fetch_object($showen); print '
Bericht
'.$showa->bericht.'
'; print '
Antwoord
'.$showa->antwoord.'
'; } exit; } $tickets = mysql_query("SELECT * FROM `tickets` WHERE antwoord='' ORDER BY `datum` DESC"); print ''; print '
OnderwerpDatum Afzender Naam Optie'; while($ticket = mysql_fetch_object($tickets)){ if($ticket->antwoord == ""){ $bold = ''; $bold1 = ''; } if($ticket->ban == "on"){ $image = ''; } print '
'.$image.''.$ticket->onderwerp.''.$ticket->datum.''.$ticket->afzender.''.$ticket->naam.''.$ticket->optie.''; } print '
'; if($_GET['edit']){ $antwoorden = mysql_query("SELECT * FROM tickets WHERE id='{$_GET['edit']}'"); $antwoord = mysql_fetch_object($antwoorden); print '
'.$antwoord->bericht.'

'; if($_POST['antwoord']){ print 'Je hebt op dit bericht geantwoord'; mysql_query("INSERT INTO `[messages]`(`time`,`IP`,`from`,`to`,`subject`,`message`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','$page->sitetitle','{$antwoord->afzender}','Ticket','Er is gereageerd op je ticket')"); $antwoor = $_POST['antwoor']; mysql_query("UPDATE `tickets` SET ban='off',antwoord='$antwoor' WHERE id='$antwoord->id'"); } } print '
Klik hier voor alle berichten
'; print '
'; ?>