-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewbugs.php
72 lines (62 loc) · 2.51 KB
/
viewbugs.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
/**
* Shows all versions that have the same bug link.
*
* Mandatory parameters:
* - iBugId, bug identifier
*/
// application environment
require("path.php");
require(BASE."include/incl.php");
apidb_header("Applications Affected by Bug #{$aClean['iBugId']}");
echo '<h1 class="whq-app-title">Applications Affected by Bug #'.$aClean['iBugId'].'</h1>',"\n";
echo '<form method=post action="viewbugs.php?iBugId='.$aClean['iBugId'].'">',"\n";
echo '<input type="text" name="iBugId" value="'.$aClean['iBugId'].'" class="form-control form-control-inline" size="10">',"\n";
echo '<button type="submit" class="btn btn-default">Search</button>',"\n";
echo '</form>',"\n";
$hResult = query_parameters("SELECT appFamily.description as appDescription,
appFamily.appName as appName,
appVersion.*, buglinks.versionId as versionId
FROM appFamily, appVersion, buglinks
WHERE appFamily.appId = appVersion.appId
and buglinks.versionId = appVersion.versionId
AND buglinks.bug_id = '?'
ORDER BY appName, versionName", $aClean['iBugId']);
if(query_num_rows($hResult))
{
echo '<table class="whq-table whq-table-full">',"\n";
echo '<thead><tr>',"\n";
echo ' <td width="30%">Application Name</td>',"\n";
echo ' <td width="50%">Description</td>',"\n";
echo ' <td>version</td>',"\n";
echo ' <td>Downloads</td>',"\n";
echo '</tr></thead><tbody>',"\n";
while($oRow = query_fetch_object($hResult))
{
$oApp = new application($oRow->appId);
$oVersion = new version($oRow->versionId);
$sDownloadUrls = "";
if($hDownloadUrls = appData::getData($oRow->versionId, "downloadurl"))
{
while($oDownloadUrl = query_fetch_object($hDownloadUrls))
$sDownloadUrls .= "<a href=\"$oDownloadUrl->url\">".
"$oDownloadUrl->description</a><br>";
}
echo '<tr>',"\n";
echo ' <td>',"\n";
echo " ".$oApp->objectMakeLink()."\n";
echo ' </td>',"\n";
echo ' <td>'.$oRow->appDescription.'</td>',"\n";
echo ' <td>',"\n";
echo " ".$oVersion->objectMakeLink()."\n";
echo ' </td>',"\n";
echo " <td>$sDownloadUrls</td>\n";
echo '</tr>',"\n";
}
echo '</tbody></table>',"\n";
}
else
{
echo html_note("No Applications Found for Bug #{$aClean['iBugId']}","","","warning");
}
apidb_footer();