forked from tylerhall/Shine
-
Notifications
You must be signed in to change notification settings - Fork 2
/
feedback.php
87 lines (82 loc) · 3.26 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?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 feedback WHERE type = '$type' ORDER BY dt DESC");
}
else
{
$feedback = DBObject::glob('Feedback', "SELECT * FROM feedback ORDER BY dt DESC");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Shine</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<link rel="stylesheet" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css">
<link rel="stylesheet" href="css/yuiapp.css" type="text/css">
</head>
<body class="rounded">
<div id="doc3" class="yui-t0">
<div id="hd">
<?PHP include('inc/header.inc.php'); ?>
</div>
<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"<?PHP } ?>><a href="feedback.php">All Feedback</a></li>
<li <?PHP if(@$_GET['type']=='support'){?> class="active"<?PHP } ?>><a href="feedback.php?type=support">Support Questions</a></li>
<li <?PHP if(@$_GET['type']=='bug'){?> class="active"<?PHP } ?>><a href="feedback.php?type=bug">Bug Reports</a></li>
<li <?PHP if(@$_GET['type']=='feature'){?> class="active"<?PHP } ?>><a href="feedback.php?type=feature">Feature Requests</a></li>
</ul>
<div class="clear"></div>
</div>
<div class="bd">
<table>
<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><?PHP echo $f->email; ?></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>
<div id="ft"></div>
</div>
</body>
</html>