I last made any changes to this a long time ago (years...) and not touched it since... but now with a new install, I get an unexpected $end. I'm sure that it has something to do with the php.ini config, but I can't see it... Maybe too little coffee and sleep, or too much looking at it...
Code is as below :
<?php
session_start();
//include("includes/db.php");
if (!isset($_POST['submit']))
{
?>
<html>
<head>
<title>Logon</title>
<script type="text/javascript">
<!--
function searchclear(id)
{
document.forms["logonform"].elements[id].value = "";
}
function searchpopulate(id)
{
var ourfield = document.forms["logonform"].elements[id];
if (ourfield.value == "") ourfield.value = "Username";
}
//-->
</script>
<link rel="stylesheet" href="swimtime.css" type="text/css">
</head>
<body onLoad="parent.scrollTo(0,0)">
<div class="logo" align="center"><img src="images/logo.png"></div><br />
<?php
if (@$_SESSION['error']==1)
{
$lock = 3-$_SESSION['failures'];
if ($lock!=1){$add = "s";}
echo "<div class=\"error\" align=\"center\"><h3>Your username / password has not been recognised - please try again.</h3><br />You have ".$lock." attempt".@$add." remaining</div>";
}
if (isset($_GET['logout']) && $_GET['logout']==1)
{
echo "<div class=\"error\" align=\"center\"><h3>You have been sucessfully logged out.</h3></div>";
}
if (isset($_GET['reason']))
{
$secs = ini_get('session.gc_maxlifetime')/60;
echo "<div class=\"error\" align=\"center\"><h3>Your session has expired.<br />This happens after ".$secs." minutes of inactivity.</h3></div>";
}
?>
<div align="center">
<?php
if ((isset($_SESSION['ipblock']) && $_SESSION['ipblock']==1) || $lock=='0')
{
?>
<span class="error">Your connection has been blocked as there have been too many invalid attempts to login<br />Please retry after <?php echo @$_SESSION['timeleft'];?></span>
<?php
}
else
{
?>
<form name="logonform" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
<span class="textBold">Username : </span><input type="text" name="user" id="user" value="Username" onFocus="searchclear('user');" onBlur="searchpopulate('user');"><br />
<span class="textBold">Password : </span><input type="password" name="pwd" id="pwd" value="password" onFocus="searchclear('pwd');" onBlur="searchpopulate('pwd');"><br /><br />
<input type="submit" name="submit" value="Log On"><br />
</form>
<?php
}
?>
</div>
</body>
</html>
<?
unset($_SESSION['error']);
unset($_SESSION['ipblock']);
unset($_SESSION['timeleft']);
}
else
{
echo "no";
}
?>
It seems as though I have too many { somewhere, so there has to be a something....
php.ini has also been uploaded..
Any help would be much appreciated..