3 require_once('elements/session.php');
5 if ( $_POST['ticket_id'] ) {
6 $ticket_id = $_POST['ticket_id'];
8 $ticket_id = $_SERVER['QUERY_STRING'];
11 if ( ! preg_match( '/^\d+$/', $ticket_id ) ) {
12 header('Location:index.php?error=No+ticket+ID');
16 $ticket_info = $freeside->get_ticket( array(
17 'session_id' => $_COOKIE['session_id'],
18 'ticket_id' => $ticket_id,
19 'subject' => $_POST['subject'],
20 'reply' => $_POST['reply'],
23 if ( isset($ticket_info['error']) && $ticket_info['error'] ) {
24 $error = $ticket_info['error'];
25 header('Location:index.php?error='. urlencode($error));
29 extract($ticket_info);
32 <? $title = "View ticket #$ticket_id"; include('elements/header.php'); ?>
33 <? $current_menu = 'tickets.php'; include('elements/menu.php'); ?>
36 <? foreach ( $transactions AS $transaction ) {
37 if ( $transaction['content'] == 'This transaction appears to have no content' ) { continue; }
42 <? echo $transaction['created'] ?>
44 <? echo $transaction['description'] ?>
46 <PRE><? echo $transaction['content'] ?></PRE><BR>
53 <FORM ACTION="ticket.php" METHOD=POST>
54 <input type="hidden" name="ticket_id" value="<? echo $ticket_id ?>">
56 <? if ( $edit_ticket_subject ) { ?>
57 Subject:<BR><input type="text" name="subject" value="<? htmlspecialchars($ticket_fields['subject']) ?>" style="width:440px">
63 <textarea name="reply" cols="60" rows="10" style="width:440px"></textarea>
64 <BR><input type="submit" value="Reply">
67 <? include('elements/menu_footer.php'); ?>
68 <? include('elements/footer.php'); ?>