From d753a1aaf9cb31d3e9d48bfe97ea3900e55b5b03 Mon Sep 17 00:00:00 2001 From: cassiopc Date: Mon, 28 Oct 2013 11:48:47 +0100 Subject: allow config of main url to accept user/password --- src/site/index.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/site/index.php') diff --git a/src/site/index.php b/src/site/index.php index 0afc7e4..4e3f20d 100644 --- a/src/site/index.php +++ b/src/site/index.php @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . //////////////////////////////////////////////////////////////////////////////// -// Last modified 02/sep/2013 by cassio@ime.usp.br +// Last modified 28/oct/2013 by cassio@ime.usp.br require('header.php'); if(isset($_GET['mainuser']) && isset($_GET['mainpass']) && $_GET['mainuser']!="" && $_GET['mainpass']!="") { $_SESSION['mainuser'] = $_GET['mainuser']; @@ -32,6 +32,16 @@ $smp = isset($_SESSION['mainpass'])? $_SESSION['mainpass']: ""; $smc = isset($_SESSION['check'])? $_SESSION['check']: ""; //MSGError("id=".$smi." user=".$smu." pass=".$smp. " check=".$smc); +$contest=$_SESSION["usertable"]["contestnumber"]; +if($contest != '' && is_numeric($contest)) { + $ct = DBContestInfo($contest); + $mainsiteurl = explode(' ',$ct['contestmainsiteurl']); +// if(count($mainsiteurl)==3) { +// if($smu == '') $smu = $mainsiteurl[1]; +// if($smp == '') $smp = myhash($mainsiteurl[2]); +// } +} + echo "Site Page\n"; echo "\n"; echo "\n"; @@ -117,10 +127,8 @@ Cannot access main server. Check IP address,
password and internet connectio
"; - echo "at URL: " . $ct['contestmainsiteurl']; + echo "at URL: " . $mainsiteurl[0]; } else echo "Status: initial connection established

To guarantee an encrypted connection, please type the same password again:"; ?> -- cgit v1.2.3