$tccell1 You are not logged it!
$footer";
die('');
}
//Do we have permission to edit?
//Until permissions are finished, checks is user is a "debug" user
if (!$eusers[debug]) {
print "$header
$tccell1 You do not have permission to edit this user!
$footer";
die('');
}
//Don't edit yourself!
if ($loguserid==$fid) {
print "$header $footer";
die('');
}
$tccellha="$fonthead";
print $header;
if($users[sex]==0){ $check1="checked=1"; }
elseif($users[sex]==1){ $check2="checked=1"; }
elseif($users[sex]==2){ $check3="checked=1"; }
$sexlist=" Male ";
$sexlist.=" Female ";
$sexlist.=" N/A ";
if ($_POST[action]=="" and $logpassword!="") {
print "
";
}
if ($_POST[action]=="saveprofile") {
print "
";
$signature=str_replace("
"," ",$_POST[signature]);
$bio=str_replace("
"," ",$_POST[bio]);
$postheader=str_replace("
"," ",$_POST[postheader]);
if (!$_POST[password]) $password=$users[password];
else {
$password=password_hash("$_POST[password]", PASSWORD_BCRYPT);
}
$sql = "UPDATE users SET name = ?, title = ?, password = ?, sex = ?, picture = ?, email = ?, icq = ?, signature = ?, bio = ?, homepageurl = ?, homepagename = ?, postheader = ? WHERE id = $_POST[fid]";
if($stmt = mysqli_prepare($con, $sql)){
mysqli_stmt_bind_param($stmt,"ssssssssssss", $_POST[username], $_POST[usertitle], $password, $_POST[sex], $_POST[picture], $_POST[email], $_POST[icq], $signature, $bio, $_POST[homepageurl], $_POST[homepage], $postheader) or mysqli_error($con);
mysqli_stmt_execute($stmt) or mysqli_error($con);
print "$tccell1"."Thank you, ".$eusers[name].", for editing this user.".
" Click here to return to the board.
";
}
else {
print "$tccell1"."Failed!";
print " Click here to return to the board.";
}
print "
";
}
print $footer;
?>