diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-11-06 16:59:59 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-11-06 16:59:59 +0000 |
| commit | 9e9858b491cd4fdb1e9e6756a56d8e924434bb58 (patch) | |
| tree | 097204bc346fd5f4a2a47162117c0d9b3af73ec3 /src/admin/contest.php | |
| parent | 91dd62a41e4543e90b723e767f74552d01e4381c (diff) | |
| download | boca-9e9858b491cd4fdb1e9e6756a56d8e924434bb58.tar.gz boca-9e9858b491cd4fdb1e9e6756a56d8e924434bb58.zip | |
full delete
Diffstat (limited to 'src/admin/contest.php')
| -rw-r--r-- | src/admin/contest.php | 36 |
1 files changed, 36 insertions, 0 deletions
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; <input type="submit" name="Submit3" value="Update" onClick="conf()"> <input type="submit" name="Submit3" value="Update Contest and All Sites" onClick="conf2()"> <input type="reset" name="Submit4" value="Clear"> +<br><br> + <input type="submit" name="SubmitDC" value="Delete ALL clars" onClick="conf2()"> + <input type="submit" name="SubmitDR" value="Delete ALL runs" onClick="conf2()"> + <input type="submit" name="SubmitDT" value="Delete ALL tasks" onClick="conf2()"> + <input type="submit" name="SubmitDB" value="Delete ALL bkps" onClick="conf2()"> <?php } else { ?> <input type="submit" name="Submit3" value="Update" onClick="conf()"> <input type="submit" name="Submit3" value="Become Main Site" onClick="conf3()"> |