aboutsummaryrefslogtreecommitdiff
path: root/src/site
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2013-10-28 10:48:47 +0000
committercassiopc <cassiopc@gmail.com>2013-10-28 10:48:47 +0000
commitd753a1aaf9cb31d3e9d48bfe97ea3900e55b5b03 (patch)
tree703201fc9e560db4ed095d4b7e722c02382e4363 /src/site
parentb5a167f70dc84391c6a4aaafeff044b80b65dad6 (diff)
downloadboca-d753a1aaf9cb31d3e9d48bfe97ea3900e55b5b03.tar.gz
boca-d753a1aaf9cb31d3e9d48bfe97ea3900e55b5b03.zip
allow config of main url to accept user/password
Diffstat (limited to 'src/site')
-rw-r--r--src/site/index.php16
1 files changed, 12 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////////////
-// 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 "<html><head><title>Site Page</title>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n";
echo "<link rel=stylesheet href=\"../Css.php\" type=\"text/css\">\n";
@@ -117,10 +127,8 @@ Cannot access main server. Check IP address,<br> password and internet connectio
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="+1">
<?php
if($id==$idextra) {
- $contest=$_SESSION["usertable"]["contestnumber"];
- $ct = DBContestInfo($contest);
echo "Credentials to connect to main server<br>";
- echo "at URL: " . $ct['contestmainsiteurl'];
+ echo "at URL: " . $mainsiteurl[0];
} else
echo "<u>Status</u>: initial connection established<br><br>To guarantee an encrypted connection, please type the same password again:";
?>