--- fenglin/bbs/ch_username_sub.php 2010/01/07 01:21:28 1.4 +++ fenglin/bbs/ch_username_sub.php 2025/03/01 08:43:28 1.6 @@ -13,21 +13,21 @@ if ($_SESSION["BBS_uid"]==0) $permit = false; if (preg_match("/^[A-Za-z]{3,12}$/",$_SESSION["BBS_username"])) { - error_msg ("您无权修改用户名!", true); + error_msg ("鎮ㄦ棤鏉冧慨鏀圭敤鎴峰悕锛", true); exit(); } -$username=htmlspecialchars(trim($_POST["username"])); +$username=htmlspecialchars(trim($_POST["username"]), ENT_COMPAT | ENT_HTML401, 'UTF-8'); $username=addslashes($username); if (!preg_match("/^[A-Za-z]{5,12}$/",$username)) { - error_msg ("用户名填写不正确!", true); + error_msg ("鐢ㄦ埛鍚嶅~鍐欎笉姝g‘锛", true); exit(); } if (!check_str($username)) { - error_msg ("用户名含有系统保留词!", true); + error_msg ("鐢ㄦ埛鍚嶅惈鏈夌郴缁熶繚鐣欒瘝锛", true); exit(); } @@ -36,7 +36,7 @@ $db_conn=include "./db_open.inc.php"; $rs=mysql_query("select UID from user_list where username='$username' limit 1"); if (mysql_num_rows($rs)>0) { - error_msg ("用户名已存在!", true); + error_msg ("鐢ㄦ埛鍚嶅凡瀛樺湪锛", true); exit(); } mysql_free_result($rs);