コード例 #1
0
ファイル: index.php プロジェクト: TimeDoctor/openal-website
function welcome_here()
{
    if (!is_authorized_vendor()) {
        // This means you don't have Basic Auth in place, probably.
        write_error("You shouldn't be here!");
        return false;
    }
    // if
    return true;
}
コード例 #2
0
ファイル: icculux.php プロジェクト: TimeDoctor/openal-website
function render_footer()
{
    // !!! FIXME: need more here, I guess.
    echo "<hr>\n";
    if (is_authorized_vendor()) {
        echo "<i>Logged in as: {$_SERVER['REMOTE_USER']}\n";
        echo "(<a href='{$_SERVER['PHP_SELF']}?operation=op_changepw'>";
        echo "change password</a>)\n";
        echo "(<a href='{$_SERVER['PHP_SELF']}?operation=op_addvendor'>";
        echo "add a new login</a>)</i><br>\n";
    }
    // if
    echo "</body></html>\n";
}
コード例 #3
0
function do_showext($extname)
{
    $sqlextname = db_escape_string($extname);
    $sql = "select * from alextreg_extensions" . " where extname='{$sqlextname}'";
    if (!is_authorized_vendor()) {
        $sql .= " and (public=1)";
    }
    $query = do_dbquery($sql);
    if ($query == false) {
        return;
    } else {
        if (db_num_rows($query) == 0) {
            write_error('No such extension.');
        } else {
            // just in case there's more than one for some reason...
            while (($row = db_fetch_array($query)) != false) {
                show_one_extension($row);
            }
        }
    }
    // else
    db_free_result($query);
}