Exemple #1
0
$allboardmembers = array(array("55fa6e5e938f433370d23bee", "0c87cc12e39c5380e132254b256996ee", "Gaelle", "gaelle94", "Gaelle"), array("52af2930541e94e652004b97", "85b7e13aa45f7e6d37fd6de7b5c45b6d", "Chris Dugne", "chrisdugne", "Chris"), array("563785a574b325ce5a2be94e", "a74f7b712ccfbca67e32fbfac1d6e7b7", "Eric Sampaio", "ericsampaio4", "Eric"), array("55faabb71fe9809f1bce6d07", "4cef9517087083d70cc068cbdae2e526", "Jeroen Engels", "jeroenengels", "Jeroen"), array("5609074552d59cd5ceb8c4c7", "1b272b008df77f21d0ae2ac91b8e9e64", "Thibaut Lambert", "t1b0", "Thibaut"), array("55fa7aac7d53f052afdbe763", "786a7ad823c02255c6773a0b54376f9c", "Arthur Weber", "goduuu", "Arthur"), array("55ed4db9b0a1d88b74782bed", "667cede4e2f5bc4a50c477622d95368f", "Loïc Calvy", "loiccalvy1", "Loic"), array("561276d36f767ef609f437b8", "28be9bea97879575a5a542491b1036fe", "Matthieu Harbonnier", "matthieuharbonnier", "Matthieu"));
echo "<div id='namelisting'><ul class='namelistingul'>";
foreach ($allboardmembers as $userlisting) {
    echo "<li class='namelistingli'><a href='#" . $userlisting[0] . "'>" . $userlisting[4] . "</a></li>";
}
echo "</ul></div>";
echo "<div id='memberactivitypagecontent'>";
foreach ($allboardmembers as $user) {
    // Get a member id
    echo "<div id='memberactivity'>";
    echo "<div id='fullusername'><a name=" . $user[0] . ">" . $user[2] . "</div>";
    echo "<img class='avatar' src='https://trello-avatars.s3.amazonaws.com/" . $user[1] . "/170.png'>";
    echo "<div id='username'>@" . $user[3] . "</div>";
    // Get all cards related to member id
    $urlapicardstoamember = cardsmemberurl($user[0]);
    $cardsassociatedtomember = json_decode(fetchdataonapi($urlapicardstoamember));
    foreach ($cardsassociatedtomember as $cardsmember) {
        if ($cardsmember->list->name == "In Progress") {
            echo "<div id='cardbox'>";
            echo "<div id='lastactivity'>Since " . datetreatmentlight($cardsmember->dateLastActivity) . "</div>";
            echo "<div id='cardstatus' style='background-color:#A9F5BC'>" . $cardsmember->list->name . "</div>";
            echo "<div id='cardtitle'>" . $cardsmember->name . "</div>";
            echo "<div id='githublink'><a href='" . $cardsmember->attachments[0]->url . "' target=_blank>GitHub issue</a></div>";
            foreach ($cardsmember->attachments as $allcardlinks) {
                $nbrofattachments = $nbrofattachments + 1;
            }
            echo "<div id='githublastpr'><a href='" . $cardsmember->attachments[$nbrofattachments - 1]->url . "' target=_blank>Latest PR </a></div>";
            $nbrofattachments = 0;
            echo "<div id='othermemberoncard'>Also with : ";
            foreach ($cardsmember->members as $allmembersoncard) {
                if ($allmembersoncard->id != $user[0]) {
Exemple #2
0
	<!-- TO BE REMOVED WHEN CSS DONE -->
	<br><br><br><br>
	<!-- ## -->
	<h5>Sprint dates have not been set :</h5>
	<form method='POST' action='./form.php'>
		<input type='text' name='begindate' placeholder='yyyy-mm-dd'>
		<input type='text' name='enddate' placeholder='yyyy-mm-dd'>
		<input type='submit' value='Submit'>
	</form>
	
	<?php 
} else {
    //File deletion
    unlink("./" . $newfoldername . "/" . $newfoldername . '.json');
    #File creation into folder
    file_put_contents("./" . $newfoldername . "/" . $newfoldername . '.json', fetchdataonapi($boardlistsandcards));
    //WHEN ALL DATA HAVE BEEN CATCHED FROM TRELLO DO THE FOLLOWING
    $graphdata = array('date' => array(), 'totpointrem' => array(), 'totpointboard' => array(), 'pointdone' => array(), 'realpointdone' => array());
    $directory = './';
    $filesindir = scandir($directory, 1);
    //print_r($filesindir);
    $index = 0;
    $workingdaycounter = 0;
    foreach ($filesindir as $key => $foldername) {
        if (strpos($foldername, '2015') !== false or strpos($foldername, '2016') !== false) {
            $index = $index + 1;
            //IN CASE OF SATURDAY OR SUNDAY => NOT PART OF PRODUCTION PLANNING (used in graph edition)
            if (date('w', strtotime($foldername)) != 6) {
                if (date('w', strtotime($foldername)) != 0) {
                    $workingdaycounter = $workingdaycounter + 1;
                } else {
Exemple #3
0
    echo "<div id='subtopbar'><center><h2>Cards candidates for next sprint</h2> Last update at " . date(H . '\\h' . i . '\\m' . s . '\\s') . "</center></div>";
    ?>
<div id="pagecontent">
	<div id="table">
		
<form method='POST' action='index.php'>
	<input type='submit' name='printfunction' value='Save a JSON copy'>
</form>

<?php 
    if (!empty($_POST['printfunction'])) {
        #Folder creation
        $now = date(Ymd_His);
        mkdir("./history/" . $now, 0700);
        #File creation into folder
        file_put_contents("./history/" . $now . '/' . $now . '_nextsprintcandidates.json', fetchdataonapi($boardlist));
        echo "A copy of the file has been created";
    }
    ?>

<table id="tablecontainer"><tr>
<?php 
    foreach ($obj as $list) {
        if (strpos($list->name, 'BACK') !== false) {
            echo "<td><table>";
            foreach ($list->cards as $singlecard) {
                $numberofback++;
                $complexityaddback = $complexityaddback + fetchcomplexity($singlecard->name);
                echo "<tr><td width='25px' align='right'>" . $numberofback . " • </td>";
                echo "<td><font color=#4d4d4d>" . $singlecard->name . "</font></td></tr>";
            }
Exemple #4
0
<?php

include '../includes/functions.php';
echo htmlheader("Trellowup • Card detail", "../includes/main.css");
echo topbar(".");
$cardid = $_GET['card'];
$cardlife = "https://api.trello.com/1/cards/" . $cardid . "/actions?filter=moveCardToBoard,updateCard:idList&limit=300&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e";
?>



<?php 
if (!empty(fetchdataonapi($cardlife))) {
    $obj = json_decode(fetchdataonapi($cardlife));
    echo "<div id='subtopbar'><center><h2>" . $obj[0]->data->card->name . "</h2>Last update at " . date(H . '\\h' . i . '\\m' . s . '\\s') . "</center></div>";
    ?>
<div id="pagecontent">
	<div id="table1">
<table>

	<tr align='center'>
		<td width='120px'></td>
		<td width='150px'><b>TO DO</b></td>
		<td width='150px'><b>IN PROGRESS</b></td>
		<td width='150px'><b>TO REVIEW</b></td>
		<td width='150px'><b>TO TEST</b></td>
		<td width='150px'><b>DONE</b></td>
	</tr>

<?php 
    foreach ($obj as $eventcard) {
<?php

header("Refresh:300");
//check history every 5 minutes
include './includes.php';
#########Cron check########
// $time = date(j.'\-'.m.'\-'.Y.'\-'.G.'\-'.i);
// fopen($time.".txt", "w+");
###################### Fetching data from API #####################
$ligue1fixtures = "http://api.football-data.org/v1/soccerseasons/396/fixtures/";
//Ligue1
//$ligue1fixtures="http://api.football-data.org/v1/soccerseasons/405/fixtures/";//ChampionsLeague
//$ligue1fixtures="http://api.football-data.org/v1/soccerseasons/398/fixtures/";//PremierLeague
//$ligue1fixtures="http://api.football-data.org/v1/soccerseasons/399/fixtures/";//PrimeraDivision
$l1fix = json_decode(fetchdataonapi($ligue1fixtures));
$currentday = date('Y-m-d');
echo "Today is : " . $currentday . "<br>";
$currentdayprep = str_replace('-', '/', $currentday);
$yesterday = date('Y-m-d', strtotime($currentdayprep . "-1 days"));
echo "Yesterday was : " . $yesterday . "<br>";
$currenttime = date('H:i');
$index = 0;
$gamelist = array('gamefakeid' => array(), 'journey' => array(), 'hometeam' => array(), 'scorehome' => array(), 'awayteam' => array(), 'scoreaway' => array());
//echo retrievehour("2015-11-04T19:45:00Z")."<br>";
//echo $currenttime."<br>";
foreach ($l1fix->fixtures as $l1game) {
    //Condition #1 => Date is <= Today's date
    if (retrievedate($l1game->date) == $currentday or retrievedate($l1game->date) == $yesterday) {
        //Condition #2 => Game's hour + 1h55 (10' to be safe) is <= server hour
        //CONDITION TO BE IMPLEMENTED HERE once Cron will be operational
        //Not needed
Exemple #6
0
    echo "<div id='firstform'><b>Please select a list : </b><br><br>";
    echo "<form action='./' method='POST'><select name='listid'>";
    foreach ($listid as $listchoices => $value1) {
        echo "<option value='" . $value1 . "'>" . $listchoices . "</option>";
    }
    echo "</select>";
    echo "<input type='hidden' name='listselected' value='true'>";
    echo "<center><input type='submit' value='Validate' class='validatebutton'></center></form></div>";
}
if (isset($_POST['listid'])) {
    // ################ 2nd form ################
    echo "<div id='secondform'><b>Name of the list previously selected :</b> " . array_search($_POST['listid'], $listid) . "<br>";
    echo "<br><form action='./generatefile.php' method='post' id ='frm2'>";
    echo "<input type='hidden' name='namelistselected' value='" . array_search($_POST['listid'], $listid) . "'>";
    if (!empty(fetchdataonapi($boardcards))) {
        $obj = json_decode(fetchdataonapi($boardcards));
        foreach ($obj as $card) {
            if ($card->idList == $_POST['listid']) {
                $id = $id + 1;
                echo "<input type='checkbox' name='card" . $id . "'' value='(@" . $memberid[$card->members[1]->id] . ") • " . $card->name . "'> <a href='" . $card->url . "' target='_blank'>" . $card->name . "</a><br>";
            }
        }
        echo "<br><input type='checkbox' name='checkall' onclick='checkedAll(frm2);'> <b>SELECT ALL CARDS</b>";
    } else {
        echo "Something wrong with the network.";
    }
    echo "<center><input type='submit' value='Generate a .txt file' class='validatebutton'></form><br><br><a href='./'>Back to list choice</a></center></div>";
}
?>
</div><!-- div pagecontent -->
</body>
Exemple #7
0
<?php

header("Refresh:120");
//check history every 2 minutes
include './includes/functions.php';
$datepickedup = pickurldate();
echo htmlheader("Follo • Dashboard", "./includes/main.css");
echo topbar(".");
$cardevents = "https://api.trello.com/1/boards/561228dc16f33267799133c3/actions?filter=updateCard,moveCardToBoard,createCard,deleteCard&limit=500&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e";
if (!empty(fetchdataonapi($cardevents))) {
    $obj = json_decode(fetchdataonapi($cardevents));
    echo "<div id='subtopbar'><center><h2>Dashboard : " . $obj[0]->data->board->name . "</h2> Last update at " . date(H . '\\h' . i . '\\m' . s . '\\s') . "<br><br>• ";
    displaycalendar();
    echo "</center></div>";
    ?>
<div id="pagecontent">
	<img id="loader" src="./includes/img/infinity.gif"/>;
	<div id="table">
		<table border="0" id="tablecontainer">
<?php 
    foreach ($obj as $event) {
        $numberofapireturn = $numberofapireturn + 1;
        if (findadate($event->date, $datepickedup[0], $datepickedup[1], $datepickedup[2]) == 1) {
            if ($event->type == "updateCard") {
                if (isset($event->data->listAfter)) {
                    $updateCardCounter = $updateCardCounter + 1;
                    echo "<tr bgcolor='#DDF0ED'><td><img width='17px' height='17px' src='./includes/img/moved.png'></td>";
                    echo "<td align='center' width='120px'>" . datetreatment($event->date) . "</td>";
                    echo "<td align='right' width='120px'><b>" . $event->memberCreator->fullName . "</b></td>";
                    echo "<td width='500px'><a href=https://trello.com/c/" . $event->data->card->shortLink . " target=_blank>" . $event->data->card->name . "</a></td>";
                    echo "<td align='center' width='130px'><b>From</b> : " . $event->data->listBefore->name . "</td>";