Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
if(!defined('OSTCLIENTINC') || !$thisclient || !$ticket || !$ticket->checkClientAccess($thisclient)) die('Access Denied!');
$info=($_POST && $errors)?Format::htmlchars($_POST):array();
$dept = $ticket->getDept();
//Making sure we don't leak out internal dept names
if(!$dept || !$dept->isPublic())
$dept = $cfg->getDefaultDept();
?>
<table width="800" cellpadding="1" cellspacing="0" border="0" id="ticketInfo">
<tr>
<td colspan="2" width="100%">
<h1>
Ticket #<?php echo $ticket->getExtId(); ?>
<a href="view.php?id=<?php echo $ticket->getExtId(); ?>" title="Reload"><span class="Icon refresh"> </span></a>
</h1>
</td>
</tr>
<tr>
<td width="50%">
<table class="infoTable" cellspacing="1" cellpadding="3" width="100%" border="0">
<tr>
<th width="100">Ticket Status:</th>
<td><?php echo ucfirst($ticket->getStatus()); ?></td>
</tr>
<tr>
<th>Department:</th>
<td><?php echo Format::htmlchars($dept->getName()); ?></td>
</tr>
<tr>
<th>Create Date:</th>
<td><?php echo Format::db_datetime($ticket->getCreateDate()); ?></td>
</tr>
</table>
</td>
<td width="50%">
<table class="infoTable" cellspacing="1" cellpadding="3" width="100%" border="0">
<tr>
<th width="100">Name:</th>
<td><?php echo ucfirst($ticket->getName()); ?></td>
</tr>
<tr>
<th width="100">Email:</th>
<td><?php echo Format::htmlchars($ticket->getEmail()); ?></td>
</tr>
<tr>
<th>Phone:</th>
<td><?php echo $ticket->getPhoneNumber(); ?></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<h2>Subject:<?php echo Format::htmlchars($ticket->getSubject()); ?></h2>
<br>
<span class="Icon thread">Ticket Thread</span>
<div id="ticketThread">
<?php
if($ticket->getThreadCount() && ($thread=$ticket->getClientThread())) {
$threadType=array('M' => 'message', 'R' => 'response');
foreach($thread as $entry) {
//Making sure internal notes are not displayed due to backend MISTAKES!
if(!$threadType[$entry['thread_type']]) continue;
$poster = $entry['poster'];
if($entry['thread_type']=='R' && $cfg->hideStaffName())
$poster = ' ';
?>
<table class="<?php echo $threadType[$entry['thread_type']]; ?>" cellspacing="0" cellpadding="1" width="800" border="0">
<tr><th><?php echo Format::db_datetime($entry['created']); ?> <span><?php echo $poster; ?></span></th></tr>
<tr><td><?php echo Format::display($entry['body']); ?></td></tr>
if($entry['attachments'] && ($links=$ticket->getAttachmentsLinks($entry['id'], $entry['thread_type']))) { ?>
<tr><td class="info"><?php echo $links; ?></td></tr>
<?php
} ?>
</table>
}
}
?>
</div>
<div class="clear" style="padding-bottom:10px;"></div>
<?php if($errors['err']) { ?>
<div id="msg_error"><?php echo $errors['err']; ?></div>
<?php }elseif($msg) { ?>
<div id="msg_notice"><?php echo $msg; ?></div>
<?php }elseif($warn) { ?>
<div id="msg_warning"><?php echo $warn; ?></div>
<?php } ?>
<form id="reply" action="tickets.php?id=<?php echo $ticket->getExtId(); ?>#reply" name="reply" method="post" enctype="multipart/form-data">
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<h2>Post a Reply</h2>
<input type="hidden" name="id" value="<?php echo $ticket->getExtId(); ?>">
<input type="hidden" name="a" value="reply">
<table border="0" cellspacing="0" cellpadding="3" width="800">
<tr>
<td width="160">
<label>Message:</label>
</td>
<td width="640">
<?php
if($ticket->isClosed()) {
$msg='<b>Ticket will be reopened on message post</b>';
} else {
$msg='To best assist you, please be specific and detailed';
}
?>
<span id="msg"><em><?php echo $msg; ?> </em></span><font class="error">* <?php echo $errors['message']; ?></font><br/>
<textarea name="message" id="message" cols="50" rows="9" wrap="soft"><?php echo $info['message']; ?></textarea>
</td>
</tr>
<?php
if($cfg->allowOnlineAttachments()) { ?>
<tr>
<td width="160">
<label for="attachment">Attachments:</label>
</td>
<td width="640" id="reply_form_attachments" class="attachments">
<div class="uploads">
</div>
<div class="file_input">
<input type="file" name="attachments[]" size="30" value="" />
</div>
</td>
</tr>
<?php
} ?>
</table>
<p style="padding-left:165px;">
<input type="submit" value="Post Reply">
<input type="reset" value="Reset">
<input type="button" value="Cancel" onClick="history.go(-1)">
</p>
</form>