Exemplo n.º 1
0
function linkcell($dictionary, $release, $platform, $alt = '')
{
    global $get_attr;
    if (!$release) {
        $unsupported = $dictionary->{$get_attr}('unsupported');
        if (preg_match("/{$platform}/", $unsupported)) {
            echo '<td>u</td>';
        } else {
            echo '<td>-</td>';
        }
        return;
    }
    $url = $release->{$get_attr}('URL');
    echo '<td bgcolor="' . status2color($dictionary->{$get_attr}('status')) . '"><a href="' . htmlentities($url) . '" target="_top"';
    if (isset($alt)) {
        echo ' title="' . $alt . '"';
    }
    echo '>';
    printf("%2.2f", $release->{$get_attr}('size') / pow(2, 20));
    echo "</a></td>\n";
}
Exemplo n.º 2
0
{
    $r = array();
    foreach ($nodelist as $n) {
        array_push($r, $n);
    }
    return $r;
}
$ds = $have_php5 ? nodelist2array($freedict_database->getElementsByTagName('dictionary')) : $fddb_docel->get_elements_by_tagname('dictionary');
usort($ds, "cmp");
$dscount = 0;
$hwsum = 0;
foreach ($ds as $d) {
    $dscount++;
    list($l1, $l2) = split('-', $d->{$get_attr}('name'));
    $status = $d->{$get_attr}('status');
    echo '<tr bgcolor="' . status2color($status) . '">';
    echo '<td>';
    $source = $d->{$get_attr}('sourceURL');
    if ($source) {
        echo '<a href="' . htmlentities($source) . '" target="_top">';
    }
    echo _(langcode2english($l1)) . ' -&gt; ' . _(langcode2english($l2));
    if ($source) {
        echo '</a>';
    }
    echo '</td>';
    $maintainer = $d->{$get_attr}('maintainerName');
    if ($maintainer == '') {
        $maintainer = '-';
    }
    echo '<td>' . $maintainer . '</td>';
Exemplo n.º 3
0
function cell($status, $description)
{
    echo ' <tr><td bgcolor="' . status2color($status) . '">';
    echo "{$description}</td></tr>\n";
}