<?php
$issuesGridValues = array( 
            array ( "issueId" => 1, "closed" => true, "reporterBy" => "Sean Hollander", "assignedTo" => "", "issueContent" => "<span class='issue-content-body'>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</span> <br />Reported by <b>Sean Hollander</b>, 26 month(s) ago", "issueType" => "bug, question" ),
            array ( "issueId" => 2, "closed" => false, "reporterBy" => "Mark Milligan", "assignedTo" => "", "issueContent" => "<span class='issue-content-body'>Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.</span> <br />Reported by <b>Sean Hollander</b>, 26 month(s) ago", "issueType" => "enhancement"  ),
            array ( "issueId" => 3, "closed" => true, "reporterBy" => "You", "assignedTo" => "You", "issueContent" => "<span class='issue-content-body'>Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.</span> <br />Reported by <b>Mark Milligan</b>, 26 month(s) ago", "issueType" => "bug, duplicate"  ),
            array ( "issueId" => 4, "closed" => false, "reporterBy" => "You", "assignedTo" => "Mark Milligan", "issueContent" => "<span class='issue-content-body'>Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.</span> <br />Reported by <b>Sean Hollander</b>, 26 month(s) ago", "issueType" => "feature, enhancement"  ),
            array ( "issueId" => 5, "closed" => true, "reporterBy" => "You", "assignedTo" => "You", "issueContent" => "<span class='issue-content-body'>Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit ame, wisi.</span> <br />Reported by <b>Mark Milligan</b>, 26 month(s) ago", "issueType" => "duplicate"  ),
            array ( "issueId" => 6, "closed" => false, "reporterBy" => "You", "assignedTo" => "Sean Hollander", "issueContent" => "<span class='issue-content-body'>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.</span> <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "bug"  ),
            array ( "issueId" => 7, "closed" => true, "reporterBy" => "Mark Milligan", "assignedTo" => "", "issueContent" => "<span class='issue-content-body'>Donec non enim in turpis pulvinar facilisis.</span> <br />Reported by <b>Mark Milligan</b> 26 month(s) ago", "issueType" => "notconfirmed"  ),
            array ( "issueId" => 8, "closed" => false, "reporterBy" => "Mark Milligan", "assignedTo" => "You", "issueContent" => "<span class='issue-content-body'>Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat.</span> <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "bug, invalid"  ),
            array ( "issueId" => 9, "closed" => true, "reporterBy" => "You", "assignedTo" => "You", "issueContent" => "<span class='issue-content-body'>Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus. </span><br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "bug"  ),
            array ( "issueId" => 10, "closed" => false, "reporterBy" => "Sean Hollander", "assignedTo" => "Mark Milligan", "issueContent" => "<span class='issue-content-body'>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</span> <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "feature, enhancement"  ),
            array ( "issueId" => 11, "closed" => false, "reporterBy" => "Sean Hollander", "assignedTo" => "You", "issueContent" => "<span class='issue-content-body'>Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.</span> <br />Reported by <b>Mark Milligan</b> 26 month(s) ago", "issueType" => "notconfirmed" ),
            array ( "issueId" => 12, "closed" => true, "reporterBy" => "You", "assignedTo" => "You", "issueContent" => "<span class='issue-content-body'>Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.</span> <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "feature, enhancement"  ),
            array ( "issueId" => 13, "closed" => true, "reporterBy" => "You", "assignedTo" => "You", "issueContent" => "<span class='issue-content-body'>Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.</span> <br />Reported by <b>Mark Milligan</b> 26 month(s) ago", "issueType" => "bug, duplicate"  ),
            array ( "issueId" => 14, "closed" => true, "reporterBy" => "Mark Milligan", "assignedTo" => "Sean Hollander", "issueContent" => "<span class='issue-content-body'>Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.</span> <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "feature"  ),
            array ( "issueId" => 15, "closed" => false, "reporterBy" => "Mark Milligan", "assignedTo" => "You", "issueContent" => "<span class='issue-content-body'>Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.</span> <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "bug, question"  ),
            array ( "issueId" => 16, "closed" => false, "reporterBy" => "You", "assignedTo" => "Mark Milligan", "issueContent" => "<span class='issue-content-body'>Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "feature"  ),
            array ( "issueId" => 17, "closed" => false, "reporterBy" => "Sean Hollander", "assignedTo" => "You", "issueContent" => "<span class='issue-content-body'>Donec non enim in turpis pulvinar facilisis.</span> <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "bug"  ),
            array ( "issueId" => 18, "closed" => true, "reporterBy" => "Sean Hollander", "assignedTo" => "", "issueContent" => "<span class='issue-content-body'>Ut felis. Praesent dapibus , neque id cursus faucibus, <b>tortor neque egestas augue, eu vulputate magna eros eu erat.</span> <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "bug, question"  ),
            array ( "issueId" => 19, "closed" => true, "reporterBy" => "You", "assignedTo" => "Sean Hollander", "issueContent" => "<span class='issue-content-body'>Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.</span> <br />Reported by <b>Sean Hollander</b> 26 month(s) ago", "issueType" => "bug, question"  ),
         );

$milestonesGridValues = array( 
            array ( "milestoneId" => 1, "closed" => false, "milestoneContent" => "Pellentesque   turpis egestas.", "milestoneDate" => "03/11/2016" ),
            array ( "milestoneId" => 2, "closed" => false, "milestoneContent" => "Vestibul or sit amet, ante.", "milestoneDate" => "03/15/2016"  ),
            array ( "milestoneId" => 3, "closed" => true, "milestoneContent" => "Donec eu lib vitae est.", "milestoneDate" => "03/16/2016"  ),
            array ( "milestoneId" => 4, "closed" => false, "milestoneContent" => "Mauris placerat eleifend leo. Quisque haretra.", "milestoneDate" => "03/18/2016"  ),
            array ( "milestoneId" => 5, "closed" => true, "milestoneContent" => "Vestibulum erat wisi, wisi.", "milestoneDate" => "22/03/2016"  ),
            array ( "milestoneId" => 6, "closed" => false, "milestoneContent" => "Aenean fermentum, elit eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.", "milestoneDate" => "03/24/2016"  ),
            array ( "milestoneId" => 7, "closed" => true, "milestoneContent" => "Donec non enim in turpis pulvinar facilisis.", "milestoneDate" => "03/30/2016"  )
);

switch ($_GET['usedwidget']) {
    case 'issuesgrid':
        $response = $issuesGridValues;
        break;
    case 'milestonesgrid':
        $response = $milestonesGridValues;
        break;
    default:
       trigger_error("Missing/Invalid category", E_USER_ERROR);
}

echo json_encode($response);
?>