Esempio n. 1
0
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));
    }
}
require_once 'include/dbconfig.inc.php';
require_once 'include/common.php';
$user_details = check_user($_SESSION['user_identifier']);
if (!$user_details) {
    exit;
}
global $statuscolour;
global $Project;
global $Sizecount;
global $OSizecount;
global $Toggle;
global $Iterationcount;
global $OIterationcount;
global $DBConn;
global $LockedIteration;
$dummy = Get_Project_Name($_GET['PID']);
$dummy = buildstatuspop($_GET['PID']);
$sumpts = 0;
$sql = 'SELECT * FROM story where story.Project_ID=' . $_GET['PID'] . ' and story.Iteration_ID=' . $_GET['IID'] . ' and 0=(select count(Parent_Story_ID) from story as p where p.Parent_Story_ID = story.AID) order by story.Iteration_Rank';
$story_Res = mysqli_query($DBConn, $sql);
echo '<ul id="sortable-' . $_GET['LorR'] . '" class="connectedSortable mh15">';
if ($story_Row = mysqli_fetch_assoc($story_Res)) {
    do {
        echo '<li class="storybox" id=story_' . $story_Row['AID'] . '>';
        PrintStory($story_Row);
        echo '</li>';
        $sumpts += $story_Row['Size'];
    } while ($story_Row = mysqli_fetch_assoc($story_Res));
}
echo '</ul>';
echo '{6B89778E-1B36-4E75-A7F2-301656217750}' . $sumpts;