include "secure_session_start.php"; secure_session_start("progcomp"); if (isset($_POST['user']) && isset($_POST['pswd'])) { $user = preg_replace('/[^a-zA-Z0-9-_]/', '', $_POST['user']); $pswd = stripslashes($_POST['pswd']); if (verify_password($user, $pswd)) { $_SESSION['user'] = `echo "$user|" | /web/progcomp/files/.crypt -encode`; $_SESSION['start'] = time(); if (!isset($_GET['app']) || $_GET['app'] == "") { $location = "Location: " . "/~progcomp/home/"; } else { $location = "Location: " . $_GET['app']; } header($location); exit; } else { unset($user); $message = 'Sorry, wrong team name or PIN. Check your official team name on the Teams page'; } } else { $message = 'Log in with your official team name and PIN.'; } if (isset($_GET['title'])) { $PageTitle = $_GET['title']; $PageHeading = $_GET['title']; } else { $PageTitle = "Login"; $PageHeading = "Login"; } include "../header.php"; ?>