echo ' <input type="hidden" name="gobackto" value="' . substr($_SERVER["HTTP_REFERER"], strrpos($_SERVER["HTTP_REFERER"], "/") + 1) . '">'; } else { echo ' <input type="hidden" name="gobackto" value="' . $_REQUEST['gobackto'] . '">'; } if (!$isReadonly) { echo ' <input type="submit" name="saveUpdate" value="Update">'; if (empty($_REQUEST['AID'])) { if ($_COOKIE['ctorb'] == 'b') { echo '<input type="radio" name="torb" value="t">Top or</input>'; echo '<input type="radio" name="torb" value="b" checked >Bottom of Backlog/Iteration</input>'; } else { echo '<input type="radio" name="torb" value="t" checked >Top or</input>'; echo '<input type="radio" name="torb" value="b">Bottom of Backlog/Iteration</input>'; } } if (Num_Children($story_Row['AID']) == 0 && $IterationLocked == 0) { echo '<a class="storyeditdelete" href="story_Delete.php?id=' . $story_Row['AID'] . '&PID=' . $_REQUEST['PID'] . '&IID=' . $_REQUEST['IID'] . '" title="Delete Story"><img src="images/delete-large.png"></a>'; } } } ?> </form><br> <link rel="stylesheet" type="text/css" href="css/micro_menu.css" /> <script type="text/javascript" src="scripts/micromenu-hasha7172a2fe877afe1c93d3a089dac060b.js"></script> <script> document.forms[1].Summary.focus(); </script>
function Get_Status_Points($thisstory, $thisstatus, $sumx) { global $DBConn; $sum += sumx; $sql = 'SELECT story.AID, story.Size, story.Status from story where story.Parent_Story_ID=' . $thisstory; if ($res = mysqli_query($DBConn, $sql)) { if ($prow = mysqli_fetch_array($res)) { do { if (Num_Children($prow['AID']) > 0) { $sum += Get_Status_Points($prow['AID'], $thisstatus, $sum); } else { if ($prow['Status'] == $thisstatus) { $sum += $prow['Size']; } } } while ($prow = mysqli_fetch_array($res)); } } return $sum; }
function GetTree($tree_Res, $flag = '') { global $DBConn; if ($tree_Row = mysqli_fetch_assoc($tree_Res)) { do { if (empty($_REQUEST['RID']) || ($tree_Row['Release_ID'] == $_REQUEST['RID'] || Num_Children($tree_Row['AID']) != 0)) { echo '<li id="' . $tree_Row['AID'] . '" data-nodndflag="' . $flag . '" data-iteration="' . Get_Iteration_Name($tree_Row['Iteration_ID'], False) . '" data-iid="' . $tree_Row['Iteration_ID'] . '" data-pid="' . $tree_Row['Project_ID'] . '" >'; echo '<div class="treebox">'; PrintStory($tree_Row); echo '</div>'; // if i have children, then go and fetch them $sql = 'SELECT * FROM story WHERE story.Parent_Story_ID=' . $tree_Row['AID'] . ' order by story.Epic_Rank'; $Child_Res = mysqli_query($DBConn, $sql); if ($Child_Res) { echo '<ul>'; GetTree($Child_Res, $flag); echo '</ul>'; } echo '</li>'; } } while ($tree_Row = mysqli_fetch_assoc($tree_Res)); } }