Exemplo n.º 1
0
function show_source_select()
{
    echo '<div class="form-group">
        <label for="source_id">Source:</label>
        <select name=source_id>
        <option value=0> All
    ';
    $sources = source_enum();
    foreach ($sources as $source) {
        echo "<option value={$source->id}> {$source->name}\n";
    }
    echo '</select>
        </div>
    ';
}
Exemplo n.º 2
0
<?php

// CLI script to show sources (including their authenticators)
require_once "hera_util.inc";
require_once "hl_db.inc";
init_db(get_server_config());
$sources = source_enum();
foreach ($sources as $source) {
    print_r($source);
}