-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.php
90 lines (78 loc) · 2.43 KB
/
index.php
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
include 'init.php';
include 'core/includes/head.php';
if($users->signed_in()){
?>
<div class="container">
<div class="row home-hero">
<div class="six offset-by-three columns">
<img src="//gravatar.com/avatar/<?php echo md5($users->getuserinfo('email')); ?>?s=100">
<h4>Welcome, <?php echo $users->getuserinfo('nick_name'); ?></h4>
<ul>
<li>Last login <?php echo $time->ago($users->getuserinfo('last_login')); ?></li>
</ul>
<a href="./settings" class="button">Edit Account</a>
<?php if($users->getuserinfo('user_group') == 1){ echo '<a href="./admin" class="button button-primary">Admin Panel</a>'; };?>
<a href="logout.php" class="button button-blank"><span class="entypo-logout"></span></a>
</div>
</div>
<br><br>
<div class="row home-sections">
<div class="six columns">
<div class="section" id="new">
<div class="entypo-list-add"></div>
<b>Open New Ticket</b>
<p>Create or view support tickets to receive responses from our team.</p>
</div>
</div>
<div class="six columns">
<div class="section" id="current">
<div class="entypo-list"></div>
<b>Current Tickets</b>
<p>View and manage any tickets that may have responses from our team.</p>
</div>
</div>
</div>
<div style="display: none" class="section_view_current">
<table class="u-full-width">
<thead>
<tr>
<th>Subject</th>
<th>Status</th>
<th>Last Reply</th>
<th>Recent</th>
</tr>
</thead>
<tbody>
<?php $tickets->my_tickets(); ?>
</tbody>
</table>
</div>
<div style="display: none" class="section_view_new">
<span id="create_ticket_error"></span>
<form method="" id="create_ticket">
<div class="row">
<div class="columns six">
<label for="subject">Subject</label>
<input type="text" placeholder="Subject" class="u-full-width" id="subject">
</div>
<div class="columns six">
<label for="department">Department</label>
<select id="department" class="u-full-width">
<option disabled="disabled">Please select department</option>
<?php $tickets->get_departments(); ?>
</select>
</div>
</div>
<label for="subject">Message</label>
<textarea placeholder="Message" id="message" style="min-height:300px;" class="u-full-width"></textarea>
<button type="submit" class="button">Post Ticket</button>
</form>
</div>
</div>
<?php
}else{
header('Location: ./authenticate');
}
include 'core/includes/foot.php';
?>