Example #1
0
<?php

require_once 'code/wfpl/tar.php';
# Unfortunately, I don't know how to set the suggested filename for downloads,
# so you'll have to deal with that yourself.
make_tar('foo', array('foo.txt' => 'foo two three four', 'README' => 'this is a test...', 'Makefile' => 'all: or_nothing'));
Example #2
0
function make_wfpl_tar($dirname, $files)
{
    make_tar($dirname, $files, 'add_wfpl_dir');
}
Example #3
0
function download_tar()
{
    $name = $GLOBALS['form_name'];
    $data = array(".htaccess" => make_htaccess(), "run.php ->" => 'code/wfpl/run.php', "style.css" => read_whole_file('code/wfpl/metaform/style.css'), "{$name}.html" => make_html(), "{$name}.php" => make_php());
    if ($GLOBALS['opt_db'] == 'Yes') {
        $data["{$name}.sql"] = make_sql();
    }
    if ($GLOBALS['opt_email'] == 'Yes') {
        $data["{$name}.email.txt"] = make_email();
    }
    make_tar($name, $data);
}