Ejemplo n.º 1
0
function pfinish()
{
    echo "</body>\n";
    echo "</html>\n";
    do_commit();
    exit;
}
Ejemplo n.º 2
0
function handle_commit_req()
{
    global $enable_stats, $author;
    echo html_header_message('checking, before doing commit...');
    echo html_form_start();
    $status = get_status(true, false, false);
    if ($status['hash'] != $_POST['statushash']) {
        error('something changed in the directory and/or repository, not doing any changes ! Sorry');
    } else {
        do_commit($_POST['commit_message'], $author);
        $max = count($_POST['filename']);
        for ($i = 0; $i < $max; $i++) {
            echo html_js_remove_container($status['lines'][$i]['prefix']);
        }
        $status = get_status();
    }
    view_result($status);
}
Ejemplo n.º 3
0
    redirect("index.php");
}
if ($edit == 2) {
    if ($id == 0) {
        $q = query("select nextval('seq') as seq");
        $r = fetch($q);
        $id = 0 + $r->seq;
        $stmt = sprintf("insert into comps (id) values (%d)", $id);
        query($stmt);
    }
    $t = array();
    foreach ($cols as $col) {
        if ($arg[$col] == null) {
            $t[] = sprintf("%s = null", $col);
        } else {
            $t[] = sprintf("%s = '%s'", $col, h($arg[$col]));
        }
    }
    $t[] = sprintf("bandwidth = 'high'");
    $stmt = sprintf("update comps set %s where id = %d", join(",", $t), $id);
    query($stmt);
    $t = sprintf("edit.php?id=%d", $id);
    do_commit();
    redirect($t);
}
echo "<table class='twocol'>\n";
echo $rows;
echo "<tr><th></th><td><input type='submit' value='Save' /></td></tr>\n";
echo "</table>\n";
echo "</form>\n";
pfinish();
Ejemplo n.º 4
0
function pfinish()
{
    global $head, $before_container, $body, $after_container;
    echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0" . " Transitional//EN'" . " 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n";
    echo "<html xmlns='http://www.w3.org/1999/xhtml'>\n";
    echo "<head>\n";
    echo $head;
    echo "</head>\n";
    echo "<body>\n";
    echo $before_container;
    echo "<div class='container'>\n";
    echo $body;
    echo "</div>\n";
    echo $after_container;
    echo "</body>\n";
    echo "</html>\n";
    do_commit();
    exit;
}