\n"); print("\n"); // connect to the server $db_link = SQL_connect(); $cookie_name = eregi_replace(" ", "_", $site_name); $cusername = $GLOBALS["$cookie_name-username"]; $cpassword = $GLOBALS["$cookie_name-password"]; $realname = get_user_info_field($row["username"], $user_name_field); $imgurl = get_user_info_field($row["username"], $image_field); $admin = get_user_info_field($row["username"], $admin_field); $email = get_user_info_field($row["username"], $email_field); $password = get_user_info_field($row["username"], $passwd_field); if (!check_pw($cpassword, $password)) { print("
Updating Preferences
Error: username and password do not match.
\n"); SQL_close($db_link); include $inc_dir . "footer.php3"; exit; } print("Username  $cusername\n"); print("Email Address  $new_email\n"); if ($new_email != $email) { if ($new_email == "") { print("You must specify an email address. Please click back and try again.\n"); SQL_close($db_link); include $inc_dir . "footer.php3"; exit; } $res = change_user_info_field($cusername, $email_field, $new_email); if ($res > 0) { print("Email address updated...\n"); } } print("Real Name  $new_real\n"); if ($new_real != $real) { if ($new_real == "") { print("You must specify an real name. Please click back and try again.\n"); SQL_close($db_link); include $inc_dir . "footer.php3"; exit; } $res = change_user_info_field($cusername, $user_name_field, $new_real); if ($res > 0) { print("Real name updated...\n"); } } if (($new_pass == $new_pass1) && ($new_pass != "")) { $len = strlen($new_pass); $str = ""; for ($i = 0; $i < $len; $i++) { $str .= "*"; } print("New Password  $str\n"); $pw_new = make_pw($new_pass); $res = change_user_info_field($cusername, $passwd_field, $pw_new); if ($res > 0) { print("Password updated...\n"); } } print("Personal Image URL  $new_img"); if ($new_img != $imgurl) { if ($new_img != "") { print("
"); } $res = change_user_info_field($cusername, $image_field, $new_img); if ($res > 0) { print("Image URL updated...\n"); } } else if ($new_img != "") { print("
"); } print("\n"); print("

"); include $inc_dir . "footer.php3"; ?>