session_start();
include $_SERVER["DOCUMENT_ROOT"]."/php_settings/dbconn.php";
include "functions.inc.php";
include "logincheck.php";
$message="";
//$userid = $_GET["id"];
//if(stristr($usercode, 'B') === FALSE){ echo "niet gemachtigd"; die(); }
if ($_POST["submitted2"]=="yes"){
$qry = "UPDATE users SET password='". ct($_POST["password"]) ."', timestamp='". date("YmdHis") ."' ";
$qry .= "WHERE id='". $_POST["id"] ."'";
//echo $qry."
";
$result = mysql_query("$qry")or die(mysql_error());
#melding op scherm
$message = "Your password has been changed.
Click here to close window.";
}
if ($_POST["submitted"]=="yes"){
if ($_POST["nieuwsbrief"]=="checked") {$nieuwsbrief=1;} else {$nieuwsbrief=0;}
#mail versturen naar bestuur
$subject = "Wijziging lidgegevens van ".$_POST["roepnaam"] ." ". $_POST["familienaam"] ;
$replyto = $_POST["email"];
$body = $subject."
";
$body .= "user ID: ". $userid ."
";
$body .= "GS nummer: ". $_POST["gsnummer"] ."
";
$body .= "
Gewijzigde gegevens:
";
$body .= "e-mail: ". $_POST["email"] ."
";
if ($nieuwsbrief==1) {$temp="JA";} else {$temp="NEE";}
$body .= "nieuwsbrief ontvangen: ". $temp ."
";
$body .= "
titel: | ". $_POST["titel"] ." |
voorletters: | ". $_POST["voorletters"] ." |
familienaam: | ". $_POST["familienaam"] ." |
adres: | ". $_POST["straathuisnr"] ." |
postcode+plaats: | ". $_POST["postcodeplaats"] ." |
land: | ". $_POST["land"] ." |
telefoon: | ". $_POST["telefoon"] ." |
|