Пример #1
0
							<?php 
    foreach (isset($config['cert']) ? $config['cert'] : array() as $cert) {
        $selected = "";
        $caname = "";
        $inuse = "";
        $revoked = "";
        if (isset($cert['caref'])) {
            $ca = lookup_ca($cert['caref']);
            if (!empty($ca)) {
                $caname = " (CA: {$ca['descr']})";
            }
        }
        if (isset($pconfig['certref']) && $pconfig['certref'] == $cert['refid']) {
            $selected = "selected=\"selected\"";
        }
        if (isset($cert['refid']) && cert_in_use($cert['refid'])) {
            $inuse = " *In Use";
        }
        if (is_cert_revoked($cert)) {
            $revoked = " *Revoked";
        }
        ?>
								<option value="<?php 
        echo $cert['refid'];
        ?>
" <?php 
        echo $selected;
        ?>
><?php 
        echo $cert['descr'] . $caname . $inuse . $revoked;
        ?>
Пример #2
0
												<?php 
        foreach ($config['cert'] as $cert) {
            $selected = "";
            $caname = "";
            $inuse = "";
            $revoked = "";
            if (isset($cert['caref'])) {
                $ca = lookup_ca($cert['caref']);
                if (!empty($ca)) {
                    $caname = " (CA: {$ca['descr']})";
                }
            }
            if ($pconfig['certref'] == $cert['refid']) {
                $selected = "selected=\"selected\"";
            }
            if (cert_in_use($cert['refid'])) {
                $inuse = " *In Use";
            }
            if (is_cert_revoked($cert)) {
                $revoked = " *Revoked";
            }
            ?>
													<option value="<?php 
            echo htmlspecialchars($cert['refid']);
            ?>
" <?php 
            echo $selected;
            ?>
><?php 
            echo htmlspecialchars($cert['descr'] . $caname . $inuse . $revoked);
            ?>
Пример #3
0
function build_cert_list()
{
    global $a_cert;
    $list = array('' => 'None (Username and/or Password required)');
    foreach ($a_cert as $cert) {
        $caname = "";
        $inuse = "";
        $revoked = "";
        $ca = lookup_ca($cert['caref']);
        if ($ca) {
            $caname = " (CA: {$ca['descr']})";
        }
        if ($pconfig['certref'] == $cert['refid']) {
            $selected = "selected=\"selected\"";
        }
        if (cert_in_use($cert['refid'])) {
            $inuse = " *In Use";
        }
        if (is_cert_revoked($cert)) {
            $revoked = " *Revoked";
        }
        $list[$cert['refid']] = $cert['descr'] . $caname . $inuse . $revoked;
    }
    return $list;
}