Warning: Cannot modify header information - headers already sent by (output started at /var/www/jonas-eriksen.dk/pic/private/index.php:1) in /var/www/jonas-eriksen.dk/pic/private/index.php on line 215
passwordResetCheck();
$user = new user($db);
$log = new log($db);
$profile = $user->getUser($_GET['user']);
$cpr = decrypt($profile[2],$encryptKey);
$stmt = $db->prepare("SELECT * FROM result_class");
$stmt->execute();
$result = $stmt->fetchAll();
if (isset($_POST['name']))
{
if(isset($_POST['cpr'])){
$uCpr = $_POST['cpr'];
$newCpr = encrypt($uCpr, $encryptKey);
}
else{
$newCpr = $cpr;
}
$uShooterId = $_POST['shooterId'];
$uFullname = $_POST['name'];
$uAdress = $_POST['adress'];
$uBirtday = $_POST['birthday'];
$uEmail = $_POST['email'];
$uPhone = $_POST['phonenumber'];
$uAllowPicture = $_POST['allowPicture'];
$uOwnWeapon = $_POST['ownWeapon'];
$uClass = $_POST['class'];
$uIsDeleted = $_POST['deleted'];
$uNewShooter = $_POST['newShooter'];
$uDate = $_POST['memberDate'];
if($user->update($profile[0], $uShooterId,$newCpr,$uFullname,$uAdress,$uBirtday,$uEmail,$uAllowPicture, $uPhone, $uIsDeleted, $uOwnWeapon, $uClass, $uNewShooter, $uDate)){
$log->addLog($_SESSION['userId'], "Skytte opdateret", "Skytte", "/user/profile.php?user=" . $_GET['user']);
$admin->redirect("/user/profile.php?user=$profile[0]");
}
}
elseif (!$admin->admin_level(0))
{
$admin->redirect('../admin/login.php');
}
include ('../static/header.php');
?>
";
echo "";
echo "
";
echo "