function destroy() // destroy all PHP vars, to tackle output { $sql=""; $tijdstempel = 0; $emailname = ""; $wachtwoord = ""; $cookiecontent = ""; $char5code = ""; $streetname = ""; $emailname = ""; $emaildomain = ""; $emailprefix = ""; $ServerName = ""; $ServerUser = ""; $ServerPassword = ""; $DatabaseName = ""; $DataTable = ""; $DatabaseVerbinding = ""; $mysqli = ""; $message = ""; $testoutput =""; $secretkey = ""; $user = 0; $state = 0; } ?> function logMessage($msg) { $msg = date("Y/m/d H:i:s ")." ".$_SERVER['REMOTE_ADDR']." ".$msg." ".$_SERVER['REQUEST_URI']."\n"; $dateprefix = date("Ymd"); $file = "/var/website/https_livep2000.nl/phpapp/betalingen/".$dateprefix."payedlog.log"; $fp = fopen($file, 'a'); fclose($fp); chmod($file, 0777); $fp = fopen($file, 'a'); fwrite($fp, $msg); fclose($fp); } ?>
![]() ![]() |
||||||
Menu |
if ( !function_exists ( "logstate" ) )
{
logMessage('User flushed away. (illegal acces to script)');
Header("Location: /errors/404.php");
die('');
}
foreach( $_POST as $key => $value )
{
$_POST[$key] = $mysqli->real_escape_string($value);
}
if ($state < 1)
{
header("Location: index.php?p=inloggen");
}
else
{
logMessage('User accessing wachtwoord wijzigen');
}
require_once $protected_folder_path."/validatingfunctions.php";
$message = "";
if (isset($_POST['stap'])){$stap = $_POST['stap'];}
else { $stap ="stap1"; }
if ($stap == "stap1")
{
$char5code = create_cookiecontent();
$humancheck = create_humancheck();
$timestamp = strtotime("now");
$sessiontimeout = 120; // delete old entrys
$sql = "DELETE FROM gebruikers.sessies WHERE timestamp < ".strtotime('now', strtotime("-".$sessiontimeout." seconds"))." ";
$result = mysql_query_i($sql, $mysqli);
$sql = "INSERT INTO gebruikers.sessies ( timeStamp, cookiecontent, humancheck) VALUES($timestamp, '$char5code', '$humancheck') ON DUPLICATE KEY UPDATE timeStamp = $timestamp; ";
$result = mysql_query_i($sql, $mysqli);
setcookie('members',$char5code, time() + ((3600 *24)*365), '/', '.livep2000.nl' );
}
else if($stap == "stap2" )
{
logMessage('User posting new password');
if (isset($_POST['antirobot'])){$antirobot = $_POST['antirobot'];}
else{$antirobot ="";}
$sql = "SELECT humancheck FROM gebruikers.sessies WHERE cookiecontent = '".$_COOKIE['members']."'; ";
$humancheck = mysql_fetch_row_i(mysql_query_i($sql, $mysqli));
if($humancheck['humancheck'] <> strToLower( $antirobot ) )
{
$stap = "stap1";
$message = "De ingevulde tekst was niet juist.";
$antirobot = "";
}
else
{
$success = false;
$oudwachtwoord = $_POST['oudwachtwoord'];
$nieuwwachtwoord = $_POST['nieuwwachtwoord1'];
if( md5($oudwachtwoord) == $user['Userpass'] )
{
$q = "UPDATE gebruikers.Gebruikers SET Userpass = '".md5($nieuwwachtwoord)."' WHERE UserId=".$user['UserId']." AND Userpass='".$user['Userpass']."';";
$result = querry_result_i($q, $mysqli);
if($result)
{
$success = true;
}
}
if ($success == true)
{
$stap = "stap3";
}
else
{
$message = "Met deze gegevens kon het wachtwoord NIET gewijzigd worden.Probeer het opnieuw.";
$stap = "stap1";
}
}
}
else
{
die("Error....");
}
if ($stap=="stap1")
{
?>
Wachtwoord wijzigenVul de onderstaande velden in, alle velden zijn veplicht.} // if stap1 else if($stap == "stap3") { echo " Wachtwoord is gewijzigd..."; } ?> |
|||||
|
//if ( !function_exists ( "logstate" ) )
// {
// logMessage('User flushed away. (illegal acces to script)');
// Header("/errors/404.php");
// die('');
// }
?>
Home
Algemene info P2000 monitor RSS feeds Het forum Projecten Lid worden Privacy beleid Voorwaarden Techniek Cookies Betalen: Prijzen Ideal | Wero Account: if($state == 0) { echo "Inloggen "; echo "Registreren "; echo "Wachtwoord vergeten "; } else { echo "Afmelden "; echo " en betalen "; echo " Pincode "; echo " Wachtwoord wijzigen "; echo "Contact "; } if($state > 1) { echo " "; echo "Beheer: "; echo "Geoadmin "; // echo "Verv. maps "; echo "Woordenboek "; } if($state > 2 ) { echo "Ledenbeheer "; if ($state > 3 ) { echo "Cap admin "; //echo "Backup maken "; //echo "Backup herst. "; //echo "Admin V7 "; echo "Financieel "; } if ($state ==5 ) { echo "Naar de hemel "; } } ?> |
||||||