This repository has been archived by the owner on Apr 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
feedback.php
70 lines (66 loc) · 2.75 KB
/
feedback.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
<?PHP
require 'includes/master.inc.php';
$Auth->requireAdmin('login.php');
$nav = 'feedback';
if(isset($_GET['type']))
{
$db = Database::getDatabase();
$type = mysql_real_escape_string($_GET['type'], $db->db);
$feedback = DBObject::glob('Feedback', "SELECT * FROM shine_feedback WHERE type = '$type' ORDER BY dt DESC");
}
else
{
$feedback = DBObject::glob('Feedback', "SELECT * FROM shine_feedback ORDER BY dt DESC");
}
?>
<?PHP include('inc/header.inc.php'); ?>
<div id="bd">
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<div class="block tabs spaces">
<div class="hd">
<h2>Feedback</h2>
<ul>
<li <?PHP if(@$_GET['type']==''){?> class="active"<? } ?>><a href="feedback.php">All Feedback</a></li>
<li <?PHP if(@$_GET['type']=='support'){?> class="active"<? } ?>><a href="feedback.php?type=support">Support Questions</a></li>
<li <?PHP if(@$_GET['type']=='bug'){?> class="active"<? } ?>><a href="feedback.php?type=bug">Bug Reports</a></li>
<li <?PHP if(@$_GET['type']=='feature'){?> class="active"<? } ?>><a href="feedback.php?type=feature">Feature Requests</a></li>
</ul>
<div class="clear"></div>
</div>
<div class="bd">
<table class="lines">
<thead>
<tr>
<td>ID</td>
<td>Application</td>
<td>Type</td>
<td>Email</td>
<td>Wants Reply?</td>
<td>Date</td>
<td> </td>
</tr>
</thead>
<tbody>
<?PHP foreach($feedback as $f) : ?>
<tr class="<?PHP if($f->new == 1) echo "new"; ?>">
<td><?PHP echo $f->id; ?></td>
<td><?PHP echo $f->appname; ?> <?PHP echo $f->appversion; ?></td>
<td><?PHP echo $f->type; ?></td>
<td><a href="mailto:<?PHP echo $f->email; ?>"><?PHP echo $f->email; ?></a></td>
<td><?PHP echo ($f->reply == 1) ? '<strong>Yes</strong>' : 'No'; ?></td>
<td><?PHP echo time2str($f->dt); ?></td>
<td><a href="feedback-view.php?id=<?PHP echo $f->id; ?>">View</a></td>
</tr>
<?PHP endforeach; ?>
</tbody>
</table>
</div>
</div>
<p>Use <a href="http://github.com/tylerhall/OpenFeedback/">OpenFeedback</a> to collect feedback from your users.</p>
</div></div>
</div>
<div id="sidebar" class="yui-b">
</div>
</div>
<?PHP include('inc/footer.inc.php'); ?>