Exemplo n.º 1
0
		}
	} else {
		$MessageStr = "The login and password you have entered do not match with the ones we have on our database.<br> Try to retype them again.";
		include "message.php";
		exit;
	}
}
if (!$_SESSION['isLogined']) {
} else {
	$u = getUserDetails($_SESSION['isLogined'], 'active');
	if ($u->active != 1 AND !isset($_SESSION['admin'])) {
		$_SESSION['isLogined'] = 0;
		header("Location: index.php");
		exit;
	}
	setLastSeen($_SESSION['isLogined'], time());
	$sN = $HTTP_SERVER_VARS['SCRIPT_NAME'];
	if (($sN == $conf["path"] . '/index.php') || ($sN == $conf["path"] . '/register.php') || ($sN == $conf["path"] . '/activate.php') || ($sN == $conf["path"] . '/recruit.php') || ($sN == $conf["path"] . '/forgotpass.php')) {
		header("Location: base.php");
		exit;
	}
}
//-------------------------------------------- FUNCTIONS --------------------------------------------------------
function ToPositive($number) {
	if ($number < 1.0 or !is_numeric($number)) {
		$number = 1;
	}
	return $number;
}
function valchar($uname) { //Makes sure there is no SQL injection (One word length)
	$exp = "/[a-zA-Z0-9]+/i";
Exemplo n.º 2
0
</TD>
      <TD style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px; PADDING-TOP: 12px" 
    vAlign=top align=left> <BR>
        <?
if ($_SESSION['isLogined']) {
	header("location: base.php");
}
if ($cgi['submit']) {
	//change e-mail
	echo "<center><font color=red>";
	if ($cgi['passone'] != $cgi['passtwo']) {
		echo "Passwords you have entered do not match. Try to re-enter them.";
	} else {
		$pas = md5($cgi['passone']);
		updateUser($_SESSION["activationID"], " password=\"$pas\", active='1' ");
		setLastSeen($_SESSION['activationID'], time());
		mail($cgi['email'], "Your new  password", "Your new  password is: $pas ");
		echo "<font color=white size=5>Activate.</font><br><br> Your password  was changed and now you can login with this new password.";
		$isActivated = 1;
	}
	echo "</font></center>";
}
if (!$isActivated) {
?>
        <form method="post" action="activate.php">
          <table width="50%" class="table_lines" cellpadding="6" border="0" cellspacing="0">
            <tr> 
              <th colspan="2">Activate your new account</th>
            </tr>
            <tr> 
              <td>New Password:</td>