diff options
Diffstat (limited to 'boca-1.5.1/src/team/run.php')
| -rw-r--r-- | boca-1.5.1/src/team/run.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/boca-1.5.1/src/team/run.php b/boca-1.5.1/src/team/run.php index 51afc75..3879674 100644 --- a/boca-1.5.1/src/team/run.php +++ b/boca-1.5.1/src/team/run.php @@ -132,6 +132,7 @@ $strtmp .= "<br><br><center><b>To submit a program, just fill in the following f " <td width=\"75%\">\n". " <select name=\"problem\" onclick=\"Arquivo()\">\n"; $prob = DBGetProblems($_SESSION["usertable"]["contestnumber"],$_SESSION["usertable"]["usertype"]=='judge'); +$strtmp .= "<option value=\"-1\"></option>\n"; for ($i=0;$i<count($prob);$i++) $strtmp .= "<option value=\"" . $prob[$i]["number"] . "\">" . $prob[$i]["problem"] . "</option>\n"; $strtmp .= " </select>\n". @@ -142,6 +143,7 @@ $strtmp .= " </select>\n". " <td width=\"75%\"> \n". " <select name=\"language\" onclick=\"Arquivo()\">\n"; $lang = DBGetLanguages($_SESSION["usertable"]["contestnumber"]); +$strtmp .= "<option value=\"-1\"></option>\n"; for ($i=0;$i<count($lang);$i++) $strtmp .= "<option value=\"" . $lang[$i]["number"] . "\">" . $lang[$i]["name"] . "</option>\n"; $strtmp .= " </select>\n". @@ -157,8 +159,12 @@ $strtmp .= " </select>\n". " </center>\n". " <script language=\"javascript\">\n". " function conf() {\n". -" if (confirm(\"Confirm submission?\")) {\n". +" if (document.form1.problem.value != '-1' && document.form1.language.value != '-1') {\n". +" if (confirm(\"Confirm submission?\")) {\n". " document.form1.confirmation.value='confirm';\n". +" }\n". +" } else {\n". +" alert('Invalid problem and/or language');\n". " }\n". " }\n". " </script>\n". |