From aa5a11907afc7d161e0804b762f5fcd73394897c Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Tue, 2 Sep 2008 08:02:53 +0000 Subject: [PATCH] Event ENDS git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@476 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- event.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/event.inc.php b/event.inc.php index ba443ab7..9a0dba7f 100644 --- a/event.inc.php +++ b/event.inc.php @@ -7,7 +7,7 @@ if ($_POST && !$error) { redirect(substr($SELF, 0, -1), lang('Event has been dropped.')); } } elseif (in_array($_POST["INTERVAL_FIELD"], $intervals)) { - $schedule = " ON SCHEDULE " . ($_POST["INTERVAL_VALUE"] ? "EVERY '" . $mysql->escape_string($_POST["INTERVAL_VALUE"]) . "' $_POST[INTERVAL_FIELD]" : "AT '" . $mysql->escape_string($_POST["EXECUTE_AT"]) . "'"); + $schedule = " ON SCHEDULE " . ($_POST["INTERVAL_VALUE"] ? "EVERY '" . $mysql->escape_string($_POST["INTERVAL_VALUE"]) . "' $_POST[INTERVAL_FIELD]" . ($_POST["STARTS"] ? " STARTS '" . $mysql->escape_string($_POST["STARTS"]) . "'" : "") . ($_POST["ENDS"] ? " ENDS '" . $mysql->escape_string($_POST["ENDS"]) . "'" : "") : "AT '" . $mysql->escape_string($_POST["STARTS"]) . "'"); if ($mysql->query((strlen($_GET["event"]) ? "ALTER EVENT " . idf_escape($_GET["event"]) . $schedule . ($_GET["event"] != $_POST["EVENT_NAME"] ? " RENAME TO " . idf_escape($_POST["EVENT_NAME"]) : "") : "CREATE EVENT " . idf_escape($_POST["EVENT_NAME"]) . $schedule) . " DO $_POST[EVENT_DEFINITION]")) { redirect(substr($SELF, 0, -1), (strlen($_GET["event"]) ? lang('Event has been altered.') : lang('Event has been created.'))); } @@ -29,7 +29,8 @@ if ($_POST) {
- + +
" maxlength="64" />
" />
" />
" />
" />