1<?php
2?>
3<div class="znx-acct">
4
5<div class="znx-acct-head"><?= t('helpdesk.latest') ?></div>
6<?php if ($tickets !== false): ?>
7 <div class="znx-acct-table-wrap">
8 <table class="znx-acct-table">
9 <tr class="yellow">
10 <td>ID:</td>
11 <td><?= t('helpdesk.subject') ?></td>
12 <td><?= t('helpdesk.creation') ?></td>
13 <td>Status:</td>
14 </tr>
15 <?php
16 foreach ($tickets as $ticket) {
17 echo '<tr class="special">';
18 echo '<td>'. $ticket['id'] .'</td>';
19 echo '<td><a href="helpdesk.php?view='. $ticket['id'] .'">'. $ticket['subject'] .'</a></td>';
20 echo '<td>'. getClock($ticket['creation'], true) .'</td>';
21 echo '<td>'. $ticket['status'] .'</td>';
22 echo '</tr>';
23 }
24 ?>
25 </table>
26 </div>
27<?php endif; ?>
28
29<div class="znx-acct-head"><?= t('helpdesk.title') ?></div>
30<?php if ($helpdeskCreated): ?>
31 <div class="znx-acct-info"><?= t('helpdesk.created') ?></div>
32<?php else: ?>
33 <?php if (empty($errors) === false): ?>
34 <div class="znx-acct-info znx-editchar-notice znx-editchar-notice--error"><?= output_errors($errors) ?></div>
35 <?php endif; ?>
36 <form action="" method="post" class="znx-editchar-box">
37 <div class="znx-settings-field">
38 <label>Account Name</label>
39 <input type="text" name="username" size="40" value="<?php echo $account['name']; ?>" disabled class="znx-acct-select">
40 </div>
41 <div class="znx-settings-field">
42 <label>Email</label>
43 <input type="text" name="email" size="40" value="<?php echo $account['email']; ?>" disabled class="znx-acct-select">
44 </div>
45 <div class="znx-settings-field">
46 <label><?= t('helpdesk.subject') ?></label>
47 <input type="text" name="subject" size="40" class="znx-acct-select">
48 </div>
49 <div class="znx-settings-field">
50 <label>Message</label>
51 <textarea name="message" rows="7" cols="30" class="znx-editchar-textarea"></textarea>
52 </div>
53 <?php
54 if ($config['use_captcha']) {
55 ?>
56 <div class="znx-settings-field">
57 <div class="g-recaptcha" data-sitekey="<?php echo $config['captcha_site_key']; ?>"></div>
58 </div>
59 <?php
60 }
61 ?>
62 <?php
63 /* Form file */
64 Token::create();
65 ?>
66 <input type="hidden" name="username" value="<?php echo $account['name']; ?>">
67 <button type="submit" class="znx-acct-btn"><?= t('helpdesk.submit') ?></button>
68 </form>
69<?php endif; ?>
70
71</div><!-- .znx-acct -->
72