Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (31 sloc) 1.118 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
<?php
$SEQUENCE = $_GET["sequence"];

if ($_POST && !$error) {
$link = substr(ME, 0, -1);
$name = trim($_POST["name"]);
if ($_POST["drop"]) {
query_redirect("DROP SEQUENCE " . idf_escape($SEQUENCE), $link, lang('Sequence has been dropped.'));
} elseif ($SEQUENCE == "") {
query_redirect("CREATE SEQUENCE " . idf_escape($name), $link, lang('Sequence has been created.'));
} elseif ($SEQUENCE != $name) {
query_redirect("ALTER SEQUENCE " . idf_escape($SEQUENCE) . " RENAME TO " . idf_escape($name), $link, lang('Sequence has been altered.'));
} else {
redirect($link);
}
}

page_header($SEQUENCE != "" ? lang('Alter sequence') . ": " . h($SEQUENCE) : lang('Create sequence'), $error);

$row = $_POST;
if (!$row) {
$row = array("name" => $SEQUENCE);
}
?>

<form action="" method="post">
<p><input name="name" value="<?php echo h($row["name"]); ?>">
<input type="submit" value="<?php echo lang('Save'); ?>">
<?php
if ($SEQUENCE != "") {
echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n";
}
?>
<input type="hidden" name="token" value="<?php echo $token; ?>">
</form>
Something went wrong with that request. Please try again.