Exemplo n.º 1
0
        foreach ($headings as $field => $head) {
            print '<th><a href="' . $PHP_SELF . '?sortfield=' . $field . '&ascdec=A&' . $qstr_filter . '" title="Click to sort by this column."><u>' . $head . '</u></a>';
            if ($sortfield == $field) {
                print '&nbsp<a href="' . $PHP_SELF . '?sortfield=' . $field . '&ascdec=' . $ht_ascdec . '&' . $qstr_filter . '" >' . '<img src=' . $arrow_gif . ' height=12 alt=\'Change sort order.\' title=\'Click to reverse sort order.\'></a>';
            }
            print '</th>';
        }
        print '<th><a href="" title="Pick an action to perform to certificate.">Action</a></th>';
        print '</tr>';
        $x = "^[{$show_valid}{$show_revoked}{$show_expired}]";
        if (in_array($PHPki_user, $PHPki_admins)) {
            $x = "{$x}.*{$search}";
        } else {
            $x = "{$x}.*{$search}.*{$PHPki_user}|{$x}.*{$PHPki_user}.*{$search}";
        }
        $db = csort(CAdb_to_array($x), $sortfield, $ascdec == 'A' ? SORT_ASC : SORT_DESC);
        $stcolor = array('Valid' => 'green', 'Revoked' => 'red', 'Expired' => 'orange');
        foreach ($db as $rec) {
            print '<tr style="font-size: 11px;">
			 <td><font color=' . $stcolor[$rec['status']] . '><b>' . $rec['status'] . '</b></font></td>
			 <td style="white-space: nowrap">' . $rec['issued'] . '</td>
			 <td style="white-space: nowrap">' . $rec['expires'] . '</td>
			 <td>' . $rec['common_name'] . '</td>
			 <td style="white-space: nowrap">
				<a href="mailto:' . htvar($rec['common_name']) . ' <' . htvar($rec['email']) . '>" >' . htvar($rec['email']) . '</a>
			 </td>
			 <td>' . htvar($rec['organization']) . '</td>
			 <td>' . htvar($rec['unit']) . '</td>
			 <td>' . htvar($rec['locality']) . '</td>
			 <td><a href="' . $PHP_SELF . '?stage=display&serial=' . $rec['serial'] . '" target="_certdisp">' . '<img src="../images/display.png" alt="Display" title="Display complete certificate details."></a>';
            if ($rec['status'] == 'Valid') {
Exemplo n.º 2
0
    echo "<td bgcolor=#C0C0C0 width={$sizecolumn} align=center><font color=#000000><a href=\"index.php?st=3\"><u><b> File Size </b></u></a></font></td>\n";
    $k++;
}
echo "</tr><tr>";
$handle = opendir($filedir);
while (false !== ($file = readdir($handle))) {
    if ($file != "." && $file != "..") {
        $filename[$i][1] = $file;
        $filename[$i][2] = date("m/d/y", filemtime($filedir . $file));
        $filename[$i][3] = round(filesize($filedir . $file) / 1024);
        ++$i;
    }
}
closedir($handle);
// Sorting --------------------------------------------
$filename_sorted = csort($filename, $st);
// End of Sorting -------------------------------------
while ($m < count($filename)) {
    echo "<td bgcolor=#C0C0EF width={$namecolumn}><a href=\"{$filedir}" . $filename_sorted[$m][1] . "\"><font color=#000000>" . $filename_sorted[$m][1] . "<font></a><br></td>\n";
    echo "<td bgcolor=#C0C0EF width={$datecolumn} align=center><font color=#000000>";
    echo $filename_sorted[$m][2] . "</font></td>";
    echo "<td bgcolor=#C0C0EF width={$sizecolumn}  align=right><font color=#000000>";
    echo $filename_sorted[$m][3] . " KB ";
    echo "</font></td>";
    ++$j;
    if ($j == $columns) {
        echo "</tr><tr>";
        $j = 0;
    }
    $m++;
}
Exemplo n.º 3
0
$handle = opendir($filedir);
while (false !== ($file = readdir($handle))) {
    if ($file != "." && $file != "..") {
        //$filename[$i][1] = $file;
        //$filename[$i][2] = date ("m/d/y", filemtime($filedir.$file));
        //$filename[$i][3] = round(filesize($filedir.$file)/1024);
        $filename[$i][1] = $file;
        $filename[$i][2] = filemtime($filedir . $file);
        //date ("m/d/y", filemtime($filedir.$file));
        $filename[$i][3] = round(filesize($filedir . $file) / 1024);
        ++$i;
    }
}
closedir($handle);
// Sorting --------------------------------------------
$filename_sorted = csort($filename, $order, $st);
// End of Sorting -------------------------------------
while ($m < count($filename)) {
    echo "<td bgcolor=#C0C0EF width={$namecolumn}><a href=\"{$filedir}" . $filename_sorted[$m][1] . "\"><font color=#000000>" . $filename_sorted[$m][1] . "<font></a><br></td>\n";
    echo "<td bgcolor=#C0C0EF width={$datecolumn} align=center><font color=#000000>";
    echo date("m/d/y", $filename_sorted[$m][2]) . "</font></td>";
    echo "<td bgcolor=#C0C0EF width={$sizecolumn}  align=right><font color=#000000>";
    echo $filename_sorted[$m][3] . " KB ";
    echo "</font></td>";
    ++$j;
    if ($j == $columns) {
        echo "</tr><tr>";
        $j = 0;
    }
    $m++;
}