This repository has been archived on 2025-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
qemudb/viewbugs.php
2006-07-07 17:55:27 +00:00

80 lines
2.7 KiB
PHP

<?php
/**
* Shows all versions that have the same bug link.
*
* Mandatory parameters:
* - iBugId, bug identifier
*
* TODO:
* - replace the check is_numeric($aClean['iBugId']) with an is_empty check when filtering is in place
*/
// application environment
include("path.php");
require(BASE."include/incl.php");
require(BASE."include/filter.php");
/* code to View versions affected by a Bug */
if(!is_numeric($aClean['iBugId']))
util_show_error_page_and_exit("Something went wrong with the bug ID");
apidb_header("Applications affected by Bug #".$aClean['iBugId']);
echo '<form method=post action="viewbugs.php?iBugId='.$aClean['iBugId'].'">',"\n";
echo '<table width=100% border=0 cellpadding=3 cellspacing=1>',"\n";
echo '<tr class=color4>',"\n";
echo ' <td width=80>Application Name</td>',"\n";
echo ' <td>Description</td>',"\n";
echo ' <td width=80>version</td>',"\n";
echo '</tr>',"\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 versionName", $aClean['iBugId']);
$c = 0;
if($hResult)
{
while($oRow = mysql_fetch_object($hResult))
{
// set row color
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
echo '<tr class='.$bgcolor.'>',"\n";
echo ' <td>',"\n";
echo ' <a href="appview.php?iAppId='.$oRow->appId.'">'.$oRow->appName.'</a>',"\n";
echo ' </td>',"\n";
echo ' <td>'.$oRow->appDescription.'</td>',"\n";
echo ' <td>',"\n";
echo ' <a href="appview.php?iVersionId='.$oRow->versionId.'">'.$oRow->versionName.'</a>',"\n";
echo ' </td>',"\n";
echo '</tr>',"\n";
}
}
// allow users to search for other apps
echo '<tr class=color2>',"\n";
echo ' <td align=center colspan=5>&nbsp</td>',"\n";
echo '</tr>',"\n";
echo '<tr class=color4>',"\n";
echo ' <td colspan=3 >&nbsp Bug #</td>',"\n";
echo '</tr>',"\n";
echo '<tr class=color3>',"\n";
echo ' <td align=center>',"\n";
echo ' <input type="text" name="iBugId" value="'.$aClean['iBugId'].'" size="8"></td>',"\n";
echo ' <td colspan=2><input type="submit" name="sSub" value="Search"></td>',"\n";
echo '</tr>',"\n";
echo '</table>',"\n";
apidb_footer();
?>