I'm not sure if this is how you do it. But to fix the character encoding problem I rebuilt the htmlentities echo thingy by adding ENT_QUOTES, "UTF-8":
PHP Code:
echo '<tr><td>',$row['steam_id'],'</td><td>',htmlentities($row['player_name'], ENT_QUOTES, "UTF-8"),'</td><td>',htmlentities($row['ban_reason']),'</td><td>',htmlentities($row['banned_by'], ENT_QUOTES, "UTF-8"),'</td><td>',$row['ban_length'],'</td><td>',$row['timestamp'],'</td></tr>';
Now players with multibyte/unicode chars in their names appear correctly on the webpage. If this is not the proper way to fix please let me know. Thanks
Also, is it possible for bans to get randomly deleted from the DB? I know for a fact I had 4 permanent bans yesterday and looked at my DB this morning and only 3 showed up. Also, I'm noticing that if you type a players name that isn't on the server it fills up your error logs with this:
Code:
L 07/31/2012 - 11:39:28: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 07/31/2012 - 11:39:28: [SM] Native "ReplyToCommand" reported: Language phrase "No matching client" not found
L 07/31/2012 - 11:39:28: [SM] Displaying call stack trace for plugin "mysqlt_bans.smx":
L 07/31/2012 - 11:39:28: [SM] [0] Line 103, /groups/sourcemod/compiler-1.4/include/commandfilters.inc::ReplyToTargetError()
L 07/31/2012 - 11:39:28: [SM] [1] Line 198, /groups/sourcemod/compiler-1.4/include/helpers.inc::FindTarget()
L 07/31/2012 - 11:39:28: [SM] [2] Line 116, /home/groups/alliedmodders/forums/files/5/8/2/6/8/107066.attach::Command_Ban()
I tested it by trying to ban a made up name that wasn't on my server then looked and saw a new error log with that in it.