From 9e9858b491cd4fdb1e9e6756a56d8e924434bb58 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Mon, 6 Nov 2017 17:59:59 +0100 Subject: full delete --- src/admin/contest.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/admin/contest.php') diff --git a/src/admin/contest.php b/src/admin/contest.php index 58df217..fda17da 100644 --- a/src/admin/contest.php +++ b/src/admin/contest.php @@ -26,6 +26,37 @@ $localsite=$ct["contestlocalsite"]; $mainsite=$ct["contestmainsite"]; if ($localsite == $mainsite) $main=true; else $main=false; +if($main) { + if (isset($_POST["SubmitDC"]) && $_POST["SubmitDC"] == "Delete ALL clars") { + if ($_POST["confirmation"] == "confirm") { + DBSiteDeleteAllClars ($_SESSION["usertable"]["contestnumber"], -1, + $_SESSION["usertable"]["usernumber"], $_SESSION["usertable"]["usersitenumber"]); + } + ForceLoad("contest.php"); + } + if (isset($_POST["SubmitDR"]) && $_POST["SubmitDR"] == "Delete ALL runs") { + if ($_POST["confirmation"] == "confirm") { + DBSiteDeleteAllRuns ($_SESSION["usertable"]["contestnumber"], -1, + $_SESSION["usertable"]["usernumber"], $_SESSION["usertable"]["usersitenumber"]); + } + ForceLoad("contest.php"); + } + if (isset($_POST["SubmitDT"]) && $_POST["SubmitDT"] == "Delete ALL tasks") { + if ($_POST["confirmation"] == "confirm") { + DBSiteDeleteAllTasks ($_SESSION["usertable"]["contestnumber"], -1, + $_SESSION["usertable"]["usernumber"], $_SESSION["usertable"]["usersitenumber"]); + } + ForceLoad("contest.php"); + } + if (isset($_POST["SubmitDB"]) && $_POST["SubmitDB"] == "Delete ALL bkps") { + if ($_POST["confirmation"] == "confirm") { + DBSiteDeleteAllBkps ($_SESSION["usertable"]["contestnumber"], -1, + $_SESSION["usertable"]["usernumber"], $_SESSION["usertable"]["usersitenumber"]); + } + ForceLoad("contest.php"); + } +} + if (isset($_POST["Submit3"]) && isset($_POST["penalty"]) && is_numeric($_POST["penalty"]) && isset($_POST["maxfilesize"]) && isset($_POST["mainsite"]) && isset($_POST["name"]) && $_POST["name"] != "" && isset($_POST["lastmileanswer"]) && is_numeric($_POST["lastmileanswer"]) && @@ -254,6 +285,11 @@ echo $contest; +

+ + + + -- cgit v1.2.3