Location: PHPKode > projects > Druid Defect Control > defectcontrol_0.9.4/tts/releasenotes.php
<?php include 'usercheck.php' ?>
<?php include 'genform.php' ?>

<html>
<head>
<title>Release notes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css">
</head>

<body bgcolor="#FFFFFF">

<?php include 'header.php'; ?>

<?php ttdb_connect($db); ?> 

<h1>Release notes</h1>

<?php 
      if (($bSubmit == "") || ($fRelease == 'null')) {
?>

<script language="javascript">

function fieldChanged() {
    xform.action = "releasenotes.php"; 
    xform.submit();
}

</script>

<form method="post" action="releasenotes.php" name="xform">

  <table width="100%" border="0" cellpadding="2" class="tableFieldContent" cellspacing="2">
    <tr> 
      <td class="tableFieldName" width="30%">Project</td>
      <td class="tableFieldContent" width="70%"> 
	<?php 	
	    $userdata = ttus_getLoginUserInfo($db);	
	    $defaultProject = $userdata['iiddefaultproject'] == "" ? $fProject : $userdata['iiddefaultproject'];
	    $selectedProject = gf_generateLookupFieldSelected($db, 
                                     'fProject', 
                                     '',
                                     'select * from project',
                                     'iid',
                                     'sname',
                                     $defaultProject,
                                     false,
                                     'fieldChanged()');
         ?>
      </td>
  </tr>
  
  <tr> 
    <td class="tableFieldName" width="30%">Software</td>
    <td class="tableFieldContent" width="70%">
	<?php $selectedSoftware = gf_generateLookupFieldSelected($db, 
                                     'fSoftware', 
                                     '',
                                     'select * from software where iidproject = '.$selectedProject,
                                     'iid',
                                     'sname',
                                     $fSoftware,
                                     false,
                                     'fieldChanged()');
         ?>
      </td>  
  </tr>
  
  <tr> 
    <td class="tableFieldName" width="30%">Integrated on release</td>
    <td class="tableFieldContent" width="70%">
	<?php gf_generateLookupFieldSelected($db, 
                'fRelease',
                '',
                "select * from releases where iidsoftware = $selectedSoftware order by sname",
                'iid',
                'sname',
                $fRelease,
                true);
         ?>
      </td>
  </tr>
</table>
<input type="submit" name="bSubmit" value="Get">
<p></p>


</form>


<?php } else { ?>

<p>List of entries integrated in release <b> 
<?php
    $res = ttdb_execQuery($db, 
        "SELECT sname FROM releases WHERE iid = $fRelease");
    $fields = ttdb_getArray($res);
    echo $fields['sname'];
?>
</b>.</p>

<table width="95%" border="0" cellspacing="2" cellpadding="2">

<?php 
      $res = ttdb_execQuery($db, 
           "SELECT d.iid, d.sheadline, e.stext, t.sname as defecttype ".
           "FROM defect d, enclosure e, defecttype t ".
           "WHERE e.iiddefect = d.iid AND ".
           "     d.iiddefecttype = t.iid AND ".
           "     e.stitle = 'Problem' AND ".
           "     d.iidintegratedinrelease = $fRelease"
           );
           
      while (($fields = ttdb_getArray($res)) != false)  {
?>
  <tr>
    <td class="tableTitle">
    <?php echo "<b>".$fields['iid']." - ".htmlspecialchars($fields['sheadline']).
        "</b> (".$fields['defecttype'].")"; ?>
    </td>
  </tr>
  <tr>
    <td><pre><font size="2">
<?php echo htmlspecialchars(stripslashes(wordwrap($fields['stext'], 80))); ?>
    </font></pre></td>
  </tr>
<?php  } // while ?>

</table>

<?php } // if ?> 
<p>

<?php ttdb_close($db); ?> 

</body>
<?php include 'footer.php'; ?>
</html>
Return current item: Druid Defect Control