display_news(); break; case 'pm_overview': display_pm_overview(); break; case 'pm': display_pm(); break; case 'register': display_registration(); break; case 'season_details': display_season_details(); break; case 'team': display_team(); break; case 'upload_match_media': display_upload_match_media(); break; case 'user': display_user_profile(); break; } } else { display_errors(250); } // permission denied } //assigning page parts that are always visible $smarty->assign('head', $smarty->fetch("head.tpl"));
function do_set_team_round_long() { if ($_POST['xsrf_token'] != $_SESSION['xsrf_token']) { trigger_error('XSRF code incorrect', E_USER_ERROR); } if (!scoring_is_enabled()) { header('Location: ../Scoring_Frozen'); die; } if ($_POST['teamRoundLongHasValue'] == 'Yes') { $score = $_POST['teamRoundLongScore']; $score_msg = validate_team_long_score($score); if ($score_msg !== true) { display_team($score_msg, 'document.forms[\'lmtDataTeamRoundLongScore\'].teamRoundLongScore.focus();'); } DB::queryRaw('UPDATE teams SET score_team_long="' . mysqli_real_escape_string(DB::get(), $score) . '" WHERE team_id="' . mysqli_real_escape_string(DB::get(), $_GET['ID']) . '" AND (score_team_long <> "' . mysqli_real_escape_string(DB::get(), $score) . '" OR score_team_long IS NULL) LIMIT 1'); } else { DB::queryRaw('UPDATE teams SET score_team_long=NULL WHERE team_id="' . mysqli_real_escape_string(DB::get(), $_GET['ID']) . '" AND score_team_long IS NOT NULL LIMIT 1'); } global $LMT_DB; if (mysqli_affected_rows($LMT_DB) == 1) { add_alert('lmt_data_team_update_team_score_long', 'Team round long answer score was changed'); } header('Location: Team?ID=' . $_GET['ID']); }