</button>
                    </div>
                    <div class="col-sm-4 control-label"><?php 
    echo T_('play/.htaccess exists?');
    ?>
</div>
                    <div class="col-sm-8"><?php 
    echo debug_result(is_readable($htaccess_play_file));
    ?>
</div>
                    <div class="col-sm-4 control-label"><?php 
    echo T_('play/.htaccess configured?');
    ?>
</div>
                    <div class="col-sm-8"><?php 
    echo debug_result(install_check_rewrite_rules($htaccess_play_file, $web_path_guess));
    ?>
</div>
                <?php 
}
?>

                <div class="col-sm-4">&nbsp;</div><div class="col-sm-8">&nbsp;</div>
                <div class="col-sm-4">
                    <?php 
echo T_('config/ampache.cfg.php action');
?>
                </div>
                <div class="col-sm-8">
                    <button type="submit" class="btn btn-warning" name="download"><?php 
echo T_('Download');
示例#2
0
function install_rewrite_rules($file, $web_path, $download)
{
    $final = install_check_rewrite_rules($file, $web_path, true);
    if (!$download) {
        if (!file_put_contents($file, $final)) {
            Error::add('general', T_('Error writing config file'));
            return false;
        }
    } else {
        $browser = new Horde_Browser();
        $browser->downloadHeaders(basename($file), 'text/plain', false, strlen($final));
        echo $final;
        exit;
    }
    return true;
}