コード例 #1
0
function oneFilterBuilder($rowData, $columnField)
{
    //Creates the HTML for each filter option. Example : Color --> Navy
    $HTMLBlock = "";
    $HTMLBlock .= "<div class='filterLabel'>";
    $HTMLBlock .= "<label>" . formatData($rowData) . "</label>";
    //Format data capitalize the first letter of each word. Location : PHPScripts/helperFunctions.php
    $HTMLBlock .= "</div>";
    $HTMLBlock .= "<div class='filterCheckBox'>";
    $HTMLBlock .= "<input id='" . $columnField . "_" . formatId($rowData) . "_CheckBox' class='classUncheck' type='checkbox' />";
    $HTMLBlock .= "</div>";
    return $HTMLBlock;
}
コード例 #2
0
ファイル: index.php プロジェクト: Newleatk/ist
    $issues = array();
    if ($r->rowCount() > 0) {
        require_once 'classes/class.user.php';
        require_once 'classes/class.status.php';
        require_once 'classes/class.time.php';
    }
    $priority = array(1 => "trivial", 2 => "very-low", 3 => "low", 4 => "normal", 5 => "high", 6 => "very-high", 7 => "urgent");
    while ($d = $r->fetch()) {
        $issues[formatId($d['id'])] = $d;
        $issues[formatId($d['id'])]['deadline_has_passed'] = $d['deadline'] < time() ? true : false;
        $issues[formatId($d['id'])]['author'] = (new User($d['author']))->informations();
        $issues[formatId($d['id'])]['status'] = $GLOBALS['status_cache'][$d['status']];
        $issues[formatId($d['id'])]['priority'] = $priority[$d['priority']];
        $diff = new time();
        $diff->setDiffTime($d['creation']);
        $issues[formatId($d['id'])]['formated'] = $diff->textTimeDiff();
    }
    $params = $request->query->all();
    $params["show"] = $count;
    $params["page"] = $base_start;
    $params['tag'] = $tag;
    $time = floor((microtime() - $timer) * 100) / 100;
    $time = $time < 0 ? 0 : $time;
    return $app['twig']->render('issues.twig', array("global_start" => IST_BUG_LABEL_START, "show_allowed" => $counts, "time_elapsed" => $time, "issues" => $issues, "issues_count" => $n, "params" => $params));
})->value('tag', 'all')->bind("issues");
/*---------------------------------------------------------------------------------------
------------------------------------ISSUE VIEWING PAGE-----------------------------------
---------------------------------------------------------------------------------------*/
$app->get('/issue/{id}', function (Request $request, $id) use($db, $timer, $app) {
    return "You are viewing issue " . $id . ". Have a nice day";
})->bind("issue");